Package dev.hypera.chameleon.user
Interface ProxyUser
-
- All Superinterfaces:
net.kyori.adventure.audience.Audience,ChatUser,net.kyori.adventure.identity.Identified,PermissionHolder,net.kyori.adventure.pointer.Pointered,User
@NonExtendable public interface ProxyUser extends User
Represents a connected Minecraft player on a proxy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect(@NotNull Server server)Attempt to switch this user to the given server.voidconnect(@NotNull Server server, @NotNull BiConsumer<Boolean,Throwable> callback)Attempt to switch this user to the given server and then run the given callback.@NotNull Optional<Server>getConnectedServer()Get the server this user is currently connected to.-
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
-
Methods inherited from interface dev.hypera.chameleon.user.ChatUser
getName, hasInteractiveChat
-
Methods inherited from interface dev.hypera.chameleon.user.PermissionHolder
hasPermission
-
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Methods inherited from interface dev.hypera.chameleon.user.User
disconnect, getAddress, getId, getLatency, identity, sendData
-
-
-
-
Method Detail
-
getConnectedServer
@NotNull @NotNull Optional<Server> getConnectedServer()
Get the server this user is currently connected to.- Returns:
- an optional containing the server the user is currently connected to, or an empty optional if the user is not connected to a server.
-
connect
void connect(@NotNull @NotNull Server server)Attempt to switch this user to the given server.- Parameters:
server- Server to switch this user to.
-
connect
void connect(@NotNull @NotNull Server server, @NotNull @NotNull BiConsumer<Boolean,Throwable> callback)Attempt to switch this user to the given server and then run the given callback.- Parameters:
server- Server to switch this user to.callback- Callback to run afterwards.
-
-