Remove spawn command

This commit is contained in:
Minecon724 2025-01-05 11:41:49 +01:00
parent b26b8a1ded
commit bccdc7d232
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
2 changed files with 2 additions and 16 deletions

View file

@ -46,19 +46,7 @@ public class GiantsCommand implements CommandExecutor {
Player player = sender instanceof Player ? (Player) sender : null; Player player = sender instanceof Player ? (Player) sender : null;
if (action.equals("spawn")) { if (action.equals("serialize")) {
sender.sendMessage("This command is deprecated. Use /summon giant instead");
if (player != null) {
if (plugin.isSpawnableAt(player.getLocation())) {
sender.sendMessage("Spawned a Giant");
player.getWorld().spawnEntity(player.getLocation(), EntityType.GIANT);
} else {
sender.sendMessage("No space here for a Giant");
}
} else {
sender.sendMessage("Only players can use this command.");
}
} else if (action.equals("serialize")) {
if (player != null) { if (player != null) {
ItemStack itemStack = player.getInventory().getItemInMainHand(); ItemStack itemStack = player.getInventory().getItemInMainHand();

View file

@ -9,10 +9,8 @@ load: STARTUP
commands: commands:
giants: giants:
description: Utility command for Giants description: Utility command for Giants
permissions: permissions:
giants.command.spawn:
description: Permits /giants spawn
default: op
giants.command.serialize: giants.command.serialize:
description: Permits /giants serialize description: Permits /giants serialize
default: op default: op