Removed /mcc command. Replaced with /mcmmo help.

NOTE: /mcmmo help seems to be having formatting issues currently - we're
looking into it.
This commit is contained in:
GJ 2013-02-12 18:30:03 -05:00
parent 8f4d5442b1
commit e9b016903b
7 changed files with 83 additions and 93 deletions

View File

@ -77,6 +77,7 @@ Version 1.4.00-dev
- Removed unused "healthbar" files from the resources - Removed unused "healthbar" files from the resources
- Removed config options for disabling commands from the config.yml. This should instead be done through permissions. - Removed config options for disabling commands from the config.yml. This should instead be done through permissions.
- Removed Chimaera Wing - Removed Chimaera Wing
- Removed /mcc command. Replaced with /mcmmo [?|help|commands]
Version 1.3.14 Version 1.3.14
+ Added new Hylian Luck skill to Herbalism. + Added new Hylian Luck skill to Herbalism.

View File

@ -212,10 +212,10 @@ public final class CommandRegistrationHelper {
public static void registerMcmmoCommand() { public static void registerMcmmoCommand() {
PluginCommand command = mcMMO.p.getCommand("mcmmo"); PluginCommand command = mcMMO.p.getCommand("mcmmo");
command.setDescription(LocaleLoader.getString("Commands.Description.mcmmo")); command.setDescription(LocaleLoader.getString("Commands.Description.mcmmo"));
command.setPermission("mcmmo.commands.mcmmo"); command.setPermission("mcmmo.commands.mcmmo;mcmmo.commands.mcmmo.help");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mcmmo")); command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mcmmo"));
command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.1", "mcmmo", "?")); command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.1", "mcmmo", "help"));
command.setExecutor(new McmmoCommand()); command.setExecutor(new McmmoCommand());
} }

View File

