Move recharge handler

This commit is contained in:
AlexTheCoder 2016-08-02 20:44:09 -04:00
parent 4fdbb1fc9d
commit fb3cfecc79
1 changed files with 4 additions and 4 deletions

View File

@ -118,10 +118,6 @@ public class BannerManager extends MiniPlugin
*/
public void placeBanner(Player placing, ClanBanner banner)
{
if (!Recharge.Instance.use(placing, "Place Banner", 30000, true, false))
{
return;
}
Block block = placing.getLocation().getBlock();
BlockPlaceEvent event = new BlockPlaceEvent(block, block.getState(), block, placing.getItemInHand(), placing, true);
Bukkit.getPluginManager().callEvent(event);
@ -136,6 +132,10 @@ public class BannerManager extends MiniPlugin
ClansManager.getInstance().getBlockRestore().restore(block);
if (block.getType() == Material.AIR && UtilBlock.fullSolid(block.getRelative(BlockFace.DOWN)))
{
if (!Recharge.Instance.use(placing, "Place Banner", 30000, true, false))
{
return;
}
block.setType(Material.STANDING_BANNER);
Banner state = (Banner) block.getState();
state.setBaseColor(banner.getBaseColor());