Move recharge handler
This commit is contained in:
parent
4fdbb1fc9d
commit
fb3cfecc79
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user