From b63f46250ae7461f1d0e327968e90b5a5fa0d01b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 28 Dec 2010 21:02:39 +0000 Subject: [PATCH] Make a start on block events, fixed nullcheck in PluginManager By: Dinnerbone --- paper-api/src/org/bukkit/event/Event.java | 15 ++++++++------- .../org/bukkit/plugin/SimplePluginManager.java | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/paper-api/src/org/bukkit/event/Event.java b/paper-api/src/org/bukkit/event/Event.java index f9d8b46a09..f823b08b5f 100644 --- a/paper-api/src/org/bukkit/event/Event.java +++ b/paper-api/src/org/bukkit/event/Event.java @@ -71,17 +71,18 @@ public abstract class Event { PLAYER_COMMAND (Category.PLAYER), PLAYER_QUIT (Category.PLAYER), PLAYER_MOVE (Category.PLAYER), - PLAYER_ANIMATION (Category.PLAYER), - PLAYER_TELEPORT (Category.PLAYER); + //PLAYER_ANIMATION (Category.PLAYER), + PLAYER_TELEPORT (Category.PLAYER), /** * Block Events - - BLOCK_DESTROYED (Category.BLOCK), - BLOCK_BROKEN (Category.BLOCK), - BLOCK_PLACE (Category.BLOCK), + */ + BLOCK_DAMAGED (Category.BLOCK), + BLOCK_PLACED (Category.BLOCK), BLOCK_RIGHTCLICKED (Category.BLOCK), - REDSTONE_CHANGE (Category.BLOCK), BLOCK_PHYSICS (Category.BLOCK), + REDSTONE_CHANGE (Category.BLOCK), + BLOCK_IGNITE (Category.BLOCK), + BLOCK_FLOW (Category.BLOCK); /** * Item Events diff --git a/paper-api/src/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/org/bukkit/plugin/SimplePluginManager.java index 5cbe08b3e4..cc696f6109 100644 --- a/paper-api/src/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/org/bukkit/plugin/SimplePluginManager.java @@ -170,7 +170,7 @@ public final class SimplePluginManager implements PluginManager { public void callEvent(Event event) { List eventListeners = listeners.get(event.getType()); - if (listeners != null) { + if (eventListeners != null) { for (RegisteredListener registration : eventListeners) { Plugin plugin = registration.getPlugin(); PluginLoader loader = plugin.getPluginLoader();