@ -1,79 +0,0 @@
package com.gmail.nossr50.commands.player;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions;
//TODO: Rework this whole thing. It's ugly. Also is missing all the admin & spout commands.
public class MccCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (CommandHelper.noConsoleUsage(sender)) {
return true;
}
if (!Permissions.hasPermission(sender, "mcmmo.commands.mcc")) {
return true;
}
Player player = (Player) sender;
player.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
if (Permissions.party(player)) {
player.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
player.sendMessage("/party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
player.sendMessage("/party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
player.sendMessage("/party quit " + LocaleLoader.getString("Commands.Party.Quit"));
if (Permissions.partyChat(player)) {
player.sendMessage("/p " + LocaleLoader.getString("Commands.Party.Toggle"));
}
player.sendMessage("/party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
player.sendMessage("/party accept " + LocaleLoader.getString("Commands.Party.Accept"));
if (Permissions.partyTeleport(player)) {
player.sendMessage("/ptp " + LocaleLoader.getString("Commands.Party.Teleport"));
}
}
player.sendMessage(LocaleLoader.getString("Commands.Other"));
player.sendMessage("/mcstats " + LocaleLoader.getString("Commands.Stats"));
player.sendMessage("/mctop " + LocaleLoader.getString("Commands.Leaderboards"));
if (Permissions.skillReset(player)) {
player.sendMessage("/skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
}
if (Permissions.mcAbility(player)) {
player.sendMessage("/mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
}
if (Permissions.adminChat(player)) {
player.sendMessage("/a " + LocaleLoader.getString("Commands.AdminToggle"));
}
if (Permissions.inspect(player)) {
player.sendMessage("/inspect " + LocaleLoader.getString("Commands.Inspect"));
}
if (Permissions.mmoedit(player)) {
player.sendMessage("/mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
}
if (Permissions.mcgod(player)) {
player.sendMessage("/mcgod " + LocaleLoader.getString("Commands.mcgod"));
}
player.sendMessage(LocaleLoader.getString("Commands.SkillInfo"));
player.sendMessage("/mcmmo " + LocaleLoader.getString("Commands.ModDescription"));
return true;
}
}

View File

@ -10,12 +10,14 @@ import org.getspout.spoutapi.player.SpoutPlayer;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions;
public class McmmoCommand implements CommandExecutor { public class McmmoCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length == 0 || (args.length == 1 && args[0].equals("?"))) { switch (args.length) {
case 0:
String description = LocaleLoader.getString("mcMMO.Description"); String description = LocaleLoader.getString("mcMMO.Description");
String[] mcSplit = description.split(","); String[] mcSplit = description.split(",");
sender.sendMessage(mcSplit); sender.sendMessage(mcSplit);
@ -32,8 +34,75 @@ public class McmmoCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion())); sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
return true; return true;
case 1:
if (args[0].equalsIgnoreCase("?") || args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("commands")) {
if (!Permissions.hasPermission(sender, "mcmmo.commands.mcmmo.help")) {
sender.sendMessage(command.getPermissionMessage());
return true;
} }
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
displayPartyCommands(sender);
displayOtherCommands(sender);
}
return true;
default:
return false; return false;
} }
} }
private void displayPartyCommands(CommandSender sender) {
if (sender.hasPermission("mcmmo.commands.party")) {
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
sender.sendMessage("/party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
sender.sendMessage("/party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
sender.sendMessage("/party quit " + LocaleLoader.getString("Commands.Party.Quit"));
if (sender.hasPermission("mcmmo.chat.party")) {
sender.sendMessage("/party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
}
sender.sendMessage("/party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
sender.sendMessage("/party accept " + LocaleLoader.getString("Commands.Party.Accept"));
if (sender.hasPermission("mcmmo.commands.ptp")) {
sender.sendMessage("/party teleport " + LocaleLoader.getString("Commands.Party.Teleport"));
}
}
}
private void displayOtherCommands(CommandSender sender) {
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
sender.sendMessage("/mcstats " + LocaleLoader.getString("Commands.Stats"));
sender.sendMessage("/mctop " + LocaleLoader.getString("Commands.Leaderboards"));
if (sender.hasPermission("mcmmo.commands.skillreset")) {
sender.sendMessage("/skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
}
if (sender.hasPermission("mcmmo.commands.mcability")) {
sender.sendMessage("/mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
}
if (sender.hasPermission("mcmmo.chat.admin")) {
sender.sendMessage("/adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
}
if (sender.hasPermission("mcmmo.commands.inspect")) {
sender.sendMessage("/inspect " + LocaleLoader.getString("Commands.Inspect"));
}
if (sender.hasPermission("mcmmo.commands.mmoedit")) {
sender.sendMessage("/mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
}
if (sender.hasPermission("mcmmo.commands.mcgod")) {
sender.sendMessage("/mcgod " + LocaleLoader.getString("Commands.mcgod"));
}
sender.sendMessage(LocaleLoader.getString("Commands.SkillInfo"));
}
}

View File

@ -23,7 +23,6 @@ import org.mcstats.Metrics.Graph;
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager;
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
import com.gmail.nossr50.commands.CommandRegistrationHelper; import com.gmail.nossr50.commands.CommandRegistrationHelper;
import com.gmail.nossr50.commands.player.MccCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.config.HiddenConfig; import com.gmail.nossr50.config.HiddenConfig;
@ -277,7 +276,6 @@ public class mcMMO extends JavaPlugin {
CommandRegistrationHelper.registerMcpurgeCommand(); CommandRegistrationHelper.registerMcpurgeCommand();
CommandRegistrationHelper.registerMcremoveCommand(); CommandRegistrationHelper.registerMcremoveCommand();
CommandRegistrationHelper.registerMcabilityCommand(); CommandRegistrationHelper.registerMcabilityCommand();
getCommand("mcc").setExecutor(new MccCommand());
CommandRegistrationHelper.registerMcgodCommand(); CommandRegistrationHelper.registerMcgodCommand();
CommandRegistrationHelper.registerMcmmoCommand(); CommandRegistrationHelper.registerMcmmoCommand();
CommandRegistrationHelper.registerMcrefreshCommand(); CommandRegistrationHelper.registerMcrefreshCommand();

View File

@ -394,7 +394,7 @@ Combat.TouchedFuzzy=[[DARK_RED]]Touched Fuzzy. Felt Dizzy.
#COMMANDS #COMMANDS
##generic ##generic
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Founder),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Developer),[[GOLD]] - [[GREEN]]TfT_02 [[BLUE]](Developer),[[GOLD]] - [[GREEN]]Glitchfinder [[BLUE]](Developer),[[GOLD]] - [[GREEN]]toothplck1 [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]https://github.com/mcMMO-Dev/mcMMO/issues[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Bukkit Forum Thread mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcmmo help[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Founder),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Developer),[[GOLD]] - [[GREEN]]TfT_02 [[BLUE]](Developer),[[GOLD]] - [[GREEN]]Glitchfinder [[BLUE]](Developer),[[GOLD]] - [[GREEN]]toothplck1 [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]https://github.com/mcMMO-Dev/mcMMO/issues[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,
Commands.addlevels.AwardAll.1=[[GREEN]]You were awarded {0} levels in all skills! Commands.addlevels.AwardAll.1=[[GREEN]]You were awarded {0} levels in all skills!
Commands.addlevels.AwardAll.2=[[RED]]All skills have been modified for {0}. Commands.addlevels.AwardAll.2=[[RED]]All skills have been modified for {0}.
Commands.addlevels.AwardSkill.1=[[GREEN]]You were awarded {0} levels in {1}! Commands.addlevels.AwardSkill.1=[[GREEN]]You were awarded {0} levels in {1}!

View File

@ -28,9 +28,6 @@ commands:
xprate: xprate:
aliases: [mcxprate] aliases: [mcxprate]
description: Modify the xp rate or start an event description: Modify the xp rate or start an event
mcc:
aliases: []
description: Lists mcMMO commands
mcmmo: mcmmo:
description: Shows a brief mod description description: Shows a brief mod description
mctop: mctop:
@ -564,9 +561,8 @@ permissions:
mcmmo.commands.herbalism: true mcmmo.commands.herbalism: true
mcmmo.commands.inspect: true mcmmo.commands.inspect: true
mcmmo.commands.mcability: true mcmmo.commands.mcability: true
mcmmo.commands.mcc: true
mcmmo.commands.mchud: true mcmmo.commands.mchud: true
mcmmo.commands.mcmmo: true mcmmo.commands.mcmmo.all: true
mcmmo.commands.mcrank: true mcmmo.commands.mcrank: true
mcmmo.commands.mcstats: true mcmmo.commands.mcstats: true
mcmmo.commands.mctop.all: true mcmmo.commands.mctop.all: true
@ -651,16 +647,21 @@ permissions:
description: Allows access to the mcability command description: Allows access to the mcability command
mcmmo.commands.mcability.others: mcmmo.commands.mcability.others:
description: Allows access to the mcability command for other players description: Allows access to the mcability command for other players
mcmmo.commands.mcc:
description: Allows access to the mcc command
mcmmo.commands.mcgod: mcmmo.commands.mcgod:
description: Allows access to the mcgod command description: Allows access to the mcgod command
mcmmo.commands.mcgod.others: mcmmo.commands.mcgod.others:
description: Allows access to the mcgod command for other players description: Allows access to the mcgod command for other players
mcmmo.commands.mchud: mcmmo.commands.mchud:
description: Allows access to the mchud command description: Allows access to the mchud command
mcmmo.commands.mcmmo.all:
description: Implies access to all mcmmo.commands.mcmmo permissions.
children:
mcmmo.commands.mcmmo: true
mcmmo.commands.mcmmo.help: true
mcmmo.commands.mcmmo: mcmmo.commands.mcmmo:
description: Allows access to the mcmmo command description: Allows access to the mcmmo command
mcmmo.commands.mcmmo.help:
description: Allows access to the mcmmo help command
mcmmo.commands.mcpurge: mcmmo.commands.mcpurge:
default: false default: false
description: Allows access to the mcpurge command description: Allows access to the mcpurge command