mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Fixed ArrayOutOfBoundsException in admin delete command (#600)
When admins tried to delete island, they got an ArrayOutOfBounds exception. This will fix it.
This commit is contained in:
parent
e3fbeb1560
commit
07b4e2d30c
@ -27,6 +27,10 @@ public class AdminDeleteCommand extends ConfirmableCommand {
|
||||
|
||||
@Override
|
||||
public boolean canExecute(User user, String label, List<String> args) {
|
||||
if (args.size() != 1) {
|
||||
showHelp(this, user);
|
||||
return false;
|
||||
}
|
||||
// Get target
|
||||
UUID targetUUID = getPlayers().getUUID(args.get(0));
|
||||
if (targetUUID == null) {
|
||||
|
@ -223,7 +223,7 @@ commands:
|
||||
world:
|
||||
description: "Manage world settings"
|
||||
delete:
|
||||
parameters: ""
|
||||
parameters: "<player>"
|
||||
description: "deletes a player's island"
|
||||
cannot-delete-owner: "&cAll island members have to be kicked from the island before deleting it."
|
||||
deleted-island: "&aIsland at &e[xyz] &ahas been successfully deleted."
|
||||
|
@ -166,7 +166,7 @@ commands:
|
||||
world:
|
||||
description: "世界の設定を管理する"
|
||||
delete:
|
||||
parameters: ""
|
||||
parameters: "<player>"
|
||||
description: "プレイヤーの島を削除します。"
|
||||
cannot-delete-owner: "&cすべての島のメンバーは、それを削除する前に島から追い出される必要があります。"
|
||||
deleted-island: "&2[xyz] の島は正常に削除されました。"
|
||||
|
@ -138,6 +138,11 @@ commands:
|
||||
look-at-a-block: "&cSpójrz na blok w ciągu 20 bloków, aby ustawić"
|
||||
world:
|
||||
description: "Zarządzaj ustawieniami świata"
|
||||
delete:
|
||||
parameters: "<player>"
|
||||
description: "deletes a player's island"
|
||||
cannot-delete-owner: "&cAll island members have to be kicked from the island before deleting it."
|
||||
deleted-island: "&aIsland at &e[xyz] &ahas been successfully deleted."
|
||||
island:
|
||||
about:
|
||||
description: "wyświetl informacje o prawach autorskich i licencji"
|
||||
|
@ -56,6 +56,11 @@ commands:
|
||||
parameters: "[player]"
|
||||
description: "Dịch chuyển đến đảo người chơi"
|
||||
manual: "&cKhông tìm thấy cổng dịch chuyển an toàn! Hãy tp tới địa điểm &b[location] &cvà kiểm tra"
|
||||
delete:
|
||||
parameters: "<player>"
|
||||
description: "deletes a player's island"
|
||||
cannot-delete-owner: "&cAll island members have to be kicked from the island before deleting it."
|
||||
deleted-island: "&aIsland at &e[xyz] &ahas been successfully deleted."
|
||||
island:
|
||||
about:
|
||||
description: "hiện thông tin về BentoBox"
|
||||
|
@ -186,7 +186,7 @@ commands:
|
||||
world:
|
||||
description: "管理世界设置"
|
||||
delete:
|
||||
parameters: ""
|
||||
parameters: "<player>"
|
||||
description: "删除玩家的岛屿"
|
||||
cannot-delete-owner: "&c删除之前必须将所有岛屿成员都踢出岛屿。"
|
||||
deleted-island: "&a位于 &e[xyz] &a的岛屿已经被成功删除。"
|
||||
|
@ -198,7 +198,7 @@ commands:
|
||||
world:
|
||||
description: "管理世界設置"
|
||||
delete:
|
||||
parameters: ""
|
||||
parameters: "<player>"
|
||||
description: "刪除玩家的島嶼"
|
||||
cannot-delete-owner: "&c刪除之前必須將所有島嶼成員都踢出島嶼。"
|
||||
deleted-island: "&a位於 &e[xyz] &a的島嶼已經被成功刪除。"
|
||||
|
Loading…
Reference in New Issue
Block a user