Link, wake up...

This commit is contained in:
CmdrKittens
2020-04-13 14:57:22 -04:00
parent db414a7d2f
commit 3925012a94
2 changed files with 10 additions and 0 deletions
@@ -58,6 +58,9 @@ public class SignListener implements Listener {
return; return;
} }
Player player = event.getPlayer(); Player player = event.getPlayer();
if (player.isSleeping() || player.isDead() || !player.isOnline()) {
return;
}
Block block = event.getClickedBlock(); Block block = event.getClickedBlock();
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (PlayerVaults.getInstance().getInVault().containsKey(player.getUniqueId().toString())) { if (PlayerVaults.getInstance().getInVault().containsKey(player.getUniqueId().toString())) {
@@ -131,6 +131,9 @@ public class VaultOperations {
if (isLocked()) { if (isLocked()) {
return false; return false;
} }
if (player.isSleeping() || player.isDead() || !player.isOnline()) {
return false;
}
int number; int number;
try { try {
number = Integer.parseInt(arg); number = Integer.parseInt(arg);
@@ -202,6 +205,10 @@ public class VaultOperations {
return false; return false;
} }
if (player.isSleeping() || player.isDead() || !player.isOnline()) {
return false;
}
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
int number = 0; int number = 0;