Change Clans energy icon to wood sword, cancel placing of bedrock

This commit is contained in:
Spencer 2018-01-03 21:25:14 -05:00 committed by Alexander Meech
parent 9f8cc4f372
commit 5208424a60
2 changed files with 11 additions and 1 deletions

View File

@ -198,6 +198,16 @@ public class Gameplay extends MiniPlugin
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void BedrockCancel(BlockPlaceEvent event)
{
if (event.getBlock().getType() == Material.BEDROCK)
{
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot place " + F.item("Bedrock") + "."));
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void CommandPlace(BlockPlaceEvent event)
{

View File

@ -85,7 +85,7 @@ public class EnergyPage extends ShopPageBase<ClanEnergyManager, EnergyShop>
private void buildNoClan()
{
ShopItem shopItem = new ShopItem(Material.BEDROCK, "No Clan!", new String[] { " ", ChatColor.RESET + "You need to be in a", ChatColor.RESET + "clan to purchase energy!" }, 1, false, false);
ShopItem shopItem = new ShopItem(Material.WOOD_SWORD, "No Clan!", new String[] { " ", ChatColor.RESET + "You need to be in a", ChatColor.RESET + "clan to purchase energy!" }, 1, false, false);
setItem(4, shopItem);
}
}