mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +01:00
Balance others message.
This commit is contained in:
parent
3356db080a
commit
8777410d30
@ -21,18 +21,25 @@ public class Commandbalance extends EssentialsCommand
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true, true).getMoney(), ess)));
|
||||
|
||||
User target = getPlayer(server, args, 0, true, true);
|
||||
sender.sendMessage(_("balanceOther", target.getDisplayName(), Util.displayCurrency(target.getMoney(), ess)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
//TODO: Remove 'other' perm
|
||||
final double bal = (args.length < 1
|
||||
|| !(user.isAuthorized("essentials.balance.others")
|
||||
|| user.isAuthorized("essentials.balance.other"))
|
||||
? user
|
||||
: getPlayer(server, args, 0, true, true)).getMoney();
|
||||
user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
|
||||
|
||||
if (args.length < 1 || !user.isAuthorized("essentials.balance.others"))
|
||||
{
|
||||
final double bal = user.getMoney();
|
||||
user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
|
||||
}
|
||||
else
|
||||
{
|
||||
final User target = getPlayer(server, args, 0, true, true);
|
||||
final double bal = target.getMoney();
|
||||
user.sendMessage(_("balanceOther", target.getDisplayName(), Util.displayCurrency(bal, ess)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -526,3 +526,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a77Graczowi\u00a7c {0} \u00a77 odbanowano IP: {1}.
|
||||
playerBanIpAddress=\u00a77Gracz\u00a7c {0} \u00a77zostal zbanowany na adres IP {1}\u00a77.
|
||||
noPotionEffectPerm=\u00a74Nie masz praw by dodac efekt \u00a7c{0} \u00a74tej miksturze.
|
||||
invalidPotionMeta=\u00a74Niepoprawna wartosc mikstury: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
|
||||
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
|
||||
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
|
||||
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
|
||||
balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
|
||||
|
Loading…
Reference in New Issue
Block a user