Added onPlayerChat and onPlayerCommand

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2010-12-28 16:41:37 +00:00
parent de10dba640
commit e61f164e8b
5 changed files with 81 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ public interface PluginManager {
public void callEvent(Event event);
/**
* Registers the given player event to the specified listener
* Registers the given event to the specified listener
*
* @param type EventType to register
* @param listener Listener to register

View File

@@ -183,7 +183,7 @@ public final class SimplePluginManager implements PluginManager {
}
/**
* Registers the given player event to the specified listener
* Registers the given event to the specified listener
*
* @param type EventType to register
* @param listener PlayerListener to register

View File

@@ -8,7 +8,6 @@ import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Map;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.regex.Pattern;
@@ -88,6 +87,12 @@ public final class JavaPluginLoader implements PluginLoader {
case PLAYER_QUIT:
trueListener.onPlayerQuit((PlayerEvent)event);
break;
case PLAYER_COMMAND:
trueListener.onPlayerCommand((PlayerChatEvent)event);
break;
case PLAYER_CHAT:
trueListener.onPlayerChat((PlayerChatEvent)event);
break;
}
}
}