From c2b6f00bc2770e366d7f675d53abf10f19ba1452 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 21 Oct 2015 20:07:52 +0800 Subject: [PATCH] fix world command and add warp warps command... Signed-off-by: 502647092 --- .../SimpleEssential/command/CommandBase.java | 36 ++++++++++++++++++ .../SimpleEssential/command/CommandWarp.java | 38 +++++++++++++++++++ .../SimpleEssential/command/CommandWarps.java | 36 ++++++++++++++++++ .../SimpleEssential/command/CommandWorld.java | 2 + src/main/resources/warps.yml | 1 + 5 files changed, 113 insertions(+) create mode 100644 src/main/java/cn/citycraft/SimpleEssential/command/CommandBase.java create mode 100644 src/main/java/cn/citycraft/SimpleEssential/command/CommandWarp.java create mode 100644 src/main/java/cn/citycraft/SimpleEssential/command/CommandWarps.java create mode 100644 src/main/resources/warps.yml diff --git a/src/main/java/cn/citycraft/SimpleEssential/command/CommandBase.java b/src/main/java/cn/citycraft/SimpleEssential/command/CommandBase.java new file mode 100644 index 0000000..4d9cd7c --- /dev/null +++ b/src/main/java/cn/citycraft/SimpleEssential/command/CommandBase.java @@ -0,0 +1,36 @@ +/** + * + */ +package cn.citycraft.SimpleEssential.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandException; +import org.bukkit.command.CommandSender; + +import cn.citycraft.PluginHelper.commands.BaseCommand; +import cn.citycraft.SimpleEssential.SimpleEssential; + +/** + * 传送到顶部命令 + * + * @author 蒋天蓓 + * 2015年8月12日下午2:04:05 + * + */ +public class CommandBase extends BaseCommand { + SimpleEssential plugin; + + /** + * @param name + */ + public CommandBase(final SimpleEssential main) { + super("warps"); + this.plugin = main; + setDescription("查看所有地表"); + } + + @Override + public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { + sender.sendMessage("§c当前功能暂未开发..."); + } +} diff --git a/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarp.java b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarp.java new file mode 100644 index 0000000..ae1024c --- /dev/null +++ b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarp.java @@ -0,0 +1,38 @@ +/** + * + */ +package cn.citycraft.SimpleEssential.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandException; +import org.bukkit.command.CommandSender; + +import cn.citycraft.PluginHelper.commands.BaseCommand; +import cn.citycraft.SimpleEssential.SimpleEssential; + +/** + * 传送到顶部命令 + * + * @author 蒋天蓓 + * 2015年8月12日下午2:04:05 + * + */ +public class CommandWarp extends BaseCommand { + SimpleEssential plugin; + + /** + * @param name + */ + public CommandWarp(final SimpleEssential main) { + super("warp"); + this.plugin = main; + setMinimumArguments(1); + setPermission("se.warp"); + setDescription("传送至地标"); + } + + @Override + public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { + sender.sendMessage("§c当前功能暂未开发..."); + } +} diff --git a/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarps.java b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarps.java new file mode 100644 index 0000000..93e4de4 --- /dev/null +++ b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWarps.java @@ -0,0 +1,36 @@ +/** + * + */ +package cn.citycraft.SimpleEssential.command; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandException; +import org.bukkit.command.CommandSender; + +import cn.citycraft.PluginHelper.commands.BaseCommand; +import cn.citycraft.SimpleEssential.SimpleEssential; + +/** + * 传送到顶部命令 + * + * @author 蒋天蓓 + * 2015年8月12日下午2:04:05 + * + */ +public class CommandWarps extends BaseCommand { + SimpleEssential plugin; + + /** + * @param name + */ + public CommandWarps(final SimpleEssential main) { + super("warps"); + this.plugin = main; + setDescription("查看所有地表"); + } + + @Override + public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { + sender.sendMessage("§c当前功能暂未开发..."); + } +} diff --git a/src/main/java/cn/citycraft/SimpleEssential/command/CommandWorld.java b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWorld.java index 1565809..ce67259 100644 --- a/src/main/java/cn/citycraft/SimpleEssential/command/CommandWorld.java +++ b/src/main/java/cn/citycraft/SimpleEssential/command/CommandWorld.java @@ -49,6 +49,7 @@ public class CommandWorld extends BaseCommand { } sender.sendMessage(I18n.p("World.info", wd.getName(), wd.getEnvironment().toString(), wd.getLoadedChunks().length, wd.getEntities().size(), tileEntities, wd.getPlayers().size())); } + break; case 1: final World wd = Bukkit.getWorld(args[0]); if (wd != null) { @@ -60,6 +61,7 @@ public class CommandWorld extends BaseCommand { } else { sender.sendMessage(I18n.p("World.unknow", args[1])); } + break; } } } diff --git a/src/main/resources/warps.yml b/src/main/resources/warps.yml new file mode 100644 index 0000000..23ab54b --- /dev/null +++ b/src/main/resources/warps.yml @@ -0,0 +1 @@ +warps: \ No newline at end of file