public interface LapisBansAPI
| Modifier and Type | Method and Description |
|---|---|
PunishmentInterface |
createPunishment(PunishmentType type,
UUID appliedTo,
UUID appliedBy,
String reason,
boolean isShadow,
boolean isTemp,
Long start,
Long length)
Generate and return a punishment
|
List<PunishmentInterface> |
getAllActivePunishments(UUID uuid)
Get all currently active punishments applied to a player, this excludes punishments that have ended
|
List<PunishmentInterface> |
getAllPunishments(UUID uuid)
Get all punishments applied to a UUID, this includes punishments that have ended e.g.
|
UUID |
getConsoleUUID()
Get the UUID of the console, this can be used for
getPunishmentsAppliedBy(UUID) |
List<PunishmentInterface> |
getPunishmentsAppliedBy(UUID uuid)
Get all punishments applied by a user, these are punishments set by the provided UUID
|
UUID |
ipAddressToUUID(String ip)
IP addresses are stored as UUIDs because all punishment types store data the same way,
This means you need a way to convert an IP address to an UUID to create a punishment
This is exactly what this method does, use the IP ban punishment method of getIPAddress() to do the reverse
|
List<PunishmentInterface> getAllPunishments(UUID uuid)
uuid - The UUID of the player you wish to lookupPunishmentInterface.getAppliedTo() is equal to the provided UUIDList<PunishmentInterface> getAllActivePunishments(UUID uuid)
uuid - The UUID of the player you wish to lookupPunishmentInterface.getAppliedTo() is equal to the provided UUIDList<PunishmentInterface> getPunishmentsAppliedBy(UUID uuid)
uuid - The UUID of the user you wish to look upPunishmentInterface.getAppliedBy() is equal to the provided UUIDPunishmentInterface createPunishment(PunishmentType type, UUID appliedTo, UUID appliedBy, String reason, boolean isShadow, boolean isTemp, Long start, Long length)
type - The type of punishment you would like to make e.g. PunishmentType.BanappliedTo - The UUID of the player the punishment should be applied to
(Use ipAddressToUUID(String) to get the UUID for IP bans)appliedBy - The UUID of the user that applied the punishmentreason - The reason for the punishmentisShadow - True if the punishment should be a shadow punishment (Doesn't apply to warning or kick)isTemp - True if the punishment should expire at some point (Also doesn't apply to warning or kick)start - The start time of the punishmentlength - The length of the punishment in milliseconds, should be 0 if isTemp is falseUUID ipAddressToUUID(String ip)
ip - The IP address you wish to convert to an UUIDUUID getConsoleUUID()
getPunishmentsAppliedBy(UUID)Copyright © 2019. All rights reserved.