Home Fix & Version Change

This commit is contained in:
Driftay 2020-01-19 03:40:30 -05:00
parent 417cc57aa7
commit ce1eedd7cd
2 changed files with 12 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.massivecraft</groupId> <groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId> <artifactId>Factions</artifactId>
<version>1.6.9.5-2.2.6-RC</version> <version>1.6.9.5-2.2.7-RC</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>SaberFactions</name> <name>SaberFactions</name>

View File

@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.*; import com.massivecraft.factions.*;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.PermissableAction; import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
@ -43,6 +44,16 @@ public class CmdSethome extends FCommand {
return; return;
} }
if (!context.args.isEmpty()) {
Faction target = context.argAsFaction(0);
if (target == null) return;
context.faction = target;
if (target.getAccess(context.fPlayer, PermissableAction.SETHOME) != Access.ALLOW) {
context.fPlayer.msg(TL.GENERIC_FPERM_NOPERMISSION, "set faction home");
return;
}
}
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay // if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!context.payForCommand(Conf.econCostSethome, TL.COMMAND_SETHOME_TOSET, TL.COMMAND_SETHOME_FORSET)) { if (!context.payForCommand(Conf.econCostSethome, TL.COMMAND_SETHOME_TOSET, TL.COMMAND_SETHOME_FORSET)) {
return; return;