mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 14:43:49 +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
|
* @return true if cool down in place, false if not
|
||||||
*/
|
*/
|
||||||
protected boolean checkCooldown(User user, UUID targetUUID) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
cooldowns.putIfAbsent(user.getUniqueId(), new HashMap<>());
|
cooldowns.putIfAbsent(user.getUniqueId(), new HashMap<>());
|
||||||
|
@ -19,7 +19,7 @@ public class AdminInfoCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.info");
|
setPermission("mod.info");
|
||||||
setOnlyPlayer(false);
|
setOnlyPlayer(false);
|
||||||
setParametersHelp("commands.admin.info.parameters");
|
setParametersHelp("commands.admin.info.parameters");
|
||||||
setDescription("commands.admin.info.description");
|
setDescription("commands.admin.info.description");
|
||||||
|
@ -19,7 +19,7 @@ public class AdminTeamAddCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.team");
|
setPermission("mod.team");
|
||||||
setParametersHelp("commands.admin.team.add.parameters");
|
setParametersHelp("commands.admin.team.add.parameters");
|
||||||
setDescription("commands.admin.team.add.description");
|
setDescription("commands.admin.team.add.description");
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.team");
|
setPermission("mod.team");
|
||||||
setParametersHelp("commands.admin.team.disband.parameters");
|
setParametersHelp("commands.admin.team.disband.parameters");
|
||||||
setDescription("commands.admin.team.disband.description");
|
setDescription("commands.admin.team.disband.description");
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public class AdminTeamKickCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.team");
|
setPermission("mod.team");
|
||||||
setParametersHelp("commands.admin.team.kick.parameters");
|
setParametersHelp("commands.admin.team.kick.parameters");
|
||||||
setDescription("commands.admin.team.kick.description");
|
setDescription("commands.admin.team.kick.description");
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class AdminTeamSetownerCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.team");
|
setPermission("mod.team");
|
||||||
setParametersHelp("commands.admin.team.setowner.parameters");
|
setParametersHelp("commands.admin.team.setowner.parameters");
|
||||||
setDescription("commands.admin.team.setowner.description");
|
setDescription("commands.admin.team.setowner.description");
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public class IslandBanCommand extends CompositeCommand {
|
|||||||
}
|
}
|
||||||
User target = User.getInstance(targetUUID);
|
User target = User.getInstance(targetUUID);
|
||||||
// Cannot ban ops
|
// Cannot ban ops
|
||||||
if (target.hasPermission("admin.noban")) {
|
if (target.hasPermission(getAddon().getPermissionPrefix() + "admin.noban")) {
|
||||||
user.sendMessage("commands.island.ban.cannot-ban");
|
user.sendMessage("commands.island.ban.cannot-ban");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class IslandExpelCommand extends CompositeCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Cannot ban ops
|
// 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);
|
user.sendMessage(CANNOT_EXPEL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user