~ Now sends message to the other player too on token change (command). Closes #56.
This commit is contained in:
parent
fa7f786d3b
commit
a8516aa665
@ -47,6 +47,10 @@ public class CMDtokens extends DefaultCMD {
|
||||
+ playerName);
|
||||
return true;
|
||||
}
|
||||
String name = "\u00A78Console";
|
||||
if (player != null) {
|
||||
name = player.getName();
|
||||
}
|
||||
|
||||
if (option.equalsIgnoreCase("set")) {
|
||||
W.shop.getFile().set(tokenPlayer.getName() + ".tokens", amount);
|
||||
@ -54,6 +58,10 @@ public class CMDtokens extends DefaultCMD {
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Set", "playername-" + tokenPlayer.getName(),
|
||||
"option2-to", "amount-" + amount);
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChangedPerson, "option-set",
|
||||
"playername-" + name, "option2-to",
|
||||
"amount-" + amount);
|
||||
} else if (option.equalsIgnoreCase("add")) {
|
||||
int tokens = 0;
|
||||
if (W.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
|
||||
@ -66,6 +74,10 @@ public class CMDtokens extends DefaultCMD {
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Added", "playername-" + tokenPlayer.getName(),
|
||||
"option2-to", "amount-" + amount);
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChangedPerson, "option-added",
|
||||
"playername-" + name, "option2-to",
|
||||
"amount-" + amount);
|
||||
} else if (option.equalsIgnoreCase("take")) {
|
||||
int tokens = 0;
|
||||
if (W.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
|
||||
@ -78,6 +90,10 @@ public class CMDtokens extends DefaultCMD {
|
||||
MessageM.sendFMessage(player, ConfigC.normal_tokensChanged,
|
||||
"option-Took", "playername-" + tokenPlayer.getName(),
|
||||
"option2-from", "amount-" + amount);
|
||||
MessageM.sendFMessage(tokenPlayer,
|
||||
ConfigC.normal_tokensChangedPerson, "option-took",
|
||||
"playername-" + name, "option2-from",
|
||||
"amount-" + amount);
|
||||
} else {
|
||||
MessageM.sendFMessage(player,
|
||||
ConfigC.error_tokensUnknownsetting, "option-" + option);
|
||||
|
@ -165,6 +165,8 @@ public enum ConfigC {
|
||||
normal_removeRemovedArena ("%TAG%NRemoved arena '%A%name%%N'!", W.messages),
|
||||
normal_tokensChanged ("%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%N.",
|
||||
W.messages),
|
||||
normal_tokensChangedPerson ("%TAG%NPlayer %A%playername%%N %N%option% %A%amount%%N %option2% your tokens.",
|
||||
W.messages),
|
||||
normal_ingameNowSolid ("%TAG%NYou're now a solid '%A%block%%N' block!",
|
||||
W.messages),
|
||||
normal_ingameNoMoreSolid ("%TAG%NYou're no longer a solid block!",
|
||||
|
Loading…
x
Reference in New Issue
Block a user