2011-10-09 21:57:43 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
2011-10-08 23:22:02 +02:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.Conf;
|
|
|
|
import com.massivecraft.factions.integration.Econ;
|
|
|
|
import com.massivecraft.factions.FPlayer;
|
|
|
|
import com.massivecraft.factions.FPlayers;
|
|
|
|
import com.massivecraft.factions.Faction;
|
|
|
|
import com.massivecraft.factions.Factions;
|
|
|
|
import com.massivecraft.factions.P;
|
2011-10-24 02:33:30 +02:00
|
|
|
import com.massivecraft.factions.struct.FFlag;
|
2011-10-24 01:37:51 +02:00
|
|
|
import com.massivecraft.factions.struct.FPerm;
|
2011-10-23 17:30:41 +02:00
|
|
|
import com.massivecraft.factions.struct.Rel;
|
2011-10-08 23:22:02 +02:00
|
|
|
import com.massivecraft.factions.zcore.MCommand;
|
|
|
|
|
|
|
|
|
|
|
|
public abstract class FCommand extends MCommand<P>
|
|
|
|
{
|
2011-10-09 21:57:43 +02:00
|
|
|
public boolean disableOnLock;
|
2011-10-08 23:22:02 +02:00
|
|
|
|
|
|
|
public FPlayer fme;
|
2011-10-09 18:35:39 +02:00
|
|
|
public Faction myFaction;
|
2011-10-08 23:22:02 +02:00
|
|
|
public boolean senderMustBeMember;
|
2011-10-23 17:55:53 +02:00
|
|
|
public boolean senderMustBeOfficer;
|
|
|
|
public boolean senderMustBeLeader;
|
2011-10-08 23:22:02 +02:00
|
|
|
|
2011-10-13 14:41:07 +02:00
|
|
|
public boolean isMoneyCommand;
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
public FCommand()
|
|
|
|
{
|
|
|
|
super(P.p);
|
2011-10-09 21:57:43 +02:00
|
|
|
|
|
|
|
// Due to safety reasons it defaults to disable on lock.
|
|
|
|
disableOnLock = true;
|
|
|
|
|
2011-10-13 14:41:07 +02:00
|
|
|
// The money commands must be disabled if money should not be used.
|
|
|
|
isMoneyCommand = false;
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
senderMustBeMember = false;
|
2011-10-23 17:55:53 +02:00
|
|
|
senderMustBeOfficer = false;
|
|
|
|
senderMustBeLeader = false;
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void execute(CommandSender sender, List<String> args, List<MCommand<?>> commandChain)
|
|
|
|
{
|
|
|
|
if (sender instanceof Player)
|
|
|
|
{
|
|
|
|
this.fme = FPlayers.i.get((Player)sender);
|
2011-10-09 18:35:39 +02:00
|
|
|
this.myFaction = this.fme.getFaction();
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
this.fme = null;
|
2011-10-09 18:35:39 +02:00
|
|
|
this.myFaction = null;
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
super.execute(sender, args, commandChain);
|
|
|
|
}
|
|
|
|
|
2011-10-09 21:57:43 +02:00
|
|
|
@Override
|
|
|
|
public boolean isEnabled()
|
|
|
|
{
|
|
|
|
if (p.getLocked() && this.disableOnLock)
|
|
|
|
{
|
2011-10-10 13:40:24 +02:00
|
|
|
msg("<b>Factions was locked by an admin. Please try again later.");
|
2011-10-09 21:57:43 +02:00
|
|
|
return false;
|
|
|
|
}
|
2011-10-13 14:41:07 +02:00
|
|
|
|
|
|
|
if (this.isMoneyCommand && ! Conf.econEnabled)
|
|
|
|
{
|
2011-10-16 16:11:29 +02:00
|
|
|
msg("<b>Faction economy features are disabled on this server.");
|
2011-10-13 14:41:07 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-10-13 16:07:07 +02:00
|
|
|
if (this.isMoneyCommand && ! Conf.bankEnabled)
|
2011-10-13 14:41:07 +02:00
|
|
|
{
|
2011-10-16 16:11:29 +02:00
|
|
|
msg("<b>The faction bank system is disabled on this server.");
|
2011-10-13 14:41:07 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-10-09 21:57:43 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
@Override
|
|
|
|
public boolean validSenderType(CommandSender sender, boolean informSenderIfNot)
|
|
|
|
{
|
|
|
|
boolean superValid = super.validSenderType(sender, informSenderIfNot);
|
|
|
|
if ( ! superValid) return false;
|
|
|
|
|
2011-10-23 17:55:53 +02:00
|
|
|
if ( ! (this.senderMustBeMember || this.senderMustBeOfficer || this.senderMustBeLeader)) return true;
|
2011-10-08 23:22:02 +02:00
|
|
|
|
|
|
|
if ( ! (sender instanceof Player)) return false;
|
|
|
|
|
|
|
|
FPlayer fplayer = FPlayers.i.get((Player)sender);
|
|
|
|
|
|
|
|
if ( ! fplayer.hasFaction())
|
|
|
|
{
|
|
|
|
sender.sendMessage(p.txt.parse("<b>You are not member of any faction."));
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-10-23 17:55:53 +02:00
|
|
|
if (this.senderMustBeOfficer && ! fplayer.getRole().isAtLeast(Rel.OFFICER))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
2011-10-09 14:53:38 +02:00
|
|
|
sender.sendMessage(p.txt.parse("<b>Only faction moderators can %s.", this.getHelpShort()));
|
2011-10-08 23:22:02 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-10-23 17:55:53 +02:00
|
|
|
if (this.senderMustBeLeader && ! fplayer.getRole().isAtLeast(Rel.LEADER))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
2011-10-09 14:53:38 +02:00
|
|
|
sender.sendMessage(p.txt.parse("<b>Only faction admins can %s.", this.getHelpShort()));
|
2011-10-08 23:22:02 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-10-09 14:53:38 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// Assertions
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean assertHasFaction()
|
|
|
|
{
|
|
|
|
if (me == null) return true;
|
|
|
|
|
|
|
|
if ( ! fme.hasFaction())
|
|
|
|
{
|
|
|
|
sendMessage("You are not member of any faction.");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-10-23 17:30:41 +02:00
|
|
|
public boolean assertMinRole(Rel role)
|
2011-10-09 14:53:38 +02:00
|
|
|
{
|
|
|
|
if (me == null) return true;
|
|
|
|
|
2011-10-24 11:07:06 +02:00
|
|
|
if (fme.getRole().isLessThan(role))
|
2011-10-09 14:53:38 +02:00
|
|
|
{
|
2011-10-10 13:40:24 +02:00
|
|
|
msg("<b>You <h>must be "+role+"<b> to "+this.getHelpShort()+".");
|
2011-10-09 14:53:38 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// Argument Readers
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2011-10-22 14:39:01 +02:00
|
|
|
// FPLAYER ======================
|
|
|
|
public FPlayer strAsFPlayer(String name, FPlayer def, boolean msg)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
FPlayer ret = def;
|
|
|
|
|
|
|
|
if (name != null)
|
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
FPlayer fplayer = FPlayers.i.get(name);
|
2011-10-08 23:22:02 +02:00
|
|
|
if (fplayer != null)
|
|
|
|
{
|
|
|
|
ret = fplayer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (msg && ret == null)
|
|
|
|
{
|
2011-10-25 08:27:58 +02:00
|
|
|
this.msg("<b>No player \"<p>%s<b>\" could be found.", name);
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2011-10-22 14:39:01 +02:00
|
|
|
public FPlayer argAsFPlayer(int idx, FPlayer def, boolean msg)
|
|
|
|
{
|
|
|
|
return this.strAsFPlayer(this.argAsString(idx), def, msg);
|
|
|
|
}
|
2011-10-08 23:22:02 +02:00
|
|
|
public FPlayer argAsFPlayer(int idx, FPlayer def)
|
|
|
|
{
|
|
|
|
return this.argAsFPlayer(idx, def, true);
|
|
|
|
}
|
|
|
|
public FPlayer argAsFPlayer(int idx)
|
|
|
|
{
|
|
|
|
return this.argAsFPlayer(idx, null);
|
|
|
|
}
|
|
|
|
|
2011-10-22 14:39:01 +02:00
|
|
|
// BEST FPLAYER MATCH ======================
|
|
|
|
public FPlayer strAsBestFPlayerMatch(String name, FPlayer def, boolean msg)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
FPlayer ret = def;
|
|
|
|
|
|
|
|
if (name != null)
|
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
FPlayer fplayer = FPlayers.i.getBestIdMatch(name);
|
2011-10-08 23:22:02 +02:00
|
|
|
if (fplayer != null)
|
|
|
|
{
|
|
|
|
ret = fplayer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (msg && ret == null)
|
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
this.msg("<b>No player match found for \"<p>%s<b>\".", name);
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2011-10-22 14:39:01 +02:00
|
|
|
public FPlayer argAsBestFPlayerMatch(int idx, FPlayer def, boolean msg)
|
|
|
|
{
|
|
|
|
return this.strAsBestFPlayerMatch(this.argAsString(idx), def, msg);
|
|
|
|
}
|
2011-10-08 23:22:02 +02:00
|
|
|
public FPlayer argAsBestFPlayerMatch(int idx, FPlayer def)
|
|
|
|
{
|
|
|
|
return this.argAsBestFPlayerMatch(idx, def, true);
|
|
|
|
}
|
|
|
|
public FPlayer argAsBestFPlayerMatch(int idx)
|
|
|
|
{
|
|
|
|
return this.argAsBestFPlayerMatch(idx, null);
|
|
|
|
}
|
|
|
|
|
2011-10-22 14:39:01 +02:00
|
|
|
// FACTION ======================
|
|
|
|
public Faction strAsFaction(String name, Faction def, boolean msg)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
Faction ret = def;
|
|
|
|
|
|
|
|
if (name != null)
|
|
|
|
{
|
2011-10-22 17:42:13 +02:00
|
|
|
Faction faction = null;
|
2011-10-22 14:39:01 +02:00
|
|
|
|
2011-10-22 17:42:13 +02:00
|
|
|
// First we try an exact match
|
|
|
|
if (faction == null)
|
|
|
|
{
|
|
|
|
faction = Factions.i.getByTag(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Next we match faction tags
|
|
|
|
if (faction == null)
|
|
|
|
{
|
|
|
|
faction = Factions.i.getBestTagMatch(name);
|
|
|
|
}
|
|
|
|
|
2011-10-22 14:39:01 +02:00
|
|
|
// Next we match player names
|
|
|
|
if (faction == null)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
FPlayer fplayer = FPlayers.i.getBestIdMatch(name);
|
|
|
|
if (fplayer != null)
|
|
|
|
{
|
|
|
|
faction = fplayer.getFaction();
|
|
|
|
}
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
2011-10-22 14:39:01 +02:00
|
|
|
|
|
|
|
if (faction != null)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
ret = faction;
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (msg && ret == null)
|
|
|
|
{
|
2011-10-22 14:39:01 +02:00
|
|
|
this.msg("<b>The faction or player \"<p>%s<b>\" could not be found.", name);
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2011-10-22 14:39:01 +02:00
|
|
|
public Faction argAsFaction(int idx, Faction def, boolean msg)
|
|
|
|
{
|
|
|
|
return this.strAsFaction(this.argAsString(idx), def, msg);
|
|
|
|
}
|
2011-10-08 23:22:02 +02:00
|
|
|
public Faction argAsFaction(int idx, Faction def)
|
|
|
|
{
|
|
|
|
return this.argAsFaction(idx, def, true);
|
|
|
|
}
|
|
|
|
public Faction argAsFaction(int idx)
|
|
|
|
{
|
|
|
|
return this.argAsFaction(idx, null);
|
|
|
|
}
|
|
|
|
|
2011-10-23 20:50:49 +02:00
|
|
|
// FACTION FLAG ======================
|
2011-10-24 02:33:30 +02:00
|
|
|
public FFlag strAsFactionFlag(String name, FFlag def, boolean msg)
|
2011-10-23 20:50:49 +02:00
|
|
|
{
|
2011-10-24 02:33:30 +02:00
|
|
|
FFlag ret = def;
|
2011-10-23 20:50:49 +02:00
|
|
|
|
|
|
|
if (name != null)
|
|
|
|
{
|
2011-10-24 02:33:30 +02:00
|
|
|
FFlag flag = FFlag.parse(name);
|
2011-10-23 20:50:49 +02:00
|
|
|
if (flag != null)
|
|
|
|
{
|
|
|
|
ret = flag;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (msg && ret == null)
|
|
|
|
{
|
|
|
|
this.msg("<b>The faction-flag \"<p>%s<b>\" could not be found.", name);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2011-10-24 02:33:30 +02:00
|
|
|
public FFlag argAsFactionFlag(int idx, FFlag def, boolean msg)
|
2011-10-23 20:50:49 +02:00
|
|
|
{
|
|
|
|
return this.strAsFactionFlag(this.argAsString(idx), def, msg);
|
|
|
|
}
|
2011-10-24 02:33:30 +02:00
|
|
|
public FFlag argAsFactionFlag(int idx, FFlag def)
|
2011-10-23 20:50:49 +02:00
|
|
|
{
|
|
|
|
return this.argAsFactionFlag(idx, def, true);
|
|
|
|
}
|
2011-10-24 02:33:30 +02:00
|
|
|
public FFlag argAsFactionFlag(int idx)
|
2011-10-23 20:50:49 +02:00
|
|
|
{
|
|
|
|
return this.argAsFactionFlag(idx, null);
|
|
|
|
}
|
|
|
|
|
2011-10-23 23:17:02 +02:00
|
|
|
// FACTION PERM ======================
|
2011-10-24 01:37:51 +02:00
|
|
|
public FPerm strAsFactionPerm(String name, FPerm def, boolean msg)
|
2011-10-23 23:17:02 +02:00
|
|
|
{
|
2011-10-24 01:37:51 +02:00
|
|
|
FPerm ret = def;
|
2011-10-23 23:17:02 +02:00
|
|
|
|
|
|
|
if (name != null)
|
|
|
|
{
|
2011-10-24 01:37:51 +02:00
|
|
|
FPerm perm = FPerm.parse(name);
|
2011-10-23 23:17:02 +02:00
|
|
|
if (perm != null)
|
|
|
|
{
|
|
|
|
ret = perm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (msg && ret == null)
|
|
|
|
{
|
|
|
|
this.msg("<b>The faction-perm \"<p>%s<b>\" could not be found.", name);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2011-10-24 01:37:51 +02:00
|
|
|
public FPerm argAsFactionPerm(int idx, FPerm def, boolean msg)
|
2011-10-23 23:17:02 +02:00
|
|
|
{
|
|
|
|
return this.strAsFactionPerm(this.argAsString(idx), def, msg);
|
|
|
|
}
|
2011-10-24 01:37:51 +02:00
|
|
|
public FPerm argAsFactionPerm(int idx, FPerm def)
|
2011-10-23 23:17:02 +02:00
|
|
|
{
|
|
|
|
return this.argAsFactionPerm(idx, def, true);
|
|
|
|
}
|
2011-10-24 01:37:51 +02:00
|
|
|
public FPerm argAsFactionPerm(int idx)
|
2011-10-23 23:17:02 +02:00
|
|
|
{
|
|
|
|
return this.argAsFactionPerm(idx, null);
|
|
|
|
}
|
|
|
|
|
2011-10-23 20:50:49 +02:00
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
// -------------------------------------------- //
|
|
|
|
// Commonly used logic
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public boolean canIAdministerYou(FPlayer i, FPlayer you)
|
|
|
|
{
|
|
|
|
if ( ! i.getFaction().equals(you.getFaction()))
|
|
|
|
{
|
2011-10-21 19:20:33 +02:00
|
|
|
i.sendMessage(p.txt.parse("%s <b>is not in the same faction as you.",you.describeTo(i, true)));
|
2011-10-08 23:22:02 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2011-10-24 11:07:06 +02:00
|
|
|
if (i.getRole().isMoreThan(you.getRole()) || i.getRole().equals(Rel.LEADER) )
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-10-23 17:30:41 +02:00
|
|
|
if (you.getRole().equals(Rel.LEADER))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
i.sendMessage(p.txt.parse("<b>Only the faction admin can do that."));
|
|
|
|
}
|
2011-10-23 17:30:41 +02:00
|
|
|
else if (i.getRole().equals(Rel.OFFICER))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
if ( i == you )
|
|
|
|
{
|
|
|
|
return true; //Moderators can control themselves
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i.sendMessage(p.txt.parse("<b>Moderators can't control each other..."));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i.sendMessage(p.txt.parse("<b>You must be a faction moderator to do that."));
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// if economy is enabled and they're not on the bypass list, make 'em pay; returns true unless person can't afford the cost
|
2011-10-12 18:48:47 +02:00
|
|
|
public boolean payForCommand(double cost, String toDoThis, String forDoingThis)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
2011-10-25 21:18:08 +02:00
|
|
|
if ( ! Econ.shouldBeUsed() || this.fme == null || cost == 0.0 || fme.hasAdminMode()) return true;
|
2011-10-08 23:22:02 +02:00
|
|
|
|
2011-11-11 20:10:18 +01:00
|
|
|
if(Conf.bankEnabled && Conf.bankFactionPaysCosts && fme.hasFaction())
|
2011-10-12 17:25:01 +02:00
|
|
|
{
|
2011-10-12 18:48:47 +02:00
|
|
|
if ( ! Econ.modifyMoney(myFaction, -cost, toDoThis, forDoingThis)) return false;
|
2011-10-12 17:25:01 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-12 18:48:47 +02:00
|
|
|
if ( ! Econ.modifyMoney(fme, -cost, toDoThis, forDoingThis)) return false;
|
2011-10-12 17:25:01 +02:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
|
|
|
|
// pay up
|
|
|
|
if (cost > 0.0)
|
|
|
|
{
|
|
|
|
String costString = Econ.moneyString(cost);
|
|
|
|
if(Conf.bankFactionPaysCosts && fme.hasFaction() )
|
|
|
|
{
|
2011-10-12 17:25:01 +02:00
|
|
|
if( ! faction.getAccount().subtract(cost))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
sendMessage("It costs "+costString+" to "+desc+", which your faction can't currently afford.");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sendMessage(faction.getTag()+" has paid "+costString+" to "+desc+".");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-12 17:25:01 +02:00
|
|
|
if ( ! Econ.deductMoney(fme.getName(), cost))
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
sendMessage("It costs "+costString+" to "+desc+", which you can't currently afford.");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
sendMessage("You have paid "+costString+" to "+desc+".");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// wait... we pay you to use this command?
|
|
|
|
else
|
|
|
|
{
|
|
|
|
String costString = Econ.moneyString(-cost);
|
|
|
|
|
|
|
|
if(Conf.bankFactionPaysCosts && fme.hasFaction() )
|
|
|
|
{
|
2011-10-12 17:25:01 +02:00
|
|
|
faction.getAccount().add(-cost);
|
2011-10-08 23:22:02 +02:00
|
|
|
sendMessage(faction.getTag()+" has been paid "+costString+" to "+desc+".");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-09 14:53:38 +02:00
|
|
|
Econ.addMoney(fme.getName(), -cost);
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sendMessage("You have been paid "+costString+" to "+desc+".");
|
|
|
|
}
|
2011-10-12 17:25:01 +02:00
|
|
|
return true;*/
|
2011-10-08 23:22:02 +02:00
|
|
|
}
|
|
|
|
}
|