Renamed a lot of Command classes

This commit is contained in:
nossr50 2019-07-02 19:19:43 -07:00
parent 57b7050a2c
commit a9207b6f38
25 changed files with 91 additions and 84 deletions

View File

@ -5,11 +5,11 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
public class McabilityCommand extends ToggleCommand {
public class AbilityToggleCommand extends ToggleCommand {
private mcMMO pluginRef;
public McabilityCommand(mcMMO pluginRef) {
public AbilityToggleCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -11,11 +11,11 @@ import org.bukkit.entity.Player;
import java.util.List;
public class McnotifyCommand implements TabExecutor {
public class ChatNotificationToggleCommand implements TabExecutor {
private mcMMO pluginRef;
public McnotifyCommand(mcMMO pluginRef) {
public ChatNotificationToggleCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -17,16 +17,16 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class McconvertCommand implements TabExecutor {
public class ConvertCommand implements TabExecutor {
private List<String> FORMULA_TYPES;
private List<String> DATABASE_TYPES;
private final List<String> SUBCOMMANDS = ImmutableList.of("database", "experience");
private final List<String> CONVERSION_SUBCOMMANDS = ImmutableList.of("database", "experience");
private CommandExecutor databaseConvertCommand;
private CommandExecutor experienceConvertCommand;
private mcMMO pluginRef;
public McconvertCommand(mcMMO pluginRef) {
public ConvertCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
databaseConvertCommand = new ConvertDatabaseCommand(pluginRef);
experienceConvertCommand = new ConvertExperienceCommand(pluginRef);
@ -79,7 +79,7 @@ public class McconvertCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) {
case 1:
return StringUtil.copyPartialMatches(args[0], SUBCOMMANDS, new ArrayList<>(SUBCOMMANDS.size()));
return StringUtil.copyPartialMatches(args[0], CONVERSION_SUBCOMMANDS, new ArrayList<>(CONVERSION_SUBCOMMANDS.size()));
case 2:
if (args[1].equalsIgnoreCase("database") || args[1].equalsIgnoreCase("db")) {
return StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList<>(DATABASE_TYPES.size()));

View File

@ -14,11 +14,11 @@ import org.bukkit.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
public class XprateCommand implements TabExecutor {
public class ExperienceRateCommand implements TabExecutor {
private mcMMO pluginRef;
public XprateCommand(mcMMO pluginRef) {
public ExperienceRateCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -5,11 +5,11 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
public class McgodCommand extends ToggleCommand {
public class GodModeCommand extends ToggleCommand {
private mcMMO pluginRef;
public McgodCommand(mcMMO pluginRef) {
public GodModeCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -8,11 +8,11 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
public class McmmoCommand implements CommandExecutor {
public class McMMOCommand implements CommandExecutor {
private mcMMO pluginRef;
public McmmoCommand(mcMMO pluginRef) {
public McMMOCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -5,11 +5,11 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
public class McrefreshCommand extends ToggleCommand {
public class RefreshCooldownsCommand extends ToggleCommand {
private mcMMO pluginRef;
public McrefreshCommand(mcMMO pluginRef) {
public RefreshCooldownsCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -11,11 +11,11 @@ import org.bukkit.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
public class McscoreboardCommand implements TabExecutor {
public class ScoreboardCommand implements TabExecutor {
private mcMMO pluginRef;
public McscoreboardCommand(mcMMO pluginRef) {
public ScoreboardCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -9,11 +9,11 @@ import org.bukkit.command.CommandSender;
/**
* @author Mark Vainomaa
*/
public final class McmmoReloadLocaleCommand implements CommandExecutor {
public final class ReloadLocaleCommand implements CommandExecutor {
private mcMMO pluginRef;
public McmmoReloadLocaleCommand(mcMMO pluginRef) {
public ReloadLocaleCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -2,10 +2,18 @@ package com.gmail.nossr50.commands.chat;
import com.gmail.nossr50.commands.ToggleCommand;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
public class McChatSpy extends ToggleCommand {
public class ChatSpyCommand extends ToggleCommand {
private mcMMO pluginRef;
public ChatSpyCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}
@Override
protected boolean hasOtherPermission(CommandSender sender) {
return Permissions.adminChatSpyOthers(sender);

View File

@ -8,11 +8,11 @@ import org.bukkit.command.TabExecutor;
import java.util.List;
public class McpurgeCommand implements TabExecutor {
public class PurgeCommand implements TabExecutor {
private mcMMO pluginRef;
public McpurgeCommand(mcMMO pluginRef) {
public PurgeCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -9,11 +9,11 @@ import org.bukkit.command.TabExecutor;
import java.util.List;
public class MmoshowdbCommand implements TabExecutor {
public class ShowDatabaseCommand implements TabExecutor {
private mcMMO pluginRef;
public MmoshowdbCommand(mcMMO pluginRef) {
public ShowDatabaseCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -8,9 +8,9 @@ import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class AddlevelsCommand extends ExperienceCommand {
public class AddLevelsCommand extends ExperienceCommand {
public AddlevelsCommand(mcMMO pluginRef) {
public AddLevelsCommand(mcMMO pluginRef) {
super(pluginRef);
}

View File

@ -4,12 +4,18 @@ import com.gmail.nossr50.datatypes.experience.XPGainReason;
import com.gmail.nossr50.datatypes.experience.XPGainSource;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.player.UserManager;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class AddxpCommand extends ExperienceCommand {
public class AddXPCommand extends ExperienceCommand {
public AddXPCommand(mcMMO pluginRef) {
super(pluginRef);
}
@Override
protected boolean permissionsCheckSelf(CommandSender sender) {
return Permissions.addxp(sender);

View File

@ -8,8 +8,8 @@ import com.gmail.nossr50.util.Permissions;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class MmoeditCommand extends ExperienceCommand {
public MmoeditCommand(mcMMO pluginRef) {
public class SkillEditCommand extends ExperienceCommand {
public SkillEditCommand(mcMMO pluginRef) {
super(pluginRef);
}

View File

@ -23,15 +23,15 @@ import java.util.UUID;
* This class mirrors the structure of ExperienceCommand, except the
* value/quantity argument is removed.
*/
public class SkillresetCommand implements TabExecutor {
public class SkillResetCommand implements TabExecutor {
private mcMMO pluginRef;
public SkillresetCommand(mcMMO pluginRef) {
public SkillResetCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}
protected static void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
protected void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
if (skill == null) {
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.addlevels.AwardAll.2", playerName));
} else {

View File

@ -13,11 +13,11 @@ import org.bukkit.entity.Player;
import java.util.List;
public class MccooldownCommand implements TabExecutor {
public class CooldownCommand implements TabExecutor {
private mcMMO pluginRef;
public MccooldownCommand(mcMMO pluginRef) {
public CooldownCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -20,11 +20,11 @@ import org.bukkit.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
public class MctopCommand implements TabExecutor {
public class LeaderboardCommand implements TabExecutor {
private mcMMO pluginRef;
public MctopCommand(mcMMO pluginRef) {
public LeaderboardCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -18,11 +18,11 @@ import org.bukkit.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
public class McrankCommand implements TabExecutor {
public class RankCommand implements TabExecutor {
private mcMMO pluginRef;
public McrankCommand(mcMMO pluginRef) {
public RankCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -11,11 +11,11 @@ import org.bukkit.entity.Player;
import java.util.List;
public class McstatsCommand implements TabExecutor {
public class SkillStatsCommand implements TabExecutor {
private mcMMO pluginRef;
public McstatsCommand(mcMMO pluginRef) {
public SkillStatsCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}

View File

@ -9,11 +9,11 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class ReloadCommand implements CommandExecutor {
public class ReloadPluginCommand implements CommandExecutor {
private mcMMO pluginRef;
public ReloadCommand(mcMMO plugin) {
public ReloadPluginCommand(mcMMO plugin) {
this.pluginRef = plugin;
}

View File

@ -206,6 +206,8 @@ public class mcMMO extends JavaPlugin {
//Init Event Manager
eventManager = new EventManager(this);
//Init Command Tools
//TODO: Better name?
commandTools = new CommandTools(this);
}

View File

@ -209,7 +209,7 @@ public class EventManager {
}
public boolean tryLevelChangeEvent(Player player, PrimarySkillType skill, int levelsChanged, float xpRemoved, boolean isLevelUp, XPGainReason xpGainReason) {
public boolean tryLevelChangeEvent(Player player, PrimarySkillType skill, int levelsChanged, double xpRemoved, boolean isLevelUp, XPGainReason xpGainReason) {
McMMOPlayerLevelChangeEvent event = isLevelUp ? new McMMOPlayerLevelUpEvent(player, skill, levelsChanged, xpGainReason) : new McMMOPlayerLevelDownEvent(player, skill, levelsChanged, xpGainReason);
pluginRef.getServer().getPluginManager().callEvent(event);
@ -225,7 +225,7 @@ public class EventManager {
return isCancelled;
}
public boolean tryLevelEditEvent(Player player, PrimarySkillType skill, int levelsChanged, float xpRemoved, boolean isLevelUp, XPGainReason xpGainReason, int oldLevel) {
public boolean tryLevelEditEvent(Player player, PrimarySkillType skill, int levelsChanged, double xpRemoved, boolean isLevelUp, XPGainReason xpGainReason, int oldLevel) {
McMMOPlayerLevelChangeEvent event = isLevelUp ? new McMMOPlayerLevelUpEvent(player, skill, levelsChanged - oldLevel, xpGainReason) : new McMMOPlayerLevelDownEvent(player, skill, levelsChanged, xpGainReason);
pluginRef.getServer().getPluginManager().callEvent(event);

View File

@ -1,21 +1,21 @@
package com.gmail.nossr50.util.commands;
import com.gmail.nossr50.commands.*;
import com.gmail.nossr50.commands.admin.McmmoReloadLocaleCommand;
import com.gmail.nossr50.commands.admin.ReloadLocaleCommand;
import com.gmail.nossr50.commands.chat.AdminChatCommand;
import com.gmail.nossr50.commands.chat.McChatSpy;
import com.gmail.nossr50.commands.chat.ChatSpyCommand;
import com.gmail.nossr50.commands.chat.PartyChatCommand;
import com.gmail.nossr50.commands.database.McpurgeCommand;
import com.gmail.nossr50.commands.database.PurgeCommand;
import com.gmail.nossr50.commands.database.McremoveCommand;
import com.gmail.nossr50.commands.database.MmoshowdbCommand;
import com.gmail.nossr50.commands.experience.AddlevelsCommand;
import com.gmail.nossr50.commands.experience.AddxpCommand;
import com.gmail.nossr50.commands.experience.MmoeditCommand;
import com.gmail.nossr50.commands.experience.SkillresetCommand;
import com.gmail.nossr50.commands.database.ShowDatabaseCommand;
import com.gmail.nossr50.commands.experience.AddLevelsCommand;
import com.gmail.nossr50.commands.experience.AddXPCommand;
import com.gmail.nossr50.commands.experience.SkillEditCommand;
import com.gmail.nossr50.commands.experience.SkillResetCommand;
import com.gmail.nossr50.commands.party.PartyCommand;
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
import com.gmail.nossr50.commands.player.*;
import com.gmail.nossr50.commands.server.ReloadCommand;
import com.gmail.nossr50.commands.server.ReloadPluginCommand;
import com.gmail.nossr50.commands.skills.*;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
@ -120,7 +120,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.addlevels;mcmmo.commands.addlevels.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.3", "addlevels", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Skill") + ">", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Level") + ">"));
command.setExecutor(new AddlevelsCommand());
command.setExecutor(new AddLevelsCommand());
}
private void registerAddxpCommand() {
@ -129,7 +129,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.addxp;mcmmo.commands.addxp.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.3", "addxp", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Skill") + ">", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.XP") + ">"));
command.setExecutor(new AddxpCommand());
command.setExecutor(new AddXPCommand());
}
private void registerMcgodCommand() {
@ -138,7 +138,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcgod;mcmmo.commands.mcgod.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcgod", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]"));
command.setExecutor(new McgodCommand());
command.setExecutor(new GodModeCommand());
}
private void registerMmoInfoCommand() {
@ -156,7 +156,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcchatspy;mcmmo.commands.mcchatspy.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcchatspy", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]"));
command.setExecutor(new McChatSpy());
command.setExecutor(new ChatSpyCommand());
}
private void registerMcrefreshCommand() {
@ -165,7 +165,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcrefresh;mcmmo.commands.mcrefresh.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcrefresh", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]"));
command.setExecutor(new McrefreshCommand());
command.setExecutor(new RefreshCooldownsCommand());
}
private void registerMmoeditCommand() {
@ -174,7 +174,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mmoedit;mcmmo.commands.mmoedit.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.3", "mmoedit", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Skill") + ">", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Level") + ">"));
command.setExecutor(new MmoeditCommand());
command.setExecutor(new SkillEditCommand());
}
private void registerMcmmoReloadCommand() {
@ -183,7 +183,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.reload");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcmmoreload"));
command.setExecutor(new ReloadCommand(pluginRef));
command.setExecutor(new ReloadPluginCommand(pluginRef));
}
private void registerSkillresetCommand() {
@ -192,7 +192,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.skillreset;mcmmo.commands.skillreset.others"); // Only need the main ones, not the individual skill ones
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "skillreset", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Skill") + ">"));
command.setExecutor(new SkillresetCommand());
command.setExecutor(new SkillResetCommand());
}
private void registerXprateCommand() {
@ -206,7 +206,7 @@ public final class CommandRegistrationManager {
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "xprate", "<" + pluginRef.getLocaleManager().getString("Commands.Usage.Rate") + ">", "<true|false>"));
command.setUsage(command.getUsage() + "\n" + pluginRef.getLocaleManager().getString("Commands.Usage.1", "xprate", "reset"));
command.setAliases(aliasList);
command.setExecutor(new XprateCommand());
command.setExecutor(new ExperienceRateCommand());
}
private void registerInspectCommand() {
@ -224,7 +224,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mccooldown");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mccooldowns"));
command.setExecutor(new MccooldownCommand());
command.setExecutor(new CooldownCommand());
}
private void registerMcabilityCommand() {
@ -233,7 +233,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcability;mcmmo.commands.mcability.others");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcability", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]"));
command.setExecutor(new McabilityCommand());
command.setExecutor(new AbilityToggleCommand());
}
private void registerMcmmoCommand() {
@ -243,7 +243,7 @@ public final class CommandRegistrationManager {
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcmmo"));
command.setUsage(command.getUsage() + "\n" + pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcmmo", "help"));
command.setExecutor(new McmmoCommand());
command.setExecutor(new McMMOCommand());
}
private void registerMcrankCommand() {
@ -252,7 +252,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcrank;mcmmo.commands.mcrank.others;mcmmo.commands.mcrank.others.far;mcmmo.commands.mcrank.others.offline");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcrank", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Player") + "]"));
command.setExecutor(new McrankCommand());
command.setExecutor(new RankCommand());
}
private void registerMcstatsCommand() {
@ -261,7 +261,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcstats");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcstats"));
command.setExecutor(new McstatsCommand());
command.setExecutor(new SkillStatsCommand());
}
private void registerMctopCommand() {
@ -270,7 +270,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mctop"); // Only need the main one, not the individual skill ones
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "mctop", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Skill") + "]", "[" + pluginRef.getLocaleManager().getString("Commands.Usage.Page") + "]"));
command.setExecutor(new MctopCommand());
command.setExecutor(new LeaderboardCommand());
}
private void registerMcpurgeCommand() {
@ -279,7 +279,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcpurge");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcpurge"));
command.setExecutor(new McpurgeCommand());
command.setExecutor(new PurgeCommand());
}
private void registerMcremoveCommand() {
@ -297,7 +297,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mmoshowdb");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mmoshowdb"));
command.setExecutor(new MmoshowdbCommand());
command.setExecutor(new ShowDatabaseCommand());
}
private void registerMcconvertCommand() {
@ -307,7 +307,7 @@ public final class CommandRegistrationManager {
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "mcconvert", "database", "<flatfile|sql>"));
command.setUsage(command.getUsage() + "\n" + pluginRef.getLocaleManager().getString("Commands.Usage.2", "mcconvert", "experience", "<linear|exponential>"));
command.setExecutor(new McconvertCommand());
command.setExecutor(new ConvertCommand());
}
private void registerAdminChatCommand() {
@ -379,7 +379,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.mcnotify");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcnotify"));
command.setExecutor(new McnotifyCommand());
command.setExecutor(new ChatNotificationToggleCommand());
}
private void registerMHDCommand() {
@ -398,7 +398,7 @@ public final class CommandRegistrationManager {
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.1", "mcscoreboard", "<CLEAR | KEEP>"));
command.setUsage(command.getUsage() + "\n" + pluginRef.getLocaleManager().getString("Commands.Usage.2", "mcscoreboard", "time", "<seconds>"));
command.setExecutor(new McscoreboardCommand());
command.setExecutor(new ScoreboardCommand());
}
private void registerMcImportCommand() {
@ -416,7 +416,7 @@ public final class CommandRegistrationManager {
command.setPermission("mcmmo.commands.reloadlocale");
command.setPermissionMessage(permissionsMessage);
command.setUsage(pluginRef.getLocaleManager().getString("Commands.Usage.0", "mcmmoreloadlocale"));
command.setExecutor(new McmmoReloadLocaleCommand());
command.setExecutor(new ReloadLocaleCommand());
}
public void registerCommands() {

View File

@ -61,15 +61,6 @@ public final class CommandTools {
return true;
}
public boolean isOffline(CommandSender sender, OfflinePlayer player) {
if (player.isOnline()) {
return false;
}
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.Offline"));
return true;
}
/**
* Checks if there is a valid mcMMOPlayer object.
*