Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 40a0d72

Browse files
author
Svenja Reissaus
committed
Added /f home permission added to keep players from complaining
1 parent 6d397b1 commit 40a0d72

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/com/massivecraft/factions/cmd/CmdHome.java

+8
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ public void perform() {
4747
fme.msg(TL.COMMAND_HOME_TELEPORTDISABLED);
4848
return;
4949
}
50+
f (!fme.isAdminBypassing()) {
51+
Access access = myFaction.getAccess(fme, PermissableAction.HOME);
52+
if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
53+
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "teleport home");
54+
return;
55+
}
56+
}
57+
5058

5159
if (!myFaction.hasHome()) {
5260
fme.msg(TL.COMMAND_HOME_NOHOME.toString() + (fme.getRole().value < Role.MODERATOR.value ? TL.GENERIC_ASKYOURLEADER.toString() : TL.GENERIC_YOUSHOULD.toString()));

src/main/java/com/massivecraft/factions/zcore/fperms/PermissableAction.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public enum PermissableAction {
2929
SETHOME("sethome"),
3030
TERRITORY("territory"),
3131
ACCESS("access"),
32+
HOME("home"),
3233
DISBAND("disband"),
3334
PROMOTE("promote"),
3435
SETWARP("setwarp"),

0 commit comments

Comments
 (0)