Class CompositeVictim
java.lang.Object
space.arim.libertybans.api.Victim
space.arim.libertybans.api.CompositeVictim
An victim which is a composite of a UUID and an IP address.
This can be thought of as an IP ban which is slightly more powerful,
because it applies to the banned user's UUID as well.
- Author:
- A248
-
Nested Class Summary
Nested classes/interfaces inherited from class Victim
Victim.VictimType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkAddressThe wildcard (empty) network address.static final UUIDThe wildcard (empty) UUID. -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluates whether this victim is the same as anotherGets the network address of this victimgetType()Gets this victim's type:Victim.VictimType.COMPOSITEgetUUID()Gets the UUID of this victiminthashCode()static CompositeVictimGets a victim for the UUID and address bytes.static CompositeVictimof(UUID uuid, InetAddress address) Gets a victim for the UUID and addressstatic CompositeVictimof(UUID uuid, NetworkAddress address) Gets a victim for the UUID and addresstoString()
-
Field Details
-
WILDCARD_UUID
The wildcard (empty) UUID. This is used as a special value in several places where victims are accepted, so as to match all composite victims with a given IP address while disregarding the UUID.
Punishments cannot be made using this UUID; punishments can only be selected and revoked using it. -
WILDCARD_ADDRESS
The wildcard (empty) network address. This is used as a special value in several places where victims are accepted, so as to match all composite victims with a given UUID while disregarding the IP address.
Punishments cannot be made using this IP address; punishments can only be seleted and revoked using it.
If this is combined withWILDCARD_UUID, the result is a composite victim which will match all composite victims.
-
-
Method Details
-
of
Gets a victim for the UUID and address- Parameters:
uuid- the UUIDaddress- the network address- Returns:
- a composite victim
-
of
Gets a victim for the UUID and address- Parameters:
uuid- the UUIDaddress- the inet address- Returns:
- a composite victim
-
of
Gets a victim for the UUID and address bytes. Shortcut forCompositeVictim.of(uuid, NetworkAddress.of(address))- Parameters:
uuid- the UUIDaddress- the raw address bytes- Returns:
- a composite victim
- Throws:
IllegalArgumentException- if the address bytes array is of illegal length
-
getType
Gets this victim's type:Victim.VictimType.COMPOSITE -
getUUID
-
getAddress
-
equals
-
hashCode
-
toString
-