summaryrefslogtreecommitdiffstats
path: root/EssentialsExtra
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-10-07 21:33:44 +1100
committermd_5 <md_5@bigpond.com>2012-10-07 21:33:44 +1100
commit6d3119dfe629077473c9a1c6be82a7d6ec893e04 (patch)
tree0836fb84877954615b1aa30af68129db88ea07a8 /EssentialsExtra
parent41946a2da9199e5fafadeea4716daf389752fd9c (diff)
downloadEssentials-6d3119dfe629077473c9a1c6be82a7d6ec893e04.tar
Essentials-6d3119dfe629077473c9a1c6be82a7d6ec893e04.tar.gz
Essentials-6d3119dfe629077473c9a1c6be82a7d6ec893e04.tar.lz
Essentials-6d3119dfe629077473c9a1c6be82a7d6ec893e04.tar.xz
Essentials-6d3119dfe629077473c9a1c6be82a7d6ec893e04.zip
Shift fields around so they are actually set.
Diffstat (limited to 'EssentialsExtra')
-rw-r--r--EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
index 9c2af2f55..455c06291 100644
--- a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
+++ b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
@@ -27,15 +27,12 @@ import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsExtra extends JavaPlugin
{
- private IEssentials ess;
- private ICommandHandler handler;
private CommandMap commandMap;
- private ClassLoader loader;
@Override
public void onEnable()
{
- ess = ((BukkitPlugin)getServer().getPluginManager().getPlugin("Essentials-3")).getEssentials();
+ final IEssentials ess = ((BukkitPlugin)getServer().getPluginManager().getPlugin("Essentials-3")).getEssentials();
File commandDir = new File(ess.getPlugin().getDataFolder(), "extras");
commandDir.mkdir();
@@ -45,7 +42,7 @@ public class EssentialsExtra extends JavaPlugin
PluginManager pm = Bukkit.getServer().getPluginManager();
Field f = SimplePluginManager.class.getDeclaredField("commandMap");
f.setAccessible(true);
- CommandMap map = (CommandMap)f.get(pm);
+ commandMap = (CommandMap)f.get(pm);
JarFile jar = new JarFile(getFile());
Enumeration<JarEntry> entries = jar.entries();
@@ -82,8 +79,8 @@ public class EssentialsExtra extends JavaPlugin
getServer().getPluginManager().disablePlugin(this);
}
- loader = new URLClassLoader(urls, getClassLoader());
-
+ ClassLoader loader = new URLClassLoader(urls, getClassLoader());
+ final ICommandHandler handler = new EssentialsCommandHandler(loader, "Command", "essentials.", ess);;
for (File file : commandDir.listFiles())
{
String fileName = file.getName();
@@ -113,7 +110,5 @@ public class EssentialsExtra extends JavaPlugin
}
}
}
-
- handler = new EssentialsCommandHandler(loader, "Command", "essentials.", ess);
}
}