From 1cd844735eb00213bafc8a34e0bb5c6f87cabf63 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Thu, 28 May 2015 20:58:41 +0800 Subject: [PATCH] rebuild priject... Signed-off-by: j502647092 --- src/cn/citycraft/RocketJump/RocketJump.java | 24 ++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/cn/citycraft/RocketJump/RocketJump.java b/src/cn/citycraft/RocketJump/RocketJump.java index 27cedac..635fe83 100644 --- a/src/cn/citycraft/RocketJump/RocketJump.java +++ b/src/cn/citycraft/RocketJump/RocketJump.java @@ -13,13 +13,9 @@ import org.bukkit.plugin.java.JavaPlugin; */ public class RocketJump extends JavaPlugin { - List Dante = new ArrayList() ; - - public void onEnable() { - getServer().getPluginManager().registerEvents(new Listen(this), this); - getLogger().info("§aRocketJump已加载..."); - } + List Dante = new ArrayList() ; + @Override public boolean onCommand(CommandSender sender, Command cmd, String string, String[] args) { Player p = (Player) sender; @@ -33,17 +29,25 @@ public class RocketJump extends JavaPlugin { if (args[0].equalsIgnoreCase("off")) { this.Dante.remove(p.getName()); sender.sendMessage("§6[RocketJump]§4已关闭..."); - if (p.getGameMode() == GameMode.SURVIVAL) + if (p.getGameMode() == GameMode.SURVIVAL) { p.setAllowFlight(false); + } return true; } } return false; } - + @Override public void onDisable() { - getLogger().info( "§4RocketJump已卸载..."); - } + getLogger().info( "§4RocketJump已卸载..."); + } + + + @Override + public void onEnable() { + getServer().getPluginManager().registerEvents(new Listen(this), this); + getLogger().info("§aRocketJump已加载..."); + } }