mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 22:26:45 +01:00
bug fixes.
This commit is contained in:
parent
9ba5e3f91b
commit
cb8822cd6a
@ -132,7 +132,7 @@ public class PlotMain extends JavaPlugin {
|
||||
* @return
|
||||
*/
|
||||
public static int hasPermissionRange(Player player, String stub, int range) {
|
||||
if (player.isOp()) {
|
||||
if (player==null || player.isOp()) {
|
||||
return range;
|
||||
}
|
||||
if (player.hasPermission(stub + ".*")) {
|
||||
@ -157,10 +157,7 @@ public class PlotMain extends JavaPlugin {
|
||||
*/
|
||||
public static boolean hasPermissions(Player player, String[] perms) {
|
||||
// Assumes null player is console.
|
||||
if (player==null) {
|
||||
return true;
|
||||
}
|
||||
if (player.isOp()) {
|
||||
if (player==null || player.isOp()) {
|
||||
return true;
|
||||
}
|
||||
for (String perm : perms) {
|
||||
@ -205,7 +202,7 @@ public class PlotMain extends JavaPlugin {
|
||||
* @return
|
||||
*/
|
||||
public static boolean hasPermission(Player player, String perm) {
|
||||
if (player.isOp()) {
|
||||
if (player==null || player.isOp()) {
|
||||
return true;
|
||||
}
|
||||
if (player.hasPermission(perm)) {
|
||||
|
@ -29,7 +29,7 @@ public class MainCommand implements CommandExecutor {
|
||||
|
||||
private static SubCommand[] _subCommands = new SubCommand[] { new Claim(), new Paste(), new Copy(), new Clipboard(), new Auto(), new Home(), new Visit(),
|
||||
new TP(), new Set(), new Clear(), new Delete(), new SetOwner(), new Denied(), new Helpers(), new Trusted(),
|
||||
new Info(), new list(), new Help(), new Debug(), new Schematic(), new plugin(), new Inventory(),
|
||||
new Info(), new list(), new Help(), new Debug(), new Schematic(), new plugin(), new Inventory(), new Purge(),
|
||||
new Reload(), new Merge(), new Unlink(), new Kick(), new Setup() };
|
||||
|
||||
public static ArrayList<SubCommand> subCommands = new ArrayList<SubCommand>() {
|
||||
@ -52,7 +52,7 @@ public class MainCommand implements CommandExecutor {
|
||||
else {
|
||||
player = null;
|
||||
}
|
||||
if (PlotMain.hasPermission(player, "plots.use")) {
|
||||
if (!PlotMain.hasPermission(player, "plots.use")) {
|
||||
return no_permission(player);
|
||||
}
|
||||
if ((args.length < 1)
|
||||
|
Loading…
Reference in New Issue
Block a user