Java 类org.bukkit.event.HandlerList 实例源码

项目:SamaGamesAPI    文件:ActivePowerup.java   
@EventHandler
private void onPlayerPickupItem(PlayerPickupItemEvent event)
{
    if (event.getItem().getItemStack() != null && event.getItem().getItemStack().getItemMeta() != null && event.getItem().getItemStack().getItemMeta().getDisplayName() != null)
    {
        if (this.alive && event.getItem().getItemStack().getItemMeta().getDisplayName().equals(this.uuid.toString()))
        {
            event.setCancelled(true);

            HandlerList.unregisterAll(this);

            this.remove(true);
            this.parent.onPickup(event.getPlayer());
        }
    }
}
项目:InventoryAPI    文件:GuiAnvilListener.java   
@EventHandler
public void onClose( InventoryCloseEvent event ) {
    if ( event.getInventory().equals( gui.getInventory() ) ) {
        gui.getEvents().forEach( e -> e.onClose( new ContainerCloseEvent( gui, event.getPlayer() ) ) );
        HandlerList.unregisterAll(this);
        gui.setNativeListenerRegistered(false);
    }
}
项目:ProjectAres    文件:ListeningMapAdapter.java   
/**
 * Clear the list and stop listening for events. This map should not be used after this method is called.
 */
public void disable() {
    if(this.enabled) {
        this.clear();
        HandlerList.unregisterAll(this);
    }
}
项目:SkipNight    文件:Vote.java   
private void doComplete() {
    countDown--;
    if (countDown == -1) {
        bar.setProgress(1.0);
        if (yes > no) {
            bar.setTitle(ChatColor.GREEN + "Vote passed!");
            bar.setColor(BarColor.GREEN);
            updateAll(voters, Messages.votePassed());
            world.setTime(0);
            if (world.hasStorm()) world.setStorm(false);
        }
        else {
            bar.setTitle(ChatColor.DARK_RED + "Vote failed!");
            bar.setColor(BarColor.RED);
            updateAll(voters, Messages.voteFailed());
        }
        plugin.getServer().getScheduler().runTaskLater(plugin, this, 20);
    }

    if (countDown == -2) plugin.getServer().getScheduler().runTaskLater(plugin, this, 20);

    if (countDown == -3) {
        HandlerList.unregisterAll(this);
        bar.removeAll();
        bar = null;
        voters = null;
    }
}
项目:FactionsXL    文件:FactionsXL.java   
/**
 * load / reload a new instance of EntityProtectionListener and register it
 */
public void loadEntityProtectionListener() {
    if (entityProtectionListener != null) {
        HandlerList.unregisterAll(entityProtectionListener);
    }
    entityProtectionListener = new EntityProtectionListener();
    manager.registerEvents(entityProtectionListener, this);
}
项目:FactionsXL    文件:FactionsXL.java   
/**
 * load / reload a new instance of PlayerListener and register it
 */
public void loadPlayerListener() {
    if (playerListener != null) {
        HandlerList.unregisterAll(playerListener);
    }
    playerListener = new PlayerListener(this);
    manager.registerEvents(playerListener, this);
}
项目:InventoryAPI    文件:McGuiListener.java   
@EventHandler
public void onClose(InventoryCloseEvent event) {
    if(gui == null || gui.getPlayer() == null || !event.getPlayer().getUniqueId().equals(gui.getPlayer().getUniqueId())) return;

    globalEvents.forEach(e -> e.onClose(new ContainerCloseEvent(gui, event.getPlayer())));
    if (event.getInventory().equals(gui.getInventory())) {
        gui.getEvents().forEach(e -> e.onClose(new ContainerCloseEvent(gui, event.getPlayer())));

        HandlerList.unregisterAll(this);
        gui.setNativeListenerRegistered(false);
    }
}
项目:Arcadia-Spigot    文件:GameStateUpdateEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:VanillaPlus    文件:VPPLoginEvent.java   
public HandlerList getHandlers() {
    return handlers;
}
项目:OpenRPG    文件:RegionEvent.java   
public static HandlerList getHandlerList() {
    return HANDLERS;
}
项目:KingdomFactions    文件:ChannelPasswordSetEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:KingdomFactions    文件:ChannelEvent.java   
@Override
public HandlerList getHandlers() {
    return handlers;
}
项目:mczone    文件:SignClickEvent.java   
public HandlerList getHandlers() {
    return handlers;
}
项目:skript-mirror    文件:CustomExpression.java   
public static HandlerList getHandlerList() {
  return handlers;
}
项目:PetBlocks    文件:SpigotEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:EchoPet    文件:PetTeleportEvent.java   
@Override
  public HandlerList getHandlers() {
return handlers;
  }
