Added /f home permission added to keep players from complaining

This commit is contained in:
Svenja Reissaus 2018-08-02 12:33:51 -03:00
parent 6d397b1cae
commit 40a0d72270
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,14 @@ public class CmdHome extends FCommand {
fme.msg(TL.COMMAND_HOME_TELEPORTDISABLED);
return;
}
f (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.HOME);
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "teleport home");
return;
}
}
if (!myFaction.hasHome()) {
fme.msg(TL.COMMAND_HOME_NOHOME.toString() + (fme.getRole().value < Role.MODERATOR.value ? TL.GENERIC_ASKYOURLEADER.toString() : TL.GENERIC_YOUSHOULD.toString()));

View File

@ -29,6 +29,7 @@ public enum PermissableAction {
SETHOME("sethome"),
TERRITORY("territory"),
ACCESS("access"),
HOME("home"),
DISBAND("disband"),
PROMOTE("promote"),
SETWARP("setwarp"),