mirror of
https://e.coding.net/circlecloud/TeleportRandom.git
synced 2024-12-25 16:28:49 +00:00
feat: 修复reload和help命令
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
dc133a01f0
commit
74edabcf86
@ -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非法的参数或不存在的世界!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user