public interface NucleusNameBanService
Modifier and Type | Method and Description |
---|---|
void |
addName(java.lang.String name,
java.lang.String reason,
org.spongepowered.api.event.cause.Cause cause)
Adds a name to a blacklist, preventing them from joining the server.
|
java.util.Optional<java.lang.String> |
getReasonForBan(java.lang.String name)
If a name is banned, returns the reason.
|
void |
removeName(java.lang.String name,
org.spongepowered.api.event.cause.Cause cause)
Removes a name from the blacklist.
|
void addName(java.lang.String name, java.lang.String reason, org.spongepowered.api.event.cause.Cause cause) throws NameBanException
name
- The namereason
- The reason to give for the banningcause
- The Cause
of this requestNameBanException
- thrown if the name could not be added to the listjava.util.Optional<java.lang.String> getReasonForBan(java.lang.String name)
name
- The name to get the reason forvoid removeName(java.lang.String name, org.spongepowered.api.event.cause.Cause cause) throws NameBanException
name
- The name to removecause
- The Cause
of this requestNameBanException
- thrown if the name could not be removed from the list