mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Aligns permissions and fixes permission bugs
https://github.com/BentoBoxWorld/BSkyBlock/issues/120
This commit is contained in:
parent
91034f956e
commit
fc160d8c5f
@ -686,7 +686,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
* @return true if cool down in place, false if not
|
||||
*/
|
||||
protected boolean checkCooldown(User user, UUID targetUUID) {
|
||||
if (!cooldowns.containsKey(user.getUniqueId()) || user.isOp() || user.hasPermission(getPermissionPrefix() + ".mod.bypasscooldowns")) {
|
||||
if (!cooldowns.containsKey(user.getUniqueId()) || user.isOp() || user.hasPermission(getPermissionPrefix() + "mod.bypasscooldowns")) {
|
||||
return false;
|
||||
}
|
||||
cooldowns.putIfAbsent(user.getUniqueId(), new HashMap<>());
|
||||
|
@ -19,7 +19,7 @@ public class AdminInfoCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.info");
|
||||
setPermission("mod.info");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.info.parameters");
|
||||
setDescription("commands.admin.info.description");
|
||||
|
@ -19,7 +19,7 @@ public class AdminTeamAddCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.team");
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.add.parameters");
|
||||
setDescription("commands.admin.team.add.description");
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.team");
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.disband.parameters");
|
||||
setDescription("commands.admin.team.disband.description");
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class AdminTeamKickCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.team");
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.kick.parameters");
|
||||
setDescription("commands.admin.team.kick.description");
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class AdminTeamSetownerCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.team");
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.setowner.parameters");
|
||||
setDescription("commands.admin.team.setowner.description");
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public class IslandBanCommand extends CompositeCommand {
|
||||
}
|
||||
User target = User.getInstance(targetUUID);
|
||||
// Cannot ban ops
|
||||
if (target.hasPermission("admin.noban")) {
|
||||
if (target.hasPermission(getAddon().getPermissionPrefix() + "admin.noban")) {
|
||||
user.sendMessage("commands.island.ban.cannot-ban");
|
||||
return false;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class IslandExpelCommand extends CompositeCommand {
|
||||
return false;
|
||||
}
|
||||
// Cannot ban ops
|
||||
if (target.isOp() || target.hasPermission("admin.noexpel")) {
|
||||
if (target.isOp() || target.hasPermission("admin.noexpel") || target.hasPermission("mod.bypassexpel")) {
|
||||
user.sendMessage(CANNOT_EXPEL);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user