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已加载..."); + } }