mirror of
https://e.coding.net/circlecloud/TeleportRandom.git
synced 2024-10-31 07:28:47 +00:00
添加后台传送功能
This commit is contained in:
parent
929ac79c3d
commit
e05b2118e6
@ -50,7 +50,25 @@ public class TeleportRandom extends JavaPlugin implements CommandExecutor {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage(pluginname + "§c控制台无法使用此命令!");
|
||||
if(args.length>0){
|
||||
try {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
RandomTP(0,Bukkit.getPlayer(args[0]));
|
||||
break;
|
||||
case 2:
|
||||
RandomTP(Integer.parseInt(args[1]),Bukkit.getPlayer(args[0]));
|
||||
break;
|
||||
case 3:
|
||||
RandomTP(Integer.parseInt(args[1]),Bukkit.getWorld(args[2]),Bukkit.getPlayer(args[0]));
|
||||
break;
|
||||
} catch (final Exception e) {
|
||||
sender.sendMessage(pluginname + "§c非法的参数或不存在的世界!");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage(pluginname + "§c非法的参数!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user