mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +08:00
Cleaned up bukkit event registration a bit and fixed 2 warnings.
This commit is contained in:
parent
3f58187790
commit
8ac8cb77a5
@ -135,7 +135,9 @@ protected void loadConfiguration() {
|
||||
* Register the events used by WorldEdit.
|
||||
*/
|
||||
protected void registerEvents() {
|
||||
@SuppressWarnings("unused")
|
||||
PlayerListener playerListener = new WorldEditPlayerListener(this);
|
||||
@SuppressWarnings("unused")
|
||||
PlayerListener criticalPlayerListener = new WorldEditCriticalPlayerListener(this);
|
||||
|
||||
// The permissions resolver has some hooks of its own
|
||||
@ -152,7 +154,7 @@ protected void registerEvents() {
|
||||
public void registerEvent(String typeName, Listener listener, Priority priority) {
|
||||
try {
|
||||
Event.Type type = Event.Type.valueOf(typeName);
|
||||
this.getServer().getPluginManager().registerEvent(type, listener, priority, this);
|
||||
getServer().getPluginManager().registerEvent(type, listener, priority, this);
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.info("WorldEdit: Unable to register missing event type " + typeName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user