mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +01: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 java.util.Set;
|
||||||
import net.ess3.api.ITeleport;
|
import net.ess3.api.ITeleport;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
|
||||||
@ -23,12 +24,16 @@ public interface IUser
|
|||||||
void giveMoney(BigDecimal value);
|
void giveMoney(BigDecimal value);
|
||||||
|
|
||||||
void giveMoney(final BigDecimal value, final CommandSource initiator);
|
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 payUser(final User reciever, final BigDecimal value) throws Exception;
|
||||||
|
|
||||||
void takeMoney(BigDecimal value);
|
void takeMoney(BigDecimal value);
|
||||||
|
|
||||||
void takeMoney(final BigDecimal value, final CommandSource initiator);
|
void takeMoney(final BigDecimal value, final CommandSource initiator);
|
||||||
|
@Deprecated
|
||||||
|
void takeMoney(final BigDecimal value, final CommandSender initiator);
|
||||||
|
|
||||||
boolean canAfford(BigDecimal value);
|
boolean canAfford(BigDecimal value);
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ import java.util.logging.Logger;
|
|||||||
import net.ess3.api.IEssentials;
|
import net.ess3.api.IEssentials;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
@ -132,7 +133,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||||||
@Override
|
@Override
|
||||||
public void giveMoney(final BigDecimal value)
|
public void giveMoney(final BigDecimal value)
|
||||||
{
|
{
|
||||||
giveMoney(value, null);
|
giveMoney(value, (CommandSource) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)));
|
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
|
@Override
|
||||||
public void payUser(final User reciever, final BigDecimal value) throws ChargeException
|
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
|
@Override
|
||||||
public void takeMoney(final BigDecimal value)
|
public void takeMoney(final BigDecimal value)
|
||||||
{
|
{
|
||||||
takeMoney(value, null);
|
takeMoney(value, (CommandSource) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)));
|
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
|
@Override
|
||||||
public boolean canAfford(final BigDecimal cost)
|
public boolean canAfford(final BigDecimal cost)
|
||||||
|
Loading…
Reference in New Issue
Block a user