Class Ban

java.lang.Object
dev.plex.banning.Ban

@Entity(value="bans", useDiscriminator=false) public class Ban extends Object
The ban object
See Also:
  • Field Details

    • id

      @Id private String id
      Gets the id of the ban (first 8 characters of a UUID + random 6 letters)
    • uuid

      @Indexed(options=@IndexOptions(unique=true)) private UUID uuid
      The unique ID of the player who was banned
    • ip

      private String ip
      The IP of the banned player
    • reason

      private String reason
      The reason for the ban
    • endDate

      private LocalDateTime endDate
      The end date for the ban
    • active

      private boolean active
      Whether the ban is active or not
  • Constructor Details

    • Ban

      private Ban()
      A constructor for Morphia, can't be used
    • Ban

      public Ban(UUID uuid, UUID banner, String ip, String reason, LocalDateTime endDate)
      Creates a ban object
      Parameters:
      uuid - The unique ID of the player being banned
      banner - The unique ID of the sender banning the player
      ip - The IP of the player being banned
      reason - The reason for the ban
      endDate - When the ban will expire
    • Ban

      public Ban(String id, UUID uuid, UUID banner, String ip, String reason, LocalDateTime endDate)
      Creates a ban object
      Parameters:
      id - The custom ID of the ban
      uuid - The unique ID of the player being banned
      banner - The unique ID of the sender banning the player
      ip - The IP of the player being banned
      reason - The reason for the ban
      endDate - When the ban will expire