1
0
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:
502647092 2016-01-30 21:03:32 +08:00
parent 6101295450
commit c974c98a19
4 changed files with 64 additions and 3 deletions

View File

@ -0,0 +1,13 @@
/**
*
*/
package cn.citycraft.VbariableAPI;
/**
*
* @since 2016年1月30日 上午9:29:54
* @author
*/
public class VAPI {
}

View File

@ -10,5 +10,5 @@ package cn.citycraft.VbariableAPI;
* @author
*/
public interface VariableHook {
public String onVariableReplace();
public String onVariableReplace(VariableReplaceEvent vre);
}

View File

@ -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;
}
}

View File

@ -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);
}
}