Add TL for commands. Resolves #162. Supercedes #97.

This commit is contained in:
korikisulda
2014-12-07 23:12:52 +00:00
committed by drtshock
parent bd8f572cbf
commit 1230803cfb
64 changed files with 864 additions and 318 deletions

View File

@@ -4,6 +4,8 @@ import com.massivecraft.factions.*;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.zcore.MCommand;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
@@ -274,6 +276,10 @@ public abstract class FCommand extends MCommand<P> {
return Econ.modifyMoney(fme, -cost, toDoThis, forDoingThis);
}
}
public boolean payForCommand(double cost,TL toDoThis,TL forDoingThis){
return payForCommand(cost,toDoThis.toString(),forDoingThis.toString());
}
// like above, but just make sure they can pay; returns true unless person can't afford the cost
public boolean canAffordCommand(double cost, String toDoThis) {