mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
Make a start on block events, fixed nullcheck in PluginManager
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
695bda59ee
commit
b63f46250a
2 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||
public void callEvent(Event event) {
|
||||
List<RegisteredListener> eventListeners = listeners.get(event.getType());
|
||||
|
||||
if (listeners != null) {
|
||||
if (eventListeners != null) {
|
||||
for (RegisteredListener registration : eventListeners) {
|
||||
Plugin plugin = registration.getPlugin();
|
||||
PluginLoader loader = plugin.getPluginLoader();
|
||||
|
|
Loading…
Reference in a new issue