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;
}