Check for pay before passing teleport off to essentials.

This commit is contained in:
drtshock 2015-08-07 16:39:07 -05:00
parent 3db1d5fdb3
commit 518eba9e18

View File

@ -101,13 +101,13 @@ public class CmdHome extends FCommand {
} }
} }
// if Essentials teleport handling is enabled and available, pass the teleport off to it (for delay and cooldown) // if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (Essentials.handleTeleport(me, myFaction.getHome())) { if (!payForCommand(Conf.econCostHome, TL.COMMAND_HOME_TOTELEPORT.toString(), TL.COMMAND_HOME_FORTELEPORT.toString())) {
return; return;
} }
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay // if Essentials teleport handling is enabled and available, pass the teleport off to it (for delay and cooldown)
if (!payForCommand(Conf.econCostHome, TL.COMMAND_HOME_TOTELEPORT.toString(), TL.COMMAND_HOME_FORTELEPORT.toString())) { if (Essentials.handleTeleport(me, myFaction.getHome())) {
return; return;
} }