Class VelocityUser

  • All Implemented Interfaces:
    com.alessiodp.core.common.user.OfflineUser, com.alessiodp.core.common.user.User
    Direct Known Subclasses:
    VelocityRedisBungeeUser

    public class VelocityUser
    extends Object
    implements com.alessiodp.core.common.user.User
    • Field Detail

      • plugin

        protected final com.alessiodp.core.common.ADPPlugin plugin
      • sender

        protected final com.velocitypowered.api.command.CommandSource sender
    • Constructor Detail

      • VelocityUser

        public VelocityUser()
    • Method Detail

      • getUUID

        public UUID getUUID()
        Specified by:
        getUUID in interface com.alessiodp.core.common.user.OfflineUser
      • hasPermission

        public boolean hasPermission​(@NotNull
                                     @NotNull String permission)
        Specified by:
        hasPermission in interface com.alessiodp.core.common.user.User
      • getDynamicPermission

        @Nullable
        public @Nullable String getDynamicPermission​(@NotNull
                                                     @NotNull String startsWith)
        Specified by:
        getDynamicPermission in interface com.alessiodp.core.common.user.User
      • isOperator

        public boolean isOperator()
        Specified by:
        isOperator in interface com.alessiodp.core.common.user.OfflineUser
      • isPlayer

        public boolean isPlayer()
        Specified by:
        isPlayer in interface com.alessiodp.core.common.user.User
      • isBanned

        public boolean isBanned()
        Specified by:
        isBanned in interface com.alessiodp.core.common.user.OfflineUser
      • getName

        @Nullable
        public @Nullable String getName()
        Specified by:
        getName in interface com.alessiodp.core.common.user.OfflineUser
      • getDisplayName

        @Nullable
        public @Nullable String getDisplayName()
        Specified by:
        getDisplayName in interface com.alessiodp.core.common.user.User
      • sendMessage

        public void sendMessage​(@NotNull
                                @NotNull String message,
                                boolean colorTranslation)
        Specified by:
        sendMessage in interface com.alessiodp.core.common.user.User
      • sendTitle

        public void sendTitle​(@NotNull
                              @NotNull String message,
                              int fadeInTime,
                              int showTime,
                              int fadeOutTime)
        Specified by:
        sendTitle in interface com.alessiodp.core.common.user.User
      • chat

        public void chat​(@NotNull
                         @NotNull String messageToSend)
        Specified by:
        chat in interface com.alessiodp.core.common.user.User
      • playSound

        public void playSound​(@NotNull
                              @NotNull String sound,
                              double volume,
                              double pitch)
        Specified by:
        playSound in interface com.alessiodp.core.common.user.User
      • isVanished

        public boolean isVanished()
        Specified by:
        isVanished in interface com.alessiodp.core.common.user.User
      • getLocation

        @Nullable
        public @Nullable com.alessiodp.core.common.utils.ADPLocation getLocation()
        Specified by:
        getLocation in interface com.alessiodp.core.common.user.User
      • getPlugin

        @NotNull
        public @NotNull com.alessiodp.core.common.ADPPlugin getPlugin()
        Specified by:
        getPlugin in interface com.alessiodp.core.common.user.OfflineUser
      • getSender

        @NotNull
        public @NotNull com.velocitypowered.api.command.CommandSource getSender()
        Get original sender
        Returns:
        the sender
      • getServerName

        @NotNull
        public @NotNull String getServerName()
        Get server name of the user
        Returns:
        the server name
      • getServer

        @Nullable
        public @Nullable com.velocitypowered.api.proxy.server.RegisteredServer getServer()
        Get registered server of the user
        Returns:
        the registered server
      • connectTo

        public void connectTo​(@NotNull
                              @NotNull com.velocitypowered.api.proxy.server.RegisteredServer registeredServer)
        Force the user to connect to the given server
        Parameters:
        registeredServer - the registered server