Retain cross-version compatibility & cleanup (#374)
This commit is contained in:
@@ -1,19 +1,3 @@
|
||||
/*
|
||||
* Copyright (C) 2013 drtshock
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.drtshock.playervaults.vaultmanagement;
|
||||
|
||||
import com.drtshock.playervaults.PlayerVaults;
|
||||
@@ -72,11 +56,11 @@ public class VaultOperations {
|
||||
* @return Whether or not they have permission.
|
||||
*/
|
||||
public static boolean checkPerms(CommandSender sender, int number) {
|
||||
if (sender.hasPermission("playervaults.amount." + String.valueOf(number))) {
|
||||
if (sender.hasPermission("playervaults.amount." + number)) {
|
||||
return true;
|
||||
}
|
||||
for (int x = number; x <= 99; x++) {
|
||||
if (sender.hasPermission("playervaults.amount." + String.valueOf(x))) {
|
||||
if (sender.hasPermission("playervaults.amount." + x)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -319,7 +303,7 @@ public class VaultOperations {
|
||||
|
||||
if (sender.hasPermission("playervaults.delete.all")) {
|
||||
VaultManager.getInstance().deleteAllVaults(holder);
|
||||
PlayerVaults.getInstance().getLogger().info(String.format("%s deleted ALL vaults belonging to %s", sender.getName(), holder.toString()));
|
||||
PlayerVaults.getInstance().getLogger().info(String.format("%s deleted ALL vaults belonging to %s", sender.getName(), holder));
|
||||
} else {
|
||||
sender.sendMessage(Lang.TITLE.toString() + Lang.NO_PERMS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user