No need to send block break and place events to everyone, that's spammy.
This commit is contained in:
parent
676b22967b
commit
96cb530add
@ -18,9 +18,6 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(ignoreCancelled=true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled=true, priority = EventPriority.HIGHEST)
|
||||||
public void blockBreak(BlockBreakEvent event) {
|
public void blockBreak(BlockBreakEvent event) {
|
||||||
//If we're in debugging mode, let's send the player what block they're breaking.
|
|
||||||
if(pl.inDebug()) event.getPlayer().sendMessage("[Jail Debug]: " + event.getBlock().getType().toString());
|
|
||||||
|
|
||||||
//If we are protecting against block breaking, then let's do the action.
|
//If we are protecting against block breaking, then let's do the action.
|
||||||
//If we're not, let's not use any processing power to get the jail
|
//If we're not, let's not use any processing power to get the jail
|
||||||
//where this block was broke at
|
//where this block was broke at
|
||||||
@ -39,9 +36,6 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(ignoreCancelled=true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled=true, priority = EventPriority.HIGHEST)
|
||||||
public void blockPlace(BlockPlaceEvent event) {
|
public void blockPlace(BlockPlaceEvent event) {
|
||||||
//If we're in debugging mode, let's send the player what block they're placing.
|
|
||||||
if(pl.inDebug()) event.getPlayer().sendMessage("[Jail Debug]: " + event.getBlock().getType().toString());
|
|
||||||
|
|
||||||
//If we are protecting against block placing, then let's do the action.
|
//If we are protecting against block placing, then let's do the action.
|
||||||
//If we're not, let's not use any processing power to get the jail
|
//If we're not, let's not use any processing power to get the jail
|
||||||
//where this block was placed at
|
//where this block was placed at
|
||||||
|
Loading…
Reference in New Issue
Block a user