项目:HCFCore    文件:PvpClassEquipEvent.java   
@Override
public HandlerList getHandlers() {
    return handlers;
}
项目:bskyblock    文件:IslandBaseEvent.java   
@Override
public HandlerList getHandlers() {
    return handlers;
}
项目:CloudNet    文件:BukkitPlayerLoginNetworkEvent.java   
public static HandlerList getHandlerList()
{
    return handlerList;
}
项目:CloudNet    文件:BukkitServerAddEvent.java   
@Override
public HandlerList getHandlers()
{
    return handlerList;
}
项目:HCFCore    文件:LoggerRemovedEvent.java   
public static HandlerList getHandlerList()
{
    return handlers;
}
项目:OpenUHC    文件:BaldChickens.java   
@Override
public void onDisable() {
  HandlerList.unregisterAll(this);
}
项目:AlphaLibary    文件:GameStatusChangeEvent.java   
@Override
public final HandlerList getHandlers() {
    return handlers;
}
项目:McLink    文件:McLinkInitEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:KingdomFactions    文件:ChannelLeaveEvent.java   
public static HandlerList getHanlerList() {
    return handlers;
}
项目:OpenRPG    文件:LevelEvent.java   
public static HandlerList getHandlerList() {
    return HANDLERS;
}
项目:EchoPet    文件:EchoPetSendMessageEvent.java   
@Override
  public HandlerList getHandlers() {
return handlers;
  }
项目:AddGun    文件:FireGunEvent.java   
@Override
public HandlerList getHandlers() {
    return FireGunEvent.handlers;
}
项目:ProjectAres    文件:GoalTouchEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:CloudNet    文件:BukkitProxyAddEvent.java   
@Override
public HandlerList getHandlers()
{
    return handlerList;
}
项目:CloudNet    文件:BukkitProxyAddEvent.java   
public static HandlerList getHandlerList()
{
    return handlerList;
}
项目:ProjectAres    文件:ConfigLoadEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:ProjectAres    文件:EntrantRegisterEvent.java   
public static HandlerList getHandlerList() {
    return EntrantRegisterEvent.handlers;
}
项目:KillerPoint-Reloaded    文件:PointChangedEvent.java   
public static HandlerList getHandlerList() 
{
    return handlers;
}
项目:CloudNet    文件:BukkitProxyInfoUpdateEvent.java   
@Override
public HandlerList getHandlers()
{
    return handlerList;
}
项目:HCFCore    文件:LoggerRemovedEvent.java   
public HandlerList getHandlers()
{
    return handlers;
}
项目:HCFCore    文件:TimerClearEvent.java   
@Override
public HandlerList getHandlers() {
    return handlers;
}
项目:KillRanking    文件:PlayerLevelUpEvent.java   
public static HandlerList getHandlerList() {
    return handler;
}
项目:ProjectAres    文件:CapturingTeamChangeEvent.java   
public static HandlerList getHandlerList() {
    return handlers;
}
项目:HCFCore    文件:PlayerJoinedFactionEvent.java   
@Override
public HandlerList getHandlers() {
    return handlers;
}