Interface PunishmentInterface
-
- All Known Subinterfaces:
BanInterface,IPBanInterface,KickInterface,MuteInterface,TempBanInterface,TempIPBanInterface,TempMuteInterface,TemporaryPunishmentInterface,WarningInterface
public interface PunishmentInterfaceRepresents a punishment applied to a player
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreatePunishment()Creates the punishment in the database and adds it to the punishment manager, This may not implement the punishment in all cases (e.g.java.lang.StringgetAction()Returns the name of the punishment, e.g.java.lang.StringgetActioned()Returns the action this punishment makes e.g.java.util.UUIDgetAppliedBy()Get the UUID of the user who applied the punishmentjava.util.UUIDgetAppliedTo()Get the UUID of the player the punishment has been applied tojava.lang.StringgetReason()Get the reason for this punishmentjava.lang.LonggetStart()Get the system time when the punishment startedPunishmentTypegetType()Get the type of punishment that this punishment object represents e.g.java.lang.StringgetUndo()Returns the undoing action for this punishment e.g.booleanisShadow()Is the punishment shadow, shadow punishments will not notify the player in any wayvoidreversePunishment()Reverse the punishment This will disable the effects of the punishment and remove it from the database and history
-
-
-
Method Detail
-
getType
PunishmentType getType()
Get the type of punishment that this punishment object represents e.g. Ban would returnPunishmentType.Ban- Returns:
- Returns the
PunishmentTypefor this punishment
-
getAppliedTo
java.util.UUID getAppliedTo()
Get the UUID of the player the punishment has been applied to- Returns:
- Returns the UUID of the player that this punishment has been applied to
-
getAppliedBy
java.util.UUID getAppliedBy()
Get the UUID of the user who applied the punishment- Returns:
- Returns the UUID of the user that applied this punishment
-
getReason
java.lang.String getReason()
Get the reason for this punishment- Returns:
- Returns the reason that was given when this punishment was applied
-
isShadow
boolean isShadow()
Is the punishment shadow, shadow punishments will not notify the player in any way- Returns:
- Returns true if this punishment is a shadow punishment, otherwise false
-
getStart
java.lang.Long getStart()
Get the system time when the punishment started- Returns:
- Returns the time when the punishment started
-
createPunishment
void createPunishment()
Creates the punishment in the database and adds it to the punishment manager, This may not implement the punishment in all cases (e.g. bans wont kick players but mutes will be applied when this is called)
-
reversePunishment
void reversePunishment()
Reverse the punishment This will disable the effects of the punishment and remove it from the database and history
-
getActioned
java.lang.String getActioned()
Returns the action this punishment makes e.g. Ban would return Banned This is used for announcements- Returns:
- The action this punishment takes
-
getUndo
java.lang.String getUndo()
Returns the undoing action for this punishment e.g. Ban would return Unbanned This is used for the pardon message announcement- Returns:
- The undoing action for this punishment
-
getAction
java.lang.String getAction()
Returns the name of the punishment, e.g. Ban would return Ban- Returns:
- Returns the name of the punishment
-
-