block beehives

This commit is contained in:
ZeroEpoch1969 2020-02-08 21:52:43 -07:00
parent b2abc1db45
commit 2d7353c076
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
4 changed files with 20 additions and 1 deletions

View File

@ -147,6 +147,17 @@ public class BlockBlocker extends FreedomService
} }
break; break;
} }
case BEEHIVE:
case BEE_NEST:
{
if (!ConfigEntry.ALLOW_BEEHIVES.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Bee hives are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case PLAYER_HEAD: case PLAYER_HEAD:
case PLAYER_WALL_HEAD: case PLAYER_WALL_HEAD:
{ {

View File

@ -47,6 +47,7 @@ public class Command_toggle extends FreedomCommand
msg("- jukeboxes"); msg("- jukeboxes");
msg("- spawners"); msg("- spawners");
msg("- 4chan"); msg("- 4chan");
msg("- beehives");
return false; return false;
} }
@ -219,6 +220,11 @@ public class Command_toggle extends FreedomCommand
toggle("4chan mode is", ConfigEntry.FOURCHAN_ENABLED); toggle("4chan mode is", ConfigEntry.FOURCHAN_ENABLED);
return true; return true;
} }
else if (args[0].equalsIgnoreCase("beehives"))
{
toggle("Beehives are", ConfigEntry.ALLOW_BEEHIVES);
return true;
}
else else
{ {
return false; return false;
@ -238,7 +244,7 @@ public class Command_toggle extends FreedomCommand
return Arrays.asList( return Arrays.asList(
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk", "waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs", "firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs",
"bells", "armorstands", "clearonjoin", "tpronjoin", "structureblocks", "jigsaws", "grindstones", "jukeboxes", "spawners", "4chan"); "bells", "armorstands", "clearonjoin", "tpronjoin", "structureblocks", "jigsaws", "grindstones", "jukeboxes", "spawners", "4chan", "beehives");
} }
return Collections.emptyList(); return Collections.emptyList();

View File

@ -32,6 +32,7 @@ public enum ConfigEntry
ALLOW_GRINDSTONES(Boolean.class, "allow.grindstones"), ALLOW_GRINDSTONES(Boolean.class, "allow.grindstones"),
ALLOW_JUKEBOXES(Boolean.class, "allow.jukeboxes"), ALLOW_JUKEBOXES(Boolean.class, "allow.jukeboxes"),
ALLOW_SPAWNERS(Boolean.class, "allow.spawners"), ALLOW_SPAWNERS(Boolean.class, "allow.spawners"),
ALLOW_BEEHIVES(Boolean.class, "allow.beehives"),
// //
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"), BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
// //

View File

@ -151,6 +151,7 @@ allow:
grindstones: false grindstones: false
jukeboxes: false jukeboxes: false
spawners: false spawners: false
beehives: false
# Blocked commands: # Blocked commands:
# #