diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java index 8fefaab1..83a4d1eb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java @@ -147,6 +147,17 @@ public class BlockBlocker extends FreedomService } 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_WALL_HEAD: { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_toggle.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_toggle.java index c1015827..c01eb597 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_toggle.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_toggle.java @@ -47,6 +47,7 @@ public class Command_toggle extends FreedomCommand msg("- jukeboxes"); msg("- spawners"); msg("- 4chan"); + msg("- beehives"); return false; } @@ -219,6 +220,11 @@ public class Command_toggle extends FreedomCommand toggle("4chan mode is", ConfigEntry.FOURCHAN_ENABLED); return true; } + else if (args[0].equalsIgnoreCase("beehives")) + { + toggle("Beehives are", ConfigEntry.ALLOW_BEEHIVES); + return true; + } else { return false; @@ -238,7 +244,7 @@ public class Command_toggle extends FreedomCommand return Arrays.asList( "waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk", "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(); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java index 4101ef62..b0bf9312 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java @@ -32,6 +32,7 @@ public enum ConfigEntry ALLOW_GRINDSTONES(Boolean.class, "allow.grindstones"), ALLOW_JUKEBOXES(Boolean.class, "allow.jukeboxes"), ALLOW_SPAWNERS(Boolean.class, "allow.spawners"), + ALLOW_BEEHIVES(Boolean.class, "allow.beehives"), // BLOCKED_CHATCODES(String.class, "blocked_chatcodes"), // diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a93997c4..ee723658 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -151,6 +151,7 @@ allow: grindstones: false jukeboxes: false spawners: false + beehives: false # Blocked commands: #