Class UserBan

    • Constructor Detail

      • UserBan

        public UserBan​(Database database)
      • UserBan

        public UserBan​(Database database,
                       User user,
                       User banningUser,
                       int end,
                       java.lang.String reason)
    • Method Detail

      • getUserBanId

        public int getUserBanId()
      • getUser

        public User getUser()
        Description copied from interface: UserBan
        Gets the user that was banned.
        Specified by:
        getUser in interface UserBan
        Returns:
        banned user instance.
      • getReason

        public java.lang.String getReason()
        Description copied from interface: UserBan
        Gets the reason for the user being banned.
        Specified by:
        getReason in interface UserBan
        Returns:
        ban reason.
      • getBanningUser

        public User getBanningUser()
        Description copied from interface: UserBan
        Gets the user that created this ban record, null if no reason was supplied.
        Specified by:
        getBanningUser in interface UserBan
        Returns:
        ban reason.
      • getDate

        public java.util.Date getDate()
        Description copied from interface: UserBan
        Gets the date that the ban was created.
        Specified by:
        getDate in interface UserBan
        Returns:
        Date instance.
      • getEnd

        public java.util.Date getEnd()
        Description copied from interface: UserBan
        Gets the date that the ban ends, null if there is no end.
        Specified by:
        getEnd in interface UserBan
        Returns:
        Ban end.
      • isPardoned

        public boolean isPardoned()
        Description copied from interface: UserBan
        Finds if the ban has been pardoned.
        Specified by:
        isPardoned in interface UserBan
        Returns:
        true if the ban was pardoned, false otherwise.
      • pardon

        public void pardon()
                    throws java.lang.SecurityException
        Description copied from interface: UserBan
        Pardons the ban.
        Specified by:
        pardon in interface UserBan
        Throws:
        java.lang.SecurityException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object