13
0
geforkt von Mirrors/Paper

Add plugin channel events. Addresses BUKKIT-1844

By: Wesley Wolfe <weswolf@aol.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2012-06-20 23:14:13 -05:00
Ursprung 803c3013d5
Commit 1c0bcd9942
3 geänderte Dateien mit 56 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,30 @@
package org.bukkit.event.player;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
/**
* This event is called after a player registers or unregisters a new plugin channel.
*/
public abstract class PlayerChannelEvent extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
private final String channel;
public PlayerChannelEvent(final Player player, final String channel) {
super(player);
this.channel = channel;
}
public final String getChannel() {
return channel;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}

Datei anzeigen

@ -0,0 +1,13 @@
package org.bukkit.event.player;
import org.bukkit.entity.Player;
/**
* This is called immediately after a player registers for a plugin channel.
*/
public class PlayerRegisterChannelEvent extends PlayerChannelEvent {
public PlayerRegisterChannelEvent(final Player player, final String channel) {
super(player, channel);
}
}

Datei anzeigen

@ -0,0 +1,13 @@
package org.bukkit.event.player;
import org.bukkit.entity.Player;
/**
* This is called immediately after a player unregisters for a plugin channel.
*/
public class PlayerUnregisterChannelEvent extends PlayerChannelEvent {
public PlayerUnregisterChannelEvent(final Player player, final String channel) {
super(player, channel);
}
}