Class Wander
java.lang.Object
ua.mcchickenstudio.opencreative.wanders.OfflineWander
ua.mcchickenstudio.opencreative.wanders.Wander
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.pointer.Pointered
Wander
This class represents wander, that could be online. Wander is a player, who plays on planets. He has nickname, description, gender, favorite worlds and last played world.-
Nested Class Summary
Nested classes/interfaces inherited from class ua.mcchickenstudio.opencreative.wanders.OfflineWander
OfflineWander.Gender -
Field Summary
Fields inherited from class ua.mcchickenstudio.opencreative.wanders.OfflineWander
description, favoriteWorlds, friends, gender, hideHints, lastLocation, lastPlayedWorldId, links, name, uuid, visits -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable PlanetReturns current planet, where wander is currently in.@NotNull GriefStatsReturns statistics of destructive changes to world.@NotNull org.bukkit.entity.PlayerbooleanChecks whether wander is trying to connect to some planet.voidsendActionBar(@NotNull net.kyori.adventure.text.Component message) voidsendMessage(@NotNull net.kyori.adventure.text.Component message) voidsetConnectingToPlanet(boolean connectingToPlanet) Sets whether wander is currently connecting to planet.voidshowTitle(@NotNull net.kyori.adventure.title.Title title) Methods inherited from class ua.mcchickenstudio.opencreative.wanders.OfflineWander
addFavoriteWorld, addFriend, clearData, equals, getDescription, getFavoriteWorlds, getFriends, getGender, getLastLocation, getLastPlayedWorldId, getLink, getName, getOfflinePlayer, getUniqueId, getVisits, hashCode, isOnline, loadInfo, removeFavoriteWorld, removeFriend, removeLink, saveData, setDescription, setGender, setLastPlayedWorldId, setLink, setName, setVisits, shouldHideHints, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, closeDialog, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showDialog, stopSound, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Constructor Details
-
Wander
public Wander(@NotNull @NotNull org.bukkit.entity.Player player)
-
-
Method Details
-
getGriefStats
Returns statistics of destructive changes to world.It will be cleared, when player leaves the world.
- Returns:
- grief statistics.
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer() -
getCurrentPlanet
Returns current planet, where wander is currently in.- Returns:
- current planet, or null.
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendActionBar
public void sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendActionBarin interfacenet.kyori.adventure.audience.Audience
-
showTitle
public void showTitle(@NotNull @NotNull net.kyori.adventure.title.Title title) - Specified by:
showTitlein interfacenet.kyori.adventure.audience.Audience
-
setConnectingToPlanet
public void setConnectingToPlanet(boolean connectingToPlanet) Sets whether wander is currently connecting to planet.- Parameters:
connectingToPlanet- whether wander is connecting to planet or not.
-
isConnectingToPlanet
public boolean isConnectingToPlanet()Checks whether wander is trying to connect to some planet.- Returns:
- true - is connecting, false - not connecting.
-