mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 11:37:30 +02:00
/balance offline players. Send message to initiator of eco commands
This commit is contained in:
@@ -31,7 +31,7 @@ public class Commandbalance extends EssentialsCommand
|
|||||||
|| !(user.isAuthorized("essentials.balance.others")
|
|| !(user.isAuthorized("essentials.balance.others")
|
||||||
|| user.isAuthorized("essentials.balance.other"))
|
|| user.isAuthorized("essentials.balance.other"))
|
||||||
? user
|
? user
|
||||||
: getPlayer(server, args, 0)).getMoney();
|
: getPlayer(server, args, 0, true)).getMoney();
|
||||||
user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
|
user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,19 +55,15 @@ public class Commandeco extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
User u = ess.getUser(args[1]);
|
User u = getPlayer(server, args, 0, true);
|
||||||
if (u == null)
|
|
||||||
{
|
|
||||||
u = ess.getOfflineUser(args[1]);
|
|
||||||
}
|
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case GIVE:
|
case GIVE:
|
||||||
u.giveMoney(amount);
|
u.giveMoney(amount, sender);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAKE:
|
case TAKE:
|
||||||
u.takeMoney(amount);
|
u.takeMoney(amount, sender);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESET:
|
case RESET:
|
||||||
|
Reference in New Issue
Block a user