mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-22 19:31:54 +00:00
Restore original give/take Money API
This commit is contained in:
parent
1164bbd90d
commit
92a9673652
|
@ -7,6 +7,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import net.ess3.api.ITeleport;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
||||
|
@ -23,12 +24,16 @@ public interface IUser
|
|||
void giveMoney(BigDecimal value);
|
||||
|
||||
void giveMoney(final BigDecimal value, final CommandSource initiator);
|
||||
@Deprecated
|
||||
void giveMoney(final BigDecimal value, final CommandSender initiator);
|
||||
|
||||
void payUser(final User reciever, final BigDecimal value) throws Exception;
|
||||
|
||||
void takeMoney(BigDecimal value);
|
||||
|
||||
void takeMoney(final BigDecimal value, final CommandSource initiator);
|
||||
@Deprecated
|
||||
void takeMoney(final BigDecimal value, final CommandSender initiator);
|
||||
|
||||
boolean canAfford(BigDecimal value);
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.logging.Logger;
|
|||
import net.ess3.api.IEssentials;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
@ -132,7 +133,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||
@Override
|
||||
public void giveMoney(final BigDecimal value)
|
||||
{
|
||||
giveMoney(value, null);
|
||||
giveMoney(value, (CommandSource) null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -149,6 +150,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||
initiator.sendMessage(_("addedToOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void giveMoney(final BigDecimal value, final CommandSender initiator)
|
||||
{
|
||||
giveMoney(value, new CommandSource(initiator));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void payUser(final User reciever, final BigDecimal value) throws ChargeException
|
||||
|
@ -173,7 +181,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||
@Override
|
||||
public void takeMoney(final BigDecimal value)
|
||||
{
|
||||
takeMoney(value, null);
|
||||
takeMoney(value, (CommandSource) null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -190,6 +198,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||
initiator.sendMessage(_("takenFromOthersAccount", NumberUtil.displayCurrency(value, ess), this.getDisplayName(), NumberUtil.displayCurrency(getMoney(), ess)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void takeMoney(final BigDecimal value, final CommandSender initiator)
|
||||
{
|
||||
takeMoney(value, new CommandSource(initiator));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAfford(final BigDecimal cost)
|
||||
|
|
Loading…
Reference in a new issue