geforkt von Mirrors/Paper
Add plugin channel events. Addresses BUKKIT-1844
By: Wesley Wolfe <weswolf@aol.com>
Dieser Commit ist enthalten in:
Ursprung
803c3013d5
Commit
1c0bcd9942
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren