respawn anchor place prevention

This commit is contained in:
Super_
2020-07-02 08:13:20 -04:00
parent 556dfa7233
commit 8a60ae2235
4 changed files with 19 additions and 1 deletions

View File

@ -159,6 +159,16 @@ public class BlockBlocker extends FreedomService
}
break;
}
case RESPAWN_ANCHOR:
{
if (!ConfigEntry.ALLOW_RESPAWN_ANCHORS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Respawn anchors are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
}
if (Groups.BANNERS.contains(event.getBlockPlaced().getType()))