Permalink
Browse files

Adjust for registerEvent changes.

  • Loading branch information...
1 parent 4843149 commit 38c5fa5c97b15457227c5480879e8d9e45282623 @stephank committed Feb 15, 2011
Showing with 3 additions and 11 deletions.
  1. +0 −7 src/org/angelsl/bukkit/jxpl/ScriptLoader.java
  2. +3 −4 src/org/angelsl/bukkit/jxpl/ScriptPlugin.java
@@ -1,8 +1,6 @@
package org.angelsl.bukkit.jxpl;
import org.bukkit.Server;
-import org.bukkit.event.Event;
-import org.bukkit.event.Listener;
import org.bukkit.plugin.*;
import javax.script.*;
@@ -50,11 +48,6 @@ public Plugin getContainingPlugin() {
return containing;
}
- public EventExecutor createExecutor(final Event.Type type, Listener listener) {
- // FIXME, but this shouldn't happen in practice.
- return null;
- }
-
public void discoverPlugins() {
PluginManager pm = server.getPluginManager();
File[] files = scriptsDir.listFiles();
@@ -3,7 +3,6 @@
import org.bukkit.Server;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Type;
-import org.bukkit.event.Listener;
import org.bukkit.plugin.EventExecutor;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescription;
@@ -14,7 +13,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-public class ScriptPlugin implements Plugin, Listener {
+public class ScriptPlugin implements Plugin {
static Logger l = Logger.getLogger("Minecraft.JxplPlugin");
@@ -59,14 +58,14 @@ public ScriptExecutor(final Event.Type type, final String functionName) {
this.functionName = functionName;
}
- public void execute(Listener listener, Event event) {
+ public void execute(Event event) {
tryInvoke(functionName, type, event);
}
}
public void registerEvent(Event.Type type, Event.Priority priority, String functionName)
{
- server.getPluginManager().registerEvent(type, this, new ScriptExecutor(type, functionName), priority, this);
+ server.getPluginManager().registerEvent(this, type, priority, new ScriptExecutor(type, functionName));
}
public void log(Level l, String message)

0 comments on commit 38c5fa5

Please sign in to comment.