From 7fbf3d4f2717a14f20cbe4e1b45cac94b50bb982 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 1 Feb 2013 13:41:26 -0500 Subject: [PATCH] Refactoring of general commands - the prior package structure made no sense. New package structure splits commands into those normally reserved for admin use and commands normally available to all players. --- .../commands/CommandRegistrationHelper.java | 2 +- .../{general => admin}/AddlevelsCommand.java | 2 +- .../{general => admin}/AddxpCommand.java | 2 +- .../commands/{mc => admin}/McgodCommand.java | 2 +- .../{mc => admin}/McrefreshCommand.java | 2 +- .../{general => admin}/MmoeditCommand.java | 2 +- .../{general => admin}/SkillResetCommand.java | 2 +- .../{general => admin}/XprateCommand.java | 2 +- .../{general => player}/InspectCommand.java | 2 +- .../{mc => player}/McabilityCommand.java | 2 +- .../commands/{mc => player}/MccCommand.java | 2 +- .../commands/{mc => player}/McmmoCommand.java | 2 +- .../{mc => player}/McrankCommand.java | 2 +- .../{general => player}/McstatsCommand.java | 2 +- .../commands/{mc => player}/MctopCommand.java | 2 +- src/main/java/com/gmail/nossr50/mcMMO.java | 28 +++++++++---------- src/main/resources/plugin.yml | 8 +++--- 17 files changed, 33 insertions(+), 33 deletions(-) rename src/main/java/com/gmail/nossr50/commands/{general => admin}/AddlevelsCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{general => admin}/AddxpCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{mc => admin}/McgodCommand.java (93%) rename src/main/java/com/gmail/nossr50/commands/{mc => admin}/McrefreshCommand.java (95%) rename src/main/java/com/gmail/nossr50/commands/{general => admin}/MmoeditCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{general => admin}/SkillResetCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{general => admin}/XprateCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{general => player}/InspectCommand.java (99%) rename src/main/java/com/gmail/nossr50/commands/{mc => player}/McabilityCommand.java (95%) rename src/main/java/com/gmail/nossr50/commands/{mc => player}/MccCommand.java (96%) rename src/main/java/com/gmail/nossr50/commands/{mc => player}/McmmoCommand.java (94%) rename src/main/java/com/gmail/nossr50/commands/{mc => player}/McrankCommand.java (98%) rename src/main/java/com/gmail/nossr50/commands/{general => player}/McstatsCommand.java (95%) rename src/main/java/com/gmail/nossr50/commands/{mc => player}/MctopCommand.java (96%) diff --git a/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java b/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java index 62a6941fb..5363ebda8 100644 --- a/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java +++ b/src/main/java/com/gmail/nossr50/commands/CommandRegistrationHelper.java @@ -6,7 +6,7 @@ import java.util.List; import org.bukkit.command.PluginCommand; import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.commands.general.AddlevelsCommand; +import com.gmail.nossr50.commands.admin.AddlevelsCommand; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.skills.acrobatics.AcrobaticsCommand; import com.gmail.nossr50.skills.archery.ArcheryCommand; diff --git a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/AddlevelsCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/AddlevelsCommand.java index 9eb705cc4..643b53c30 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/AddlevelsCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/AddxpCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/AddxpCommand.java index 9506ab02e..25c273b9e 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/AddxpCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McgodCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/McgodCommand.java similarity index 93% rename from src/main/java/com/gmail/nossr50/commands/mc/McgodCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/McgodCommand.java index e71d48475..ecddf0328 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McgodCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/McgodCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McrefreshCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/McrefreshCommand.java similarity index 95% rename from src/main/java/com/gmail/nossr50/commands/mc/McrefreshCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/McrefreshCommand.java index 4648240c2..032bd9608 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McrefreshCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/McrefreshCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.admin; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; diff --git a/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/MmoeditCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/MmoeditCommand.java index a1d23c0b4..7dfaaec5b 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/MmoeditCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/MmoeditCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/general/SkillResetCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/SkillResetCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/general/SkillResetCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/SkillResetCommand.java index 90d996986..bab9b88a6 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/SkillResetCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/SkillResetCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.admin; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; diff --git a/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java rename to src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java index 791d9afc6..b6730fadc 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.admin; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/general/InspectCommand.java b/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java similarity index 99% rename from src/main/java/com/gmail/nossr50/commands/general/InspectCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java index 3206e2079..f585672b2 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/InspectCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.player; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McabilityCommand.java b/src/main/java/com/gmail/nossr50/commands/player/McabilityCommand.java similarity index 95% rename from src/main/java/com/gmail/nossr50/commands/mc/McabilityCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/McabilityCommand.java index 210c48c95..b58a8cbc6 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McabilityCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/McabilityCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.player; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/MccCommand.java b/src/main/java/com/gmail/nossr50/commands/player/MccCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/mc/MccCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/MccCommand.java index 6c1b2f8c7..ea080a3f6 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/MccCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/MccCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.player; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java b/src/main/java/com/gmail/nossr50/commands/player/McmmoCommand.java similarity index 94% rename from src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/McmmoCommand.java index 9e1edc648..7bac6f7a6 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/McmmoCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.player; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McrankCommand.java b/src/main/java/com/gmail/nossr50/commands/player/McrankCommand.java similarity index 98% rename from src/main/java/com/gmail/nossr50/commands/mc/McrankCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/McrankCommand.java index f67c384bd..15c769df2 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McrankCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/McrankCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.player; import org.bukkit.Bukkit; import org.bukkit.command.Command; diff --git a/src/main/java/com/gmail/nossr50/commands/general/McstatsCommand.java b/src/main/java/com/gmail/nossr50/commands/player/McstatsCommand.java similarity index 95% rename from src/main/java/com/gmail/nossr50/commands/general/McstatsCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/McstatsCommand.java index ab6ab26ac..521033772 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/McstatsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/McstatsCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.general; +package com.gmail.nossr50.commands.player; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java b/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java similarity index 96% rename from src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java rename to src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java index a44045b5a..882934b1b 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/MctopCommand.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.commands.mc; +package com.gmail.nossr50.commands.player; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index eced83318..9148fbd4b 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -19,20 +19,20 @@ import org.bukkit.scheduler.BukkitScheduler; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory; import com.gmail.nossr50.commands.CommandRegistrationHelper; -import com.gmail.nossr50.commands.general.AddlevelsCommand; -import com.gmail.nossr50.commands.general.AddxpCommand; -import com.gmail.nossr50.commands.general.InspectCommand; -import com.gmail.nossr50.commands.general.McstatsCommand; -import com.gmail.nossr50.commands.general.MmoeditCommand; -import com.gmail.nossr50.commands.general.SkillResetCommand; -import com.gmail.nossr50.commands.general.XprateCommand; -import com.gmail.nossr50.commands.mc.McabilityCommand; -import com.gmail.nossr50.commands.mc.MccCommand; -import com.gmail.nossr50.commands.mc.McgodCommand; -import com.gmail.nossr50.commands.mc.McmmoCommand; -import com.gmail.nossr50.commands.mc.McrankCommand; -import com.gmail.nossr50.commands.mc.McrefreshCommand; -import com.gmail.nossr50.commands.mc.MctopCommand; +import com.gmail.nossr50.commands.admin.AddlevelsCommand; +import com.gmail.nossr50.commands.admin.AddxpCommand; +import com.gmail.nossr50.commands.admin.McgodCommand; +import com.gmail.nossr50.commands.admin.McrefreshCommand; +import com.gmail.nossr50.commands.admin.MmoeditCommand; +import com.gmail.nossr50.commands.admin.SkillResetCommand; +import com.gmail.nossr50.commands.admin.XprateCommand; +import com.gmail.nossr50.commands.player.InspectCommand; +import com.gmail.nossr50.commands.player.McabilityCommand; +import com.gmail.nossr50.commands.player.MccCommand; +import com.gmail.nossr50.commands.player.McmmoCommand; +import com.gmail.nossr50.commands.player.McrankCommand; +import com.gmail.nossr50.commands.player.McstatsCommand; +import com.gmail.nossr50.commands.player.MctopCommand; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.HiddenConfig; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 9afcd783d..812b144f4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -118,11 +118,11 @@ permissions: default: true description: mcmmo permisions that default to true children: - mcmmo.ability.all: true - mcmmo.item.all: true + mcmmo.ability.all: true + mcmmo.item.all: true mcmmo.motd: true - mcmmo.commands.defaults: true - mcmmo.chat.partychat: true + mcmmo.commands.defaults: true + mcmmo.chat.partychat: true mcmmo.skills.all: true mcmmo.defaultsop: default: op