public class ListeningWhitelist extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ListeningWhitelist.Builder
Represents a builder of whitelists.
|
| Modifier and Type | Field and Description |
|---|---|
static ListeningWhitelist |
EMPTY_WHITELIST
A whitelist with no packets - indicates that the listener shouldn't observe any packets.
|
| Constructor and Description |
|---|
ListeningWhitelist(ListenerPriority priority,
Integer... whitelist)
Deprecated.
|
ListeningWhitelist(ListenerPriority priority,
Integer[] whitelist,
GamePhase gamePhase)
Deprecated.
|
ListeningWhitelist(ListenerPriority priority,
Integer[] whitelist,
GamePhase gamePhase,
ListenerOptions... options)
Deprecated.
|
ListeningWhitelist(ListenerPriority priority,
Set<Integer> whitelist)
Deprecated.
|
ListeningWhitelist(ListenerPriority priority,
Set<Integer> whitelist,
GamePhase gamePhase)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsAny(ListeningWhitelist whitelist,
int... idList)
Determine if any of the given IDs can be found in the whitelist.
|
boolean |
equals(Object obj) |
GamePhase |
getGamePhase()
Retrieve which game phase this listener is active under.
|
Set<ListenerOptions> |
getOptions()
Retrieve every special option associated with this whitelist.
|
ListenerPriority |
getPriority()
Retrieve the priority in the execution order of the packet listener.
|
Set<PacketType> |
getTypes()
Retrieves a set of the packets that will be observed by the listeners.
|
Set<Integer> |
getWhitelist()
Deprecated.
|
int |
hashCode() |
static boolean |
isEmpty(ListeningWhitelist whitelist)
Determine if the given whitelist is empty or not.
|
boolean |
isEnabled()
Whether or not this whitelist has any enabled packets.
|
static ListeningWhitelist.Builder |
newBuilder()
Construct a new builder of whitelists.
|
static ListeningWhitelist.Builder |
newBuilder(ListeningWhitelist template)
Construct a new builder of whitelists initialized to the same values as the template.
|
String |
toString() |
public static final ListeningWhitelist EMPTY_WHITELIST
@Deprecated public ListeningWhitelist(ListenerPriority priority, Set<Integer> whitelist)
Deprecated: Use newBuilder() instead.
priority - - the listener priority.whitelist - - set of IDs to observe/enable.@Deprecated public ListeningWhitelist(ListenerPriority priority, Set<Integer> whitelist, GamePhase gamePhase)
Deprecated: Use newBuilder() instead.
priority - - the listener priority.whitelist - - set of IDs to observe/enable.gamePhase - - which game phase to receieve notifications on.@Deprecated public ListeningWhitelist(ListenerPriority priority, Integer... whitelist)
Deprecated: Use newBuilder() instead.
priority - - the listener priority.whitelist - - list of packet IDs to observe/enable.@Deprecated public ListeningWhitelist(ListenerPriority priority, Integer[] whitelist, GamePhase gamePhase)
Deprecated: Use newBuilder() instead.
priority - - the listener priority.whitelist - - list of packet IDs to observe/enable.gamePhase - - which game phase to receieve notifications on.@Deprecated public ListeningWhitelist(ListenerPriority priority, Integer[] whitelist, GamePhase gamePhase, ListenerOptions... options)
Deprecated: Use newBuilder() instead.
priority - - the listener priority.whitelist - - list of packet IDs to observe/enable.gamePhase - - which game phase to receieve notifications on.options - - every special option associated with this whitelist.public boolean isEnabled()
public ListenerPriority getPriority()
@Deprecated public Set<Integer> getWhitelist()
Deprecated: Use getTypes() instead.
public Set<PacketType> getTypes()
public GamePhase getGamePhase()
public Set<ListenerOptions> getOptions()
public static boolean containsAny(ListeningWhitelist whitelist, int... idList)
whitelist - - whitelist to test.idList - - list of packet IDs to find.public static boolean isEmpty(ListeningWhitelist whitelist)
whitelist - - the whitelist to test.public static ListeningWhitelist.Builder newBuilder()
public static ListeningWhitelist.Builder newBuilder(ListeningWhitelist template)
template - - the template object.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.