mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Localize chat commands and /invite
This commit is contained in:
parent
5f4c83b6a1
commit
89da8b832f
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -24,7 +23,7 @@ public class ACommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
PlayerProfile profile;
|
||||
String usage = ChatColor.RED + "Proper usage is /a <message>"; //TODO: Needs more locale.
|
||||
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"a", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">"});
|
||||
|
||||
if (CommandHelper.noCommandPermissions(sender, "mcmmo.chat.adminchat")) {
|
||||
return true;
|
||||
@ -76,7 +75,7 @@ public class ACommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
message = chatEvent.getMessage();
|
||||
String prefix = ChatColor.AQUA + "{" + ChatColor.WHITE + player.getName() + ChatColor.AQUA + "} ";
|
||||
String prefix = LocaleLoader.getString("Commands.AdminChat.Prefix", new Object[] {player.getName()} );
|
||||
|
||||
plugin.getLogger().info("[A]<" + player.getName() + "> " + message);
|
||||
|
||||
@ -95,7 +94,7 @@ public class ACommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
message = chatEvent.getMessage();
|
||||
String prefix = ChatColor.AQUA + "{" + ChatColor.WHITE + "*Console*" + ChatColor.AQUA + "} ";
|
||||
String prefix = LocaleLoader.getString("Commands.AdminChat.Prefix", new Object[] {LocaleLoader.getString("Commands.Chat.Console")} );
|
||||
|
||||
plugin.getLogger().info("[A]<*Console*> " + message);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -24,7 +23,7 @@ public class InviteCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
String usage = ChatColor.RED + "Proper usage is /invite <player>"; //TODO: Needs more locale.
|
||||
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"});
|
||||
|
||||
if (CommandHelper.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -25,7 +24,7 @@ public class PCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
PlayerProfile profile;
|
||||
String usage = ChatColor.RED + "Proper usage is /p <party-name> <message>"; //TODO: Needs more locale.
|
||||
String usage = LocaleLoader.getString("Commands.Usage.2", new Object[] {"p", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">"});
|
||||
|
||||
if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.party")) {
|
||||
return true;
|
||||
@ -83,7 +82,7 @@ public class PCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
message = chatEvent.getMessage();
|
||||
String prefix = ChatColor.GREEN + "(" + ChatColor.WHITE + player.getName() + ChatColor.GREEN + ") ";
|
||||
String prefix = LocaleLoader.getString("Commands.Party.Chat.Prefix", new Object[] {player.getName()} );
|
||||
|
||||
plugin.getLogger().info("[P](" + party.getName() + ")" + "<" + player.getName() + "> " + message);
|
||||
|
||||
@ -120,7 +119,7 @@ public class PCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
message = chatEvent.getMessage();
|
||||
String prefix = ChatColor.GREEN + "(" + ChatColor.WHITE + "*Console*" + ChatColor.GREEN + ") ";
|
||||
String prefix = LocaleLoader.getString("Commands.Party.Chat.Prefix", new Object[] {LocaleLoader.getString("Commands.Chat.Console")} );
|
||||
|
||||
plugin.getLogger().info("[P](" + args[0] + ")" + "<*Console*> " + message);
|
||||
|
||||
|
@ -392,6 +392,7 @@ Commands.AdminChat.Off=Admin Chat only [[RED]]Off
|
||||
Commands.AdminChat.On=Admin Chat only [[GREEN]]On
|
||||
Commands.AdminChat.Prefix=[[AQUA]]{[[WHITE]]{0}[[AQUA]]}
|
||||
Commands.AdminToggle=[[RED]]- Toggle admin chat
|
||||
Commands.Chat.Console=*Console*
|
||||
Commands.Disabled=[[RED]]This command is disabled.
|
||||
Commands.DoesNotExist= [[RED]]Player does not exist in the database!
|
||||
Commands.GodMode.Disabled=[[YELLOW]]mcMMO Godmode Disabled
|
||||
@ -442,6 +443,9 @@ Commands.Stats.Self=YOUR STATS
|
||||
Commands.Stats=[[RED]]- View your mcMMO stats
|
||||
Commands.ToggleAbility=[[RED]]- Toggle ability activation with right click
|
||||
Commands.Usage.1=[[RED]]Proper usage is /{0} {1}
|
||||
Commands.Usage.2=[[RED]]Proper usage is /{0} {1} {2}
|
||||
Commands.Usage.Message=message
|
||||
Commands.Usage.PartyName=party-name
|
||||
Commands.Usage.Player=player
|
||||
mcMMO.NoInvites=[[RED]]You have no invites at this time
|
||||
mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions.
|
||||
|
Loading…
Reference in New Issue
Block a user