Interface User

    • Method Detail

      • isOnline

        default boolean isOnline()
        Description copied from interface: OfflineUser
        Is the user online?
        Specified by:
        isOnline in interface OfflineUser
        Returns:
        true if the user is online
      • hasPermission

        default boolean hasPermission​(@NotNull
                                      @NotNull ADPPermission permission)
        Does the user have the permission?
        Parameters:
        permission - the permission to check
        Returns:
        true if the user have the given permission
      • hasPermission

        boolean hasPermission​(@NotNull
                              @NotNull String permission)
        Does the user have the permission?
        Parameters:
        permission - the permission to check
        Returns:
        true if the user have the given permission
      • getDynamicPermission

        @Nullable
        @Nullable String getDynamicPermission​(@NotNull
                                              @NotNull String startsWith)
        Get a specific permission that starts with given string and returns that permission without the starter part
        Parameters:
        startsWith - the start of the permission to find
        Returns:
        permission name
      • isPlayer

        boolean isPlayer()
        Is a player? (Check if is a player or a console user)
        Returns:
        true if is a player
      • getDisplayName

        @Nullable
        @Nullable String getDisplayName()
        Get the display name of the user
        Returns:
        the display name of the user
      • sendMessage

        void sendMessage​(@NotNull
                         @NotNull String message,
                         boolean colorTranslation)
        Send a message to the user
        Parameters:
        message - the message to send
        colorTranslation - toggle color translation
      • sendTitle

        void sendTitle​(@NotNull
                       @NotNull String message,
                       int fadeInTime,
                       int showTime,
                       int fadeOutTime)
        Send a title to the user
        Parameters:
        message - the message to send
        fadeInTime - fade time in milliseconds
        showTime - show time in milliseconds
        fadeOutTime - fade out time in milliseconds
      • chat

        void chat​(@NotNull
                  @NotNull String message)
        Perform a chat message by the user
        Parameters:
        message - the message to send
      • playSound

        void playSound​(@NotNull
                       @NotNull String sound,
                       double volume,
                       double pitch)
        Play a sound
        Parameters:
        sound - the name of the sound
        volume - the volume of the sound
        pitch - the pitch of the sound
      • isVanished

        boolean isVanished()
        Is the player vanished?
        Returns:
        true if the player is vanished
      • getLocation

        @Nullable
        @Nullable ADPLocation getLocation()
        Get the user location, if possible
        Returns:
        the location otherwise null
      • isInsideNetwork

        default boolean isInsideNetwork()
        Is the user inside the current network?
        Returns:
        true if the user is inside the current network