Package dev.plex.punishment

# Class Punishment

java.lang.Object
dev.plex.punishment.Punishment

@Entity public class Punishment extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private boolean`
  `active`
  `private static final String`
  `banUrl`
  `private boolean`
  `customTime`
  `private ZonedDateTime`
  `endDate`
  `private static final com.google.gson.Gson`
  `gson`
  `private String`
  `ip`
  `private final UUID`
  `punished`
  `private String`
  `punishedUsername`
  `private final UUID`
  `punisher`
  `private String`
  `reason`
  `private PunishmentType`
  `type`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Punishment()`
  `Punishment(UUID punished, UUID punisher)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Punishment`
  `fromJson(String json)`
  `static net.kyori.adventure.text.Component`
  `generateBanMessage(Punishment punishment)`
  `static net.kyori.adventure.text.Component`
  `generateIndefBanMessage(String type)`
  `String`
  `toJSON()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### gson

    private static final com.google.gson.Gson gson

  - ### banUrl

    private static final String banUrl

  - ### punished

    private final UUID punished

  - ### punisher

    private final UUID punisher

  - ### ip

    private String ip

  - ### punishedUsername

    private String punishedUsername

  - ### type

    private PunishmentType type

  - ### reason

    private String reason

  - ### customTime

    private boolean customTime

  - ### active

    private boolean active

  - ### endDate

    private ZonedDateTime endDate

- ## Constructor Details

  - ### Punishment

    public Punishment()

  - ### Punishment

    public Punishment(UUID punished, UUID punisher)

- ## Method Details

  - ### generateBanMessage

    public static net.kyori.adventure.text.Component generateBanMessage(Punishment punishment)

  - ### generateIndefBanMessage

    public static net.kyori.adventure.text.Component generateIndefBanMessage(String type)

  - ### fromJson

    public static Punishment fromJson(String json)

  - ### toJSON

    public String toJSON()