Cancel before sending message so that access is denied in case of error

This commit is contained in:
Phoenix616 2020-07-03 17:26:13 +01:00
parent 493784c2dd
commit 9cbf33f68f
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -66,8 +66,8 @@ public class PlayerInteract implements Listener {
}
if (!Security.canAccess(player, block)) {
Messages.ACCESS_DENIED.sendWithPrefix(player);
event.setCancelled(true);
Messages.ACCESS_DENIED.sendWithPrefix(player);
}
return;