From 74edabcf86ca6a073fd193ad0237db28b20122d9 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 20 Jul 2016 14:42:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8Dreload=E5=92=8Chelp?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../pw/yumc/TeleportRandom/TeleportRandom.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/pw/yumc/TeleportRandom/TeleportRandom.java b/src/main/java/pw/yumc/TeleportRandom/TeleportRandom.java index d80f942..fb30a7e 100644 --- a/src/main/java/pw/yumc/TeleportRandom/TeleportRandom.java +++ b/src/main/java/pw/yumc/TeleportRandom/TeleportRandom.java @@ -36,29 +36,25 @@ public class TeleportRandom extends JavaPlugin implements CommandExecutor { switch (args.length) { case 0: randomTP(0, p.getWorld(), p); - break; + return true; case 1: randomTP(Integer.parseInt(args[0]), p.getWorld(), p); - break; + return true; case 2: randomTP(Integer.parseInt(args[0]), Bukkit.getWorld(args[1]), p); - break; + return true; } - return true; } else if (args.length > 1) { final Player p = Bukkit.getPlayer(args[0]); switch (args.length) { case 2: randomTP(Integer.parseInt(args[1]), p.getWorld(), p); - break; + return true; case 3: randomTP(Integer.parseInt(args[1]), Bukkit.getWorld(args[2]), p); - break; - default: - break; + return true; } } - return true; } catch (final IllegalArgumentException e) { sender.sendMessage(getPrefix() + "§c非法的参数或不存在的世界!"); }