Ignore the cancelled events
This commit is contained in:
parent
4ab48b3659
commit
d49d2243d8
@ -21,7 +21,7 @@ public class PlayerListener implements Listener {
|
|||||||
this.pl = plugin;
|
this.pl = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(ignoreCancelled=true)
|
||||||
public void jailOrCellCreation(PlayerInteractEvent event) {
|
public void jailOrCellCreation(PlayerInteractEvent event) {
|
||||||
if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
@ -42,7 +42,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(ignoreCancelled=true)
|
||||||
public void chatting(AsyncPlayerChatEvent event) {
|
public void chatting(AsyncPlayerChatEvent event) {
|
||||||
if(pl.getJailManager().isPlayerJailed(event.getPlayer().getName())) {
|
if(pl.getJailManager().isPlayerJailed(event.getPlayer().getName())) {
|
||||||
if(pl.getJailManager().getPrisoner(event.getPlayer().getName()).isMuted()) {
|
if(pl.getJailManager().getPrisoner(event.getPlayer().getName()).isMuted()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user