mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
block beehives
This commit is contained in:
parent
b2abc1db45
commit
2d7353c076
@ -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:
|
||||||
{
|
{
|
||||||
|
@ -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();
|
||||||
|
@ -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"),
|
||||||
//
|
//
|
||||||
|
@ -151,6 +151,7 @@ allow:
|
|||||||
grindstones: false
|
grindstones: false
|
||||||
jukeboxes: false
|
jukeboxes: false
|
||||||
spawners: false
|
spawners: false
|
||||||
|
beehives: false
|
||||||
|
|
||||||
# Blocked commands:
|
# Blocked commands:
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user