mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-27 18:41:28 +01:00
missed this from checkin oops
This commit is contained in:
parent
962b6848c4
commit
8a1fb88ecd
@ -6,7 +6,6 @@ import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -77,6 +76,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
}
|
||||
|
||||
public void giveMoney(double value)
|
||||
{
|
||||
giveMoney(value, null);
|
||||
}
|
||||
|
||||
public void giveMoney(double value, CommandSender initiator)
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
@ -84,6 +88,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
}
|
||||
setMoney(getMoney() + value);
|
||||
sendMessage(Util.format("addedToAccount", Util.formatCurrency(value)));
|
||||
if (initiator != null)
|
||||
{
|
||||
initiator.sendMessage((Util.format("addedToAccount", Util.formatCurrency(value))));
|
||||
}
|
||||
}
|
||||
|
||||
public void payUser(User reciever, double value) throws Exception
|
||||
@ -106,6 +114,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
}
|
||||
|
||||
public void takeMoney(double value)
|
||||
{
|
||||
takeMoney(value, null);
|
||||
}
|
||||
public void takeMoney(double value, CommandSender initiator)
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
@ -113,6 +125,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
}
|
||||
setMoney(getMoney() - value);
|
||||
sendMessage(Util.format("takenFromAccount", Util.formatCurrency(value)));
|
||||
if (initiator != null)
|
||||
{
|
||||
initiator.sendMessage((Util.format("addedToAccount", Util.formatCurrency(value))));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canAfford(double cost)
|
||||
|
Loading…
Reference in New Issue
Block a user