From f19e8181f1bbffe23268b78678f9e79163c683e1 Mon Sep 17 00:00:00 2001 From: fullwall Date: Mon, 10 Dec 2012 13:30:02 +0800 Subject: [PATCH] Less hacks --- src/main/java/net/citizensnpcs/Citizens.java | 19 ------------------- .../command/command/NPCCommands.java | 6 +++--- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index ac70511d1..57812515f 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -56,7 +56,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin { private final CommandManager commands = new CommandManager(); private boolean compatible; private Settings config; - private ClassLoader contextClassLoader; private CitizensNPCRegistry npcRegistry; private NPCDataStore saves; private NPCSelector selector; @@ -281,16 +280,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin { } } - private void setupScripting() { - contextClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(getClassLoader()); - // Workaround to fix scripts not loading plugin classes properly. - // The built in Sun Rhino Javascript engine uses the context classloader - // to search for class imports. Since the context classloader only has - // CraftBukkit classes, we replace it with a PluginClassLoader, which - // allows all plugin classes to be imported. - } - private void startMetrics() { try { Metrics metrics = new Metrics(Citizens.this); @@ -338,13 +327,5 @@ public class Citizens extends JavaPlugin implements CitizensPlugin { return false; } - private void tearDownScripting() { - if (contextClassLoader == null) - return; - if (Thread.currentThread().getContextClassLoader() == getClassLoader()) - Thread.currentThread().setContextClassLoader(contextClassLoader); - contextClassLoader = null; - } - private static final String COMPATIBLE_MC_VERSION = "1.4"; } \ No newline at end of file diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index d6c5b8701..ac5fc5b7c 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -1038,9 +1038,9 @@ public class NPCCommands { @Command( aliases = { "npc" }, - usage = "zombiemod (-b, -v)", - desc = "Sets the modifiers of a zombie", - modifiers = { "zombiemod" }, + usage = "zombiemod (-b(aby), -v(illager))", + desc = "Sets a zombie NPC to be a baby or villager", + modifiers = { "zombie", "zombiemod" }, flags = "bv", min = 1, max = 1,