Signs are not commands

This commit is contained in:
mbax
2021-06-26 15:45:29 -04:00
parent 09957304e6
commit e75dc6c609
2 changed files with 2 additions and 2 deletions
@@ -124,7 +124,7 @@ public class SignListener implements Listener {
}
if (self) {
// We already checked that they can use signs, now lets check if they have this many vaults.
if (VaultOperations.openOwnVault(player, numS, true)) {
if (VaultOperations.openOwnVault(player, numS, false)) {
PlayerVaults.getInstance().getInVault().put(player.getUniqueId().toString(), new VaultViewInfo(player.getUniqueId().toString(), num));
} else {
PlayerVaults.debug("Player " + player.getName() + " failed to open sign vault!");
@@ -194,7 +194,7 @@ public class VaultOperations {
* @return Whether or not the player was allowed to open it.
*/
public static boolean openOwnVault(Player player, String arg, boolean isCommand) {
if (isCommand && player.hasPermission("playervaults.commands.use")) {
if (!isCommand || player.hasPermission("playervaults.commands.use")) {
return openOwnVault(player, arg);
}
PlayerVaults.getInstance().getTL().noPerms().title().send(player);