Fixed Indents on all files using the reformat option and optimized imports
This commit is contained in:
@@ -9,51 +9,51 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdUnban extends FCommand {
|
||||
|
||||
public CmdUnban() {
|
||||
super();
|
||||
this.aliases.add("unban");
|
||||
public CmdUnban() {
|
||||
super();
|
||||
this.aliases.add("unban");
|
||||
|
||||
this.requiredArgs.add("target");
|
||||
this.requiredArgs.add("target");
|
||||
|
||||
this.permission = Permission.BAN.node;
|
||||
this.disableOnLock = true;
|
||||
this.permission = Permission.BAN.node;
|
||||
this.disableOnLock = true;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = false;
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = false;
|
||||
|
||||
senderMustBeAdmin = false;
|
||||
}
|
||||
senderMustBeAdmin = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!fme.isAdminBypassing()) {
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.BAN);
|
||||
if (access != Access.ALLOW && fme.getRole() != Role.LEADER && !Permission.BAN.has(sender, true)) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "manage bans");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!fme.isAdminBypassing()) {
|
||||
Access access = myFaction.getAccess(fme, PermissableAction.BAN);
|
||||
if (access != Access.ALLOW && fme.getRole() != Role.LEADER && !Permission.BAN.has(sender, true)) {
|
||||
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "manage bans");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Good on permission checks. Now lets just ban the player.
|
||||
FPlayer target = argAsFPlayer(0);
|
||||
if (target == null) {
|
||||
return; // the above method sends a message if fails to find someone.
|
||||
}
|
||||
// Good on permission checks. Now lets just ban the player.
|
||||
FPlayer target = argAsFPlayer(0);
|
||||
if (target == null) {
|
||||
return; // the above method sends a message if fails to find someone.
|
||||
}
|
||||
|
||||
if (!myFaction.isBanned(target)) {
|
||||
fme.msg(TL.COMMAND_UNBAN_NOTBANNED, target.getName());
|
||||
return;
|
||||
}
|
||||
if (!myFaction.isBanned(target)) {
|
||||
fme.msg(TL.COMMAND_UNBAN_NOTBANNED, target.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
myFaction.unban(target);
|
||||
myFaction.unban(target);
|
||||
|
||||
myFaction.msg(TL.COMMAND_UNBAN_UNBANNED, fme.getName(), target.getName());
|
||||
target.msg(TL.COMMAND_UNBAN_TARGET, myFaction.getTag(target));
|
||||
}
|
||||
myFaction.msg(TL.COMMAND_UNBAN_UNBANNED, fme.getName(), target.getName());
|
||||
target.msg(TL.COMMAND_UNBAN_TARGET, myFaction.getTag(target));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_UNBAN_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_UNBAN_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user