mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-05 00:23:22 +01:00
Fix perms in promote
This commit is contained in:
parent
db8bece127
commit
2675ae1760
@ -52,6 +52,13 @@ public class FPromoteCommand extends FCommand {
|
|||||||
|
|
||||||
Role current = target.getRole();
|
Role current = target.getRole();
|
||||||
Role promotion = Role.getRelative(current, +relative);
|
Role promotion = Role.getRelative(current, +relative);
|
||||||
|
|
||||||
|
// Don't allow people to control people that are below them.
|
||||||
|
if (current.value >= fme.getRole().value) {
|
||||||
|
fme.msg(TL.COMMAND_PROMOTE_NOT_ALLOWED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (promotion == null) {
|
if (promotion == null) {
|
||||||
fme.msg(TL.COMMAND_PROMOTE_NOTTHATPLAYER);
|
fme.msg(TL.COMMAND_PROMOTE_NOTTHATPLAYER);
|
||||||
return;
|
return;
|
||||||
|
@ -429,6 +429,7 @@ public enum TL {
|
|||||||
COMMAND_PROMOTE_WRONGFACTION("%1$s is not part of your faction."),
|
COMMAND_PROMOTE_WRONGFACTION("%1$s is not part of your faction."),
|
||||||
COMMAND_NOACCESS("You don't have access to that."),
|
COMMAND_NOACCESS("You don't have access to that."),
|
||||||
COMMAND_PROMOTE_NOTTHATPLAYER("That player cannot be promoted."),
|
COMMAND_PROMOTE_NOTTHATPLAYER("That player cannot be promoted."),
|
||||||
|
COMMAND_PROMOTE_NOT_ALLOWED("You can't promote or demote that player."),
|
||||||
|
|
||||||
COMMAND_POWER_TOSHOW("to show player power info"),
|
COMMAND_POWER_TOSHOW("to show player power info"),
|
||||||
COMMAND_POWER_FORSHOW("for showing player power info"),
|
COMMAND_POWER_FORSHOW("for showing player power info"),
|
||||||
|
Loading…
Reference in New Issue
Block a user