mirror of
https://e.coding.net/circlecloud/VbariableAPI.git
synced 2024-12-27 07:28:50 +00:00
更新部分代码...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
6101295450
commit
c974c98a19
13
src/main/java/cn/citycraft/VbariableAPI/VAPI.java
Normal file
13
src/main/java/cn/citycraft/VbariableAPI/VAPI.java
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package cn.citycraft.VbariableAPI;
|
||||
|
||||
/**
|
||||
*
|
||||
* @since 2016年1月30日 上午9:29:54
|
||||
* @author 喵♂呜
|
||||
*/
|
||||
public class VAPI {
|
||||
|
||||
}
|
@ -10,5 +10,5 @@ package cn.citycraft.VbariableAPI;
|
||||
* @author 喵♂呜
|
||||
*/
|
||||
public interface VariableHook {
|
||||
public String onVariableReplace();
|
||||
public String onVariableReplace(VariableReplaceEvent vre);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
*/
|
||||
package cn.citycraft.VbariableAPI;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@ -14,6 +16,17 @@ import org.bukkit.event.HandlerList;
|
||||
public class VariableReplaceEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Player player = null;
|
||||
private final OfflinePlayer offlinePlayer;
|
||||
private final String message;
|
||||
|
||||
public VariableReplaceEvent(final OfflinePlayer offlinePlayer, final String message) {
|
||||
if (offlinePlayer != null && offlinePlayer.isOnline()) {
|
||||
this.player = (Player) offlinePlayer;
|
||||
}
|
||||
this.offlinePlayer = offlinePlayer;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
@ -24,4 +37,25 @@ public class VariableReplaceEvent extends Event {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return message
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return offlinePlayer
|
||||
*/
|
||||
public OfflinePlayer getOfflinePlayer() {
|
||||
return offlinePlayer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return player
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,12 +3,26 @@
|
||||
*/
|
||||
package cn.citycraft.VbariableAPI;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import cn.citycraft.PluginHelper.config.FileConfig;
|
||||
|
||||
/**
|
||||
* VbariableAPI核心
|
||||
*
|
||||
*
|
||||
* @since 2016年1月29日 上午9:25:31
|
||||
* @author 喵♂呜
|
||||
*/
|
||||
public class VbariableAPI {
|
||||
public class VbariableAPI extends JavaPlugin {
|
||||
FileConfig config;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
config = new FileConfig(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user