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); fme.msg(TL.COMMAND_HOME_TELEPORTDISABLED);
return; 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()) { if (!myFaction.hasHome()) {
fme.msg(TL.COMMAND_HOME_NOHOME.toString() + (fme.getRole().value < Role.MODERATOR.value ? TL.GENERIC_ASKYOURLEADER.toString() : TL.GENERIC_YOUSHOULD.toString())); 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"), SETHOME("sethome"),
TERRITORY("territory"), TERRITORY("territory"),
ACCESS("access"), ACCESS("access"),
HOME("home"),
DISBAND("disband"), DISBAND("disband"),
PROMOTE("promote"), PROMOTE("promote"),
SETWARP("setwarp"), SETWARP("setwarp"),