Class GameListenerManager

java.lang.Object
com.minigameworld.managers.event.GameListenerManager
All Implemented Interfaces:
org.bukkit.event.Listener

public class GameListenerManager extends Object implements org.bukkit.event.Listener
[Rules]
- Must register instance which processes playing game player's only (not about viewers and outers)
- If event is detectable with players by MiniGameEventDetector, the event will be only passed to the player's playing game listeners.
- If event is not detectable with players by MiniGameEventDetector, the event will be passed to all listeners related with event.
In this GameListenerManager class, use getListeners(Class) to get listeners with event

[Listener registration tutorial]
If listener related with minigame needs to handle events
1. Implements GameEventListener
2. Add method as a protected or public with GameEvent annotation
3. Register in MiniGameManager.createGameInstance(MiniGame) and unregister in MiniGameManager.removeGameInstance(MiniGame)
  • Constructor Details

  • Method Details

    • printAllListener

      public void printAllListener()
    • registerGameListener

      public void registerGameListener(GameEventListener instance)
    • unregisterGameListener

      public void unregisterGameListener(GameEventListener instance)