Debug Stick is now replaced by /mmodebug

This commit is contained in:
nossr50
2019-07-02 17:29:33 -07:00
parent 8eeebf63e9
commit 1307169d8b
10 changed files with 86 additions and 21 deletions

View File

@ -2,6 +2,7 @@ package com.gmail.nossr50.util.commands;
import com.gmail.nossr50.commands.*;
import com.gmail.nossr50.commands.admin.McmmoReloadLocaleCommand;
import com.gmail.nossr50.commands.admin.PlayerDebugCommand;
import com.gmail.nossr50.commands.chat.AdminChatCommand;
import com.gmail.nossr50.commands.chat.McChatSpy;
import com.gmail.nossr50.commands.chat.PartyChatCommand;
@ -150,6 +151,15 @@ public final class CommandRegistrationManager {
command.setExecutor(new MmoInfoCommand());
}
private static void registerMmoDebugCommand() {
PluginCommand command = mcMMO.p.getCommand("mmodebug");
command.setDescription(LocaleLoader.getString("Commands.Description.mmodebug"));
command.setPermission(null); //No perm required to save support headaches
command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mmodebug"));
command.setExecutor(new PlayerDebugCommand());
}
private static void registerMcChatSpyCommand() {
PluginCommand command = mcMMO.p.getCommand("mcchatspy");
command.setDescription(LocaleLoader.getString("Commands.Description.mcchatspy"));
@ -413,6 +423,7 @@ public final class CommandRegistrationManager {
public static void registerCommands() {
// Generic Commands
registerMmoInfoCommand();
registerMmoDebugCommand();
registerMcImportCommand();
registerMcabilityCommand();
registerMcgodCommand();

View File

@ -76,6 +76,16 @@ public class NotificationManager {
player.sendMessage(preColoredString);
}
public static void sendPlayerInformationChatOnlyPrefixed(Player player, String key, String... values)
{
if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
return;
String preColoredString = LocaleLoader.getString(key, (Object[]) values);
String prefixFormattedMessage = LocaleLoader.getString("mcMMO.Template.Prefix", preColoredString);
player.sendMessage(prefixFormattedMessage);
}
public static void sendPlayerInformation(Player player, NotificationType notificationType, String key, String... values)
{
if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())