* Fixed bug message being sent to wrong player.
This commit is contained in:
parent
1697351805
commit
8d1e2cc705
@ -51,10 +51,9 @@ public class CMDtokens extends DefaultCMD {
|
||||
if (option.equalsIgnoreCase("set")) {
|
||||
W.shop.getFile().set(tokenPlayer.getName() + ".tokens", amount);
|
||||
W.shop.save();
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChanged, "option-Set",
|
||||
"playername-" + tokenPlayer.getName(), "option2-to",
|
||||
"amount-" + amount);
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Set", "playername-" + tokenPlayer.getName(),
|
||||
"option2-to", "amount-" + amount);
|
||||
} else if (option.equalsIgnoreCase("add")) {
|
||||
int tokens = 0;
|
||||
if (W.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
|
||||
@ -64,10 +63,9 @@ public class CMDtokens extends DefaultCMD {
|
||||
W.shop.getFile().set(tokenPlayer.getName() + ".tokens",
|
||||
tokens + amount);
|
||||
W.shop.save();
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChanged, "option-Added",
|
||||
"playername-" + tokenPlayer.getName(), "option2-to",
|
||||
"amount-" + amount);
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Added", "playername-" + tokenPlayer.getName(),
|
||||
"option2-to", "amount-" + amount);
|
||||
} else if (option.equalsIgnoreCase("take")) {
|
||||
int tokens = 0;
|
||||
if (W.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
|
||||
@ -77,10 +75,9 @@ public class CMDtokens extends DefaultCMD {
|
||||
W.shop.getFile().set(tokenPlayer.getName() + ".tokens",
|
||||
tokens - amount);
|
||||
W.shop.save();
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChanged, "option-Took",
|
||||
"playername-" + tokenPlayer.getName(), "option2-from",
|
||||
"amount-" + amount);
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Took", "playername-" + tokenPlayer.getName(),
|
||||
"option2-from", "amount-" + amount);
|
||||
} else {
|
||||
MessageM.sendFMessage(player,
|
||||
ConfigC.error_tokensUnknownsetting, "option-" + option);
|
||||
|
Loading…
x
Reference in New Issue
Block a user