Interface Spieler
- All Superinterfaces:
BefehlAbsender
,Berechtigtbar
,Beschaedigbar
,BestaendigeDatenInhaber
,GespraechsPartner
,InventarInhaber
,KonfigurationsSerialisierbar
,Lebewesen
,MenschlichesWesen
,MerkmalInhaber
,MetadatenInhaber
,Nennbar
,OfflineSpieler
,ProjektilQuelle
,ServerBetreiber
,TierZaehmer
,Wesen
,ZusatzmodulNachrichtAddressat
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomChatCompletions
(Collection<String> completions) Add custom chat completion suggestions shown to the spieler while typing a message.Adds this user to theProfilHausverbotsListe
.Adds this user to theProfilHausverbotsListe
.Adds this user to theProfilHausverbotsListe
.Adds this user's current IP address to theIpHausverbotsListe
.Adds this user's current IP address to theIpHausverbotsListe
.Adds this user's current IP address to theIpHausverbotsListe
.boolean
breakBlock
(Block block) Force this spieler to break a Block using the item in their main hand.boolean
Checks to see if a spieler has been hidden from this spielerboolean
Checks to see if an wesen has been visually hidden from this spieler.void
Says a message (or runs a befehl).Gets the socket address of this spielergetAdvancementProgress
(Fortschritt fortschritt) Return the spieler's progression on the specified fortschritt.boolean
Determines if the Spieler is allowed to fly via jump key double-tap like in creative mode.Gets the Ort where the spieler will spawn at their bed, null if they have not slept in one or their current bed spawn is invalid.int
Get the spieler's current client side view distance.Get the previously set compass target.Gets the "friendly" name to display of this spieler.float
getExp()
Gets the players current experience points towards the next level.int
Gets the spieler's cooldown between picking up experience orbs.float
Gets the current allowed speed that a client can fly.double
Gets the number that health is scaled to for the client.int
getLevel()
Gets the players current experience levelGets the spieler's current locale.getName()
Returns the name of this spielerint
getPing()
Gets the spieler's estimated ping in milliseconds.Gets the currently displayed spieler list footer for this spieler.Gets the currently displayed spieler list header for this spieler.Gets the name that is shown on the spieler list.long
Returns the spieler's current timestamp.long
Returns the spieler's current time offset relative to server time, or the current spieler's fixed time if the spieler's time is absolute.Returns the type of wetter the spieler is currently experiencing.Gets this spieler's previousSpielModus
Gets the Anzeigetafel displayed to this spielerGets the wesen which is followed by the camera when inSpielModus.SPECTATOR
.int
Gets the players total experience points.float
Gets the current allowed speed that a client can walk.Gets theWeltGrenze
visible to this Spieler, or null if viewing the welt's welt border.void
giveExp
(int amount) Gives the spieler the amount of experience specified.void
giveExpLevels
(int amount) Gives the spieler the amount of experience levels specified.void
hideEntity
(Zusatzmodul zusatzmodul, Wesen wesen) Visually hides an wesen from this spieler.void
hidePlayer
(Spieler spieler) Deprecated.void
hidePlayer
(Zusatzmodul zusatzmodul, Spieler spieler) Hides a spieler from this spielerboolean
Gets whether the spieler has the "Allow Server Listings" setting enabled.boolean
isFlying()
Checks to see if this spieler is currently flying or not.boolean
Gets if the client is displayed a 'scaled' health, that is, health on a scale from 0-getHealthScale()
.boolean
Deprecated.This value is controlled only by the client and is therefore unreliable and vulnerable to spoofing and/or desync depending on the context/time which it is accessedboolean
Returns true if the spieler's time is relative to the server time, otherwise the spieler's time is absolute and will not change its current time unless done so with setPlayerTime().boolean
Returns whether the spieler is sleeping ignored.boolean
Returns if the spieler is in sneak modeboolean
Gets whether the spieler is sprinting or not.void
kickPlayer
(String message) Kicks spieler with custom kick message.void
loadData()
Loads the players current location, health, inventar, motion, and other information from the username.dat datei, in the welt/spieler folder.void
openBook
(GegenstandsStapel book) Open aMaterial.WRITTEN_BOOK
for a Spielervoid
Open a Sign for editing by the Spieler.void
Open a Sign for editing by the Spieler.boolean
performCommand
(String command) Makes the spieler perform the given befehlvoid
playEffect
(Ort loc, Effekt effekt, int data) Deprecated.Magic value<T> void
playEffect
(Ort loc, Effekt effekt, T data) Plays an effekt to just this spieler.void
Deprecated.Magic valuevoid
playNote
(Ort loc, Instrument instrument, Note note) Play a note for the spieler at a location.void
Play a geraeusch for a spieler at the ort.void
playSound
(Ort ort, Geraeusch geraeusch, GeraeuschKategorie category, float volume, float pitch) Play a geraeusch for a spieler at the ort.void
playSound
(Ort ort, Geraeusch geraeusch, GeraeuschKategorie category, float volume, float pitch, long seed) Play a geraeusch for a spieler at the ort.void
Play a sound for a spieler at the ort.void
playSound
(Ort ort, String sound, GeraeuschKategorie category, float volume, float pitch) Play a sound for a spieler at the ort.void
playSound
(Ort ort, String sound, GeraeuschKategorie category, float volume, float pitch, long seed) Play a sound for a spieler at the ort.void
Play a geraeusch for a spieler at the location of the wesen.void
playSound
(Wesen wesen, Geraeusch geraeusch, GeraeuschKategorie category, float volume, float pitch) Play a geraeusch for a spieler at the location of the wesen.void
playSound
(Wesen wesen, Geraeusch geraeusch, GeraeuschKategorie category, float volume, float pitch, long seed) Play a geraeusch for a spieler at the location of the wesen.void
Play a sound for a spieler at the location of the wesen.void
playSound
(Wesen wesen, String sound, GeraeuschKategorie category, float volume, float pitch) Play a sound for a spieler at the location of the wesen.void
playSound
(Wesen wesen, String sound, GeraeuschKategorie category, float volume, float pitch, long seed) Play a sound for a spieler at the location of the wesen.void
removeCustomChatCompletions
(Collection<String> completions) Remove custom chat completion suggestions shown to the spieler while typing a message.void
Request that the spieler's client remove a resource pack sent by the server.void
Request that the spieler's client remove all loaded resource pack sent by the server.void
Restores the normal condition where the spieler's time is synchronized with the server time.void
Restores the normal condition where the spieler's wetter is controlled by server conditions.void
Resets the title displayed to the spieler.void
saveData()
Saves the players current location, health, inventar, motion, and other information into the username.dat datei, in the welt/spieler foldervoid
sendBlockChange
(Ort loc, BlockData block) Send a block change.void
sendBlockChange
(Ort loc, Material material, byte data) Deprecated.Magic valuevoid
sendBlockChanges
(Collection<BlockState> blocks) Send a multi-block change.void
sendBlockChanges
(Collection<BlockState> blocks, boolean suppressLightUpdates) Deprecated.suppressLightUpdates is not functional in versions greater than 1.19.4void
sendBlockDamage
(Ort loc, float progress) Send block damage.void
sendBlockDamage
(Ort loc, float progress, int sourceId) Send block damage.void
sendBlockDamage
(Ort loc, float progress, Wesen source) Send block damage.void
sendBlockUpdate
(Ort loc, TileState tileState) Send a TileState change.void
sendEquipmentChange
(Lebewesen entity, AusstattungsSpalte slot, GegenstandsStapel item) Send an equipment change for the target wesen.void
sendEquipmentChange
(Lebewesen entity, Map<AusstattungsSpalte, GegenstandsStapel> items) Send multiple equipment changes for the target wesen.void
sendExperienceChange
(float progress) Send an experience change.void
sendExperienceChange
(float progress, int level) Send an experience change.void
Send a health update to the spieler using its known server values.void
sendHealthUpdate
(double health, int foodLevel, float saturation) Send a health update to the spieler.void
sendHurtAnimation
(float yaw) Send a hurt animation.void
sendMap
(KartenAnsicht map) Render a karte and send it to the spieler in its entirety.void
sendRawMessage
(String message) Sends this sender a message rawvoid
sendSignChange
(Ort loc, String[] lines) Send a sign change.void
sendSignChange
(Ort loc, String[] lines, FarbstoffFarbe farbstoffFarbe) Send a sign change.void
sendSignChange
(Ort loc, String[] lines, FarbstoffFarbe farbstoffFarbe, boolean hasGlowingText) Send a sign change.void
Deprecated.API behavior subject to changevoid
Sends a title and a subtitle message to the spieler.void
setAllowFlight
(boolean flight) Sets if the Spieler is allowed to fly via jump key double-tap like in creative mode.void
setBedSpawnLocation
(Ort ort) Sets the Ort where the spieler will spawn at their bed.void
setBedSpawnLocation
(Ort ort, boolean force) Sets the Ort where the spieler will spawn at their bed.void
setCompassTarget
(Ort loc) Set the target of the spieler's compass.void
setCustomChatCompletions
(Collection<String> completions) Set the list of chat completion suggestions shown to the spieler while typing a message.void
setDisplayName
(String name) Sets the "friendly" name to display of this spieler.void
setExp
(float exp) Sets the players current experience points towards the next levelvoid
setExpCooldown
(int ticks) Sets the spieler's cooldown between picking up experience orbs..void
setFlying
(boolean value) Makes this spieler start or stop flying.void
setFlySpeed
(float value) Sets the speed at which a client will fly.void
setHealthScale
(double scale) Sets the number to scale health to for the client; this will alsosetHealthScaled(true)
.void
setHealthScaled
(boolean scale) Sets if the client is displayed a 'scaled' health, that is, health on a scale from 0-getHealthScale()
.void
setLevel
(int level) Sets the players current experience levelvoid
setPlayerListFooter
(String footer) Sets the currently displayed spieler list footer for this spieler.void
setPlayerListHeader
(String header) Sets the currently displayed spieler list header for this spieler.void
setPlayerListHeaderFooter
(String header, String footer) Sets the currently displayed spieler list header and footer for this spieler.void
setPlayerListName
(String name) Sets the name that is shown on the in-game spieler list.void
setPlayerTime
(long time, boolean relative) Sets the current time on the spieler's client.void
setPlayerWeather
(WetterTyp type) Sets the type of wetter the spieler will see.void
setResourcePack
(String url) Request that the spieler's client download and switch resource pakete.void
setResourcePack
(String url, byte[] hash) Request that the spieler's client download and switch resource pakete.void
setResourcePack
(String url, byte[] hash, boolean force) Request that the spieler's client download and switch resource pakete.void
setResourcePack
(String url, byte[] hash, String prompt) Request that the spieler's client download and switch resource pakete.void
setResourcePack
(String url, byte[] hash, String prompt, boolean force) Request that the spieler's client download and switch resource pakete.void
setResourcePack
(UUID id, String url, byte[] hash, String prompt, boolean force) Request that the spieler's client download and switch resource pakete.void
setScoreboard
(Anzeigetafel anzeigetafel) Sets the spieler's visible Anzeigetafel.void
setSleepingIgnored
(boolean isSleeping) Sets whether the spieler is ignored as not sleeping.void
setSneaking
(boolean sneak) Sets the sneak mode the spielervoid
setSpectatorTarget
(Wesen wesen) Sets the wesen which is followed by the camera when inSpielModus.SPECTATOR
.void
setSprinting
(boolean sprinting) Sets whether the spieler is sprinting or not.void
setTexturePack
(String url) Deprecated.Minecraft no longer uses textures pakete.void
setTotalExperience
(int exp) Sets the players current experience points.void
setWalkSpeed
(float value) Sets the speed at which a client will walk.void
setWorldBorder
(WeltGrenze border) Sets theWeltGrenze
visible to this Spieler.void
Shows the demo screen to the spieler, this screen is normally only seen in the demo version of the game.void
showEntity
(Zusatzmodul zusatzmodul, Wesen wesen) Allows this spieler to see an wesen that was previously hidden.void
showPlayer
(Spieler spieler) Deprecated.void
showPlayer
(Zusatzmodul zusatzmodul, Spieler spieler) Allows this spieler to see a spieler that was previously hidden.void
spawnParticle
(Partikel partikel, double x, double y, double z, int count) Spawns the partikel (the number of times specified by count) at the target location.void
spawnParticle
(Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) Spawns the partikel (the number of times specified by count) at the target location.void
spawnParticle
(Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) Spawns the partikel (the number of times specified by count) at the target location.<T> void
spawnParticle
(Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) Spawns the partikel (the number of times specified by count) at the target location.<T> void
spawnParticle
(Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) Spawns the partikel (the number of times specified by count) at the target location.<T> void
spawnParticle
(Partikel partikel, double x, double y, double z, int count, T data) Spawns the partikel (the number of times specified by count) at the target location.void
spawnParticle
(Partikel partikel, Ort ort, int count) Spawns the partikel (the number of times specified by count) at the target ort.void
spawnParticle
(Partikel partikel, Ort ort, int count, double offsetX, double offsetY, double offsetZ) Spawns the partikel (the number of times specified by count) at the target ort.void
spawnParticle
(Partikel partikel, Ort ort, int count, double offsetX, double offsetY, double offsetZ, double extra) Spawns the partikel (the number of times specified by count) at the target ort.<T> void
spawnParticle
(Partikel partikel, Ort ort, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) Spawns the partikel (the number of times specified by count) at the target ort.<T> void
spawnParticle
(Partikel partikel, Ort ort, int count, double offsetX, double offsetY, double offsetZ, T data) Spawns the partikel (the number of times specified by count) at the target ort.<T> void
spawnParticle
(Partikel partikel, Ort ort, int count, T data) Spawns the partikel (the number of times specified by count) at the target ort.void
Stop all sounds from playing.void
Stop the specified geraeusch from playing.void
stopSound
(GeraeuschKategorie category) Stop the specified sound category from playing.void
stopSound
(Geraeusch geraeusch, GeraeuschKategorie category) Stop the specified geraeusch from playing.void
Stop the specified sound from playing.void
stopSound
(String sound, GeraeuschKategorie category) Stop the specified sound from playing.void
Update the list of commands sent to the client.void
Forces an update of the spieler's entire inventar.Methods inherited from interface de.eimmer.befehl.BefehlAbsender
sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface de.eimmer.berechtigungen.Berechtigtbar
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface de.eimmer.wesen.Beschaedigbar
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
Methods inherited from interface de.eimmer.bestaendigkeit.BestaendigeDatenInhaber
getPersistentDataContainer
Methods inherited from interface de.eimmer.gespraeche.GespraechsPartner
abandonConversation, abandonConversation, acceptConversationInput, beginConversation, isConversing, sendRawMessage
Methods inherited from interface de.eimmer.konfiguration.serialisierung.KonfigurationsSerialisierbar
serialize
Methods inherited from interface de.eimmer.wesen.Lebewesen
addPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isLeashed, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, swingMainHand, swingOffHand
Methods inherited from interface de.eimmer.wesen.MenschlichesWesen
closeInventory, discoverRecipe, discoverRecipes, dropItem, fireworkBoost, getAttackCooldown, getBedLocation, getCooldown, getDiscoveredRecipes, getEnchantmentSeed, getEnderChest, getExhaustion, getExpToLevel, getFoodLevel, getGameMode, getInventory, getItemInHand, getItemInUse, getItemOnCursor, getLastDeathLocation, getMainHand, getOpenInventory, getSaturatedRegenRate, getSaturation, getShoulderEntityLeft, getShoulderEntityRight, getSleepTicks, getStarvationRate, getUnsaturatedRegenRate, hasCooldown, hasDiscoveredRecipe, isBlocking, isHandRaised, openEnchanting, openInventory, openInventory, openMerchant, openMerchant, openWorkbench, setCooldown, setEnchantmentSeed, setExhaustion, setFoodLevel, setGameMode, setItemInHand, setItemOnCursor, setLastDeathLocation, setSaturatedRegenRate, setSaturation, setShoulderEntityLeft, setShoulderEntityRight, setStarvationRate, setUnsaturatedRegenRate, setWindowProperty, sleep, undiscoverRecipe, undiscoverRecipes, wakeup
Methods inherited from interface de.eimmer.merkmal.MerkmalInhaber
getAttribute
Methods inherited from interface de.eimmer.metadaten.MetadatenInhaber
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface de.eimmer.Nennbar
getCustomName, setCustomName
Methods inherited from interface de.eimmer.OfflineSpieler
ban, ban, ban, decrementStatistic, decrementStatistic, decrementStatistic, decrementStatistic, decrementStatistic, decrementStatistic, getFirstPlayed, getLastDeathLocation, getLastPlayed, getPlayer, getPlayerProfile, getStatistic, getStatistic, getStatistic, getUniqueId, hasPlayedBefore, incrementStatistic, incrementStatistic, incrementStatistic, incrementStatistic, incrementStatistic, incrementStatistic, isBanned, isOnline, isWhitelisted, setStatistic, setStatistic, setStatistic, setWhitelisted
Methods inherited from interface de.eimmer.projektile.ProjektilQuelle
launchProjectile, launchProjectile
Methods inherited from interface de.eimmer.berechtigungen.ServerBetreiber
isOp, setOp
Methods inherited from interface de.eimmer.wesen.Wesen
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, teleport, teleport, teleport, teleport
Methods inherited from interface de.eimmer.zusatzmodul.nachrichtenversand.ZusatzmodulNachrichtAddressat
getListeningPluginChannels, sendPluginMessage
-
Method Details
-
getName
Returns the name of this spieler- Specified by:
getName
in interfaceBefehlAbsender
- Specified by:
getName
in interfaceMenschlichesWesen
- Specified by:
getName
in interfaceOfflineSpieler
- Specified by:
getName
in interfaceTierZaehmer
- Returns:
- Spieler name
-
getDisplayName
Gets the "friendly" name to display of this spieler. This may include color.Note that this name will not be displayed in game, only in chat and places defined by plugins.
- Returns:
- the friendly name
-
setDisplayName
Sets the "friendly" name to display of this spieler. This may include color.Note that this name will not be displayed in game, only in chat and places defined by plugins.
- Parameters:
name
- The new display name.
-
getPlayerListName
Gets the name that is shown on the spieler list.- Returns:
- the spieler list name
-
setPlayerListName
Sets the name that is shown on the in-game spieler list.If the value is null, the name will be identical to
getName()
.- Parameters:
name
- new spieler list name
-
getPlayerListHeader
Gets the currently displayed spieler list header for this spieler.- Returns:
- spieler list header or null
-
setPlayerListHeader
Sets the currently displayed spieler list header for this spieler.- Parameters:
header
- spieler list header, null for empty
-
setCompassTarget
Set the target of the spieler's compass.- Parameters:
loc
- Ort to point to
-
getCompassTarget
Get the previously set compass target.- Returns:
- location of the target
-
getAddress
Gets the socket address of this spieler- Returns:
- the spieler's address
-
sendRawMessage
Sends this sender a message raw- Specified by:
sendRawMessage
in interfaceGespraechsPartner
- Parameters:
message
- Message to be displayed
-
kickPlayer
Kicks spieler with custom kick message.- Parameters:
message
- kick message
-
ban
@Nullable HausverbotsEintrag<SpielerProfil> ban(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer) Adds this user to theProfilHausverbotsListe
. If a previous hausverbot exists, this will update the entry.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultexpires
- date for the hausverbot's expiration (unban), or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
ban
@Nullable HausverbotsEintrag<SpielerProfil> ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) Adds this user to theProfilHausverbotsListe
. If a previous hausverbot exists, this will update the entry.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultexpires
- date for the hausverbot's expiration (unban), or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
ban
@Nullable HausverbotsEintrag<SpielerProfil> ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) Adds this user to theProfilHausverbotsListe
. If a previous hausverbot exists, this will update the entry.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultduration
- the duration how long the hausverbot lasts, or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
banIp
@Nullable HausverbotsEintrag<InetAddress> banIp(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer) Adds this user's current IP address to theIpHausverbotsListe
. If a previous hausverbot exists, this will update the entry. IfgetAddress()
is null this method will throw an exception.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultexpires
- date for the hausverbot's expiration (unban), or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
banIp
@Nullable HausverbotsEintrag<InetAddress> banIp(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) Adds this user's current IP address to theIpHausverbotsListe
. If a previous hausverbot exists, this will update the entry. IfgetAddress()
is null this method will throw an exception.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultexpires
- date for the hausverbot's expiration (unban), or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
banIp
@Nullable HausverbotsEintrag<InetAddress> banIp(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) Adds this user's current IP address to theIpHausverbotsListe
. If a previous hausverbot exists, this will update the entry. IfgetAddress()
is null this method will throw an exception.- Parameters:
reason
- reason for the hausverbot, null indicates implementation defaultduration
- the duration how long the hausverbot lasts, or null to imply foreversource
- source of the hausverbot, null indicates implementation defaultkickPlayer
- if the spieler need to be kick- Returns:
- the entry for the newly created hausverbot, or the entry for the (updated) previous hausverbot
-
chat
Says a message (or runs a befehl).- Parameters:
msg
- message to print
-
performCommand
Makes the spieler perform the given befehl- Parameters:
command
- Befehl to perform- Returns:
- true if the befehl was successful, otherwise false
-
isOnGround
Deprecated.This value is controlled only by the client and is therefore unreliable and vulnerable to spoofing and/or desync depending on the context/time which it is accessedReturns true if the wesen is supported by a block. This value is a state updated by the client after each movement.- Specified by:
isOnGround
in interfaceWesen
- Returns:
- True if wesen is on ground.
- See Also:
-
isSneaking
boolean isSneaking()Returns if the spieler is in sneak mode- Returns:
- true if spieler is in sneak mode
-
setSneaking
void setSneaking(boolean sneak) Sets the sneak mode the spieler- Parameters:
sneak
- true if spieler should appear sneaking
-
isSprinting
boolean isSprinting()Gets whether the spieler is sprinting or not.- Returns:
- true if spieler is sprinting.
-
setSprinting
void setSprinting(boolean sprinting) Sets whether the spieler is sprinting or not.- Parameters:
sprinting
- true if the spieler should be sprinting
-
saveData
void saveData()Saves the players current location, health, inventar, motion, and other information into the username.dat datei, in the welt/spieler folder -
loadData
void loadData()Loads the players current location, health, inventar, motion, and other information from the username.dat datei, in the welt/spieler folder.Note: This will overwrite the players current inventar, health, motion, etc, with the state from the saved dat datei.
-
setSleepingIgnored
void setSleepingIgnored(boolean isSleeping) Sets whether the spieler is ignored as not sleeping. If everyone is either sleeping or has this flag set, then time will advance to the next day. If everyone has this flag set but no one is actually in bed, then nothing will happen.- Parameters:
isSleeping
- Whether to ignore.
-
isSleepingIgnored
boolean isSleepingIgnored()Returns whether the spieler is sleeping ignored.- Returns:
- Whether spieler is ignoring sleep.
-
getBedSpawnLocation
Gets the Ort where the spieler will spawn at their bed, null if they have not slept in one or their current bed spawn is invalid.- Specified by:
getBedSpawnLocation
in interfaceOfflineSpieler
- Returns:
- Bed Spawn Ort if bed exists, otherwise null.
-
setBedSpawnLocation
Sets the Ort where the spieler will spawn at their bed.- Parameters:
ort
- where to set the respawn ort
-
setBedSpawnLocation
Sets the Ort where the spieler will spawn at their bed.- Parameters:
ort
- where to set the respawn ortforce
- whether to forcefully set the respawn ort even if a valid bed is not present
-
playNote
Deprecated.Magic valuePlay a note for the spieler at a location.
This will work with cake.- Parameters:
loc
- The location to play the noteinstrument
- The instrument ID.note
- The note ID.
-
playNote
Play a note for the spieler at a location.
This will work with cake.This method will fail silently when called with
Instrument.CUSTOM_HEAD
.- Parameters:
loc
- The location to play the noteinstrument
- The instrumentnote
- The note
-
playSound
Play a geraeusch for a spieler at the ort.This function will fail silently if Ort or Geraeusch are null.
- Parameters:
ort
- The ort to play the geraeuschgeraeusch
- The geraeusch to playvolume
- The volume of the geraeuschpitch
- The pitch of the geraeusch
-
playSound
Play a sound for a spieler at the ort.This function will fail silently if Ort or Geraeusch are null. No sound will be heard by the spieler if their client does not have the respective sound for the value passed.
- Parameters:
ort
- The ort to play the soundsound
- The internal sound name to playvolume
- The volume of the soundpitch
- The pitch of the sound
-
playSound
void playSound(@NotNull Ort ort, @NotNull Geraeusch geraeusch, @NotNull GeraeuschKategorie category, float volume, float pitch) Play a geraeusch for a spieler at the ort.This function will fail silently if Ort or Geraeusch are null.
- Parameters:
ort
- The ort to play the geraeuschgeraeusch
- The geraeusch to playcategory
- The category of the geraeuschvolume
- The volume of the geraeuschpitch
- The pitch of the geraeusch
-
playSound
void playSound(@NotNull Ort ort, @NotNull String sound, @NotNull GeraeuschKategorie category, float volume, float pitch) Play a sound for a spieler at the ort.This function will fail silently if Ort or Geraeusch are null. No sound will be heard by the spieler if their client does not have the respective sound for the value passed.
- Parameters:
ort
- The ort to play the soundsound
- The internal sound name to playcategory
- The category of the soundvolume
- The volume of the soundpitch
- The pitch of the sound
-
playSound
void playSound(@NotNull Ort ort, @NotNull Geraeusch geraeusch, @NotNull GeraeuschKategorie category, float volume, float pitch, long seed) Play a geraeusch for a spieler at the ort. For sounds with multiple variations passing the same seed will always play the same variation.This function will fail silently if Ort or Geraeusch are null.
- Parameters:
ort
- The ort to play the geraeuschgeraeusch
- The geraeusch to playcategory
- The category of the geraeuschvolume
- The volume of the geraeuschpitch
- The pitch of the geraeuschseed
- The seed for the geraeusch
-
playSound
void playSound(@NotNull Ort ort, @NotNull String sound, @NotNull GeraeuschKategorie category, float volume, float pitch, long seed) Play a sound for a spieler at the ort. For sounds with multiple variations passing the same seed will always play the same variation.This function will fail silently if Ort or Geraeusch are null. No sound will be heard by the spieler if their client does not have the respective sound for the value passed.
- Parameters:
ort
- The ort to play the soundsound
- The internal sound name to playcategory
- The category of the soundvolume
- The volume of the soundpitch
- The pitch of the soundseed
- The seed for the sound
-
playSound
Play a geraeusch for a spieler at the location of the wesen.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the geraeuschgeraeusch
- The geraeusch to playvolume
- The volume of the geraeuschpitch
- The pitch of the geraeusch
-
playSound
Play a sound for a spieler at the location of the wesen.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the soundsound
- The sound to playvolume
- The volume of the soundpitch
- The pitch of the sound
-
playSound
void playSound(@NotNull Wesen wesen, @NotNull Geraeusch geraeusch, @NotNull GeraeuschKategorie category, float volume, float pitch) Play a geraeusch for a spieler at the location of the wesen.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the geraeuschgeraeusch
- The geraeusch to playcategory
- The category of the geraeuschvolume
- The volume of the geraeuschpitch
- The pitch of the geraeusch
-
playSound
void playSound(@NotNull Wesen wesen, @NotNull String sound, @NotNull GeraeuschKategorie category, float volume, float pitch) Play a sound for a spieler at the location of the wesen.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the soundsound
- The sound to playcategory
- The category of the soundvolume
- The volume of the soundpitch
- The pitch of the sound
-
playSound
void playSound(@NotNull Wesen wesen, @NotNull Geraeusch geraeusch, @NotNull GeraeuschKategorie category, float volume, float pitch, long seed) Play a geraeusch for a spieler at the location of the wesen. For sounds with multiple variations passing the same seed will always play the same variation.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the geraeuschgeraeusch
- The geraeusch to playcategory
- The category of the geraeuschvolume
- The volume of the geraeuschpitch
- The pitch of the geraeuschseed
- The seed for the geraeusch
-
playSound
void playSound(@NotNull Wesen wesen, @NotNull String sound, @NotNull GeraeuschKategorie category, float volume, float pitch, long seed) Play a sound for a spieler at the location of the wesen. For sounds with multiple variations passing the same seed will always play the same variation.This function will fail silently if Wesen or Geraeusch are null.
- Parameters:
wesen
- The wesen to play the soundsound
- The sound to playcategory
- The category of the soundvolume
- The volume of the soundpitch
- The pitch of the soundseed
- The seed for the sound
-
stopSound
Stop the specified geraeusch from playing.- Parameters:
geraeusch
- the geraeusch to stop
-
stopSound
Stop the specified sound from playing.- Parameters:
sound
- the sound to stop
-
stopSound
Stop the specified geraeusch from playing.- Parameters:
geraeusch
- the geraeusch to stopcategory
- the category of the geraeusch
-
stopSound
Stop the specified sound from playing.- Parameters:
sound
- the sound to stopcategory
- the category of the sound
-
stopSound
Stop the specified sound category from playing.- Parameters:
category
- the sound category to stop
-
stopAllSounds
void stopAllSounds()Stop all sounds from playing. -
playEffect
Deprecated.Magic valuePlays an effekt to just this spieler.- Parameters:
loc
- the location to play the effekt ateffekt
- theEffekt
data
- a data bit needed for some effects
-
playEffect
Plays an effekt to just this spieler.- Type Parameters:
T
- the data based based on the type of the effekt- Parameters:
loc
- the location to play the effekt ateffekt
- theEffekt
data
- a data bit needed for some effects
-
breakBlock
Force this spieler to break a Block using the item in their main hand. This method will respect verzauberungen, handle item durability (if applicable) and drop experience and the correct items according to the tool/item in the spieler's hand.Note that this method will call a
BlockBruchEreignis
, meaning that this method may not be successful in breaking the block if the ereignis was cancelled by a third party zusatzmodul. Care should be taken if running this method in a BlockBruchEreignis listener as recursion may be possible if it is invoked on the sameBlock
being broken in the ereignis.Additionally, a
BlockLasseFallenGegenstandEreignis
is called for the items dropped by this method (if successful).The block must be in the same welt as the spieler.
- Parameters:
block
- the block to break- Returns:
- true if the block was broken, false if the break failed
-
sendBlockChange
Deprecated.Magic valueSend a block change. This fakes a block change packet for a user at a certain location. This will not actually change the welt in any way.- Parameters:
loc
- The location of the changed blockmaterial
- The new blockdata
- The block data
-
sendBlockChange
Send a block change. This fakes a block change packet for a user at a certain location. This will not actually change the welt in any way.- Parameters:
loc
- The location of the changed blockblock
- The new block
-
sendBlockChanges
Send a multi-block change. This fakes a block change packet for a user at multiple locations. This will not actually change the welt in any way.This method may send multiple packets to the client depending on the blocks in the collection. A packet must be sent for each batzen section modified, meaning one packet for each 16x16x16 block area. Even if only one block is changed in two different batzen sections, two packets will be sent.
Additionally, this method cannot guarantee the functionality of changes being sent to the spieler in chunks not loaded by the client. It is the responsibility of the caller to ensure that the client is within range of the changed blocks or to handle any side effects caused as a result.
- Parameters:
blocks
- the block states to send to the spieler
-
sendBlockChanges
@Deprecated void sendBlockChanges(@NotNull Collection<BlockState> blocks, boolean suppressLightUpdates) Deprecated.suppressLightUpdates is not functional in versions greater than 1.19.4Send a multi-block change. This fakes a block change packet for a user at multiple locations. This will not actually change the welt in any way.This method may send multiple packets to the client depending on the blocks in the collection. A packet must be sent for each batzen section modified, meaning one packet for each 16x16x16 block area. Even if only one block is changed in two different batzen sections, two packets will be sent.
Additionally, this method cannot guarantee the functionality of changes being sent to the spieler in chunks not loaded by the client. It is the responsibility of the caller to ensure that the client is within range of the changed blocks or to handle any side effects caused as a result.
- Parameters:
blocks
- the block states to send to the spielersuppressLightUpdates
- whether or not light updates should be suppressed when updating the blocks on the client
-
sendBlockDamage
Send block damage. This fakes block break progress at a certain location sourced by this spieler. This will not actually change the block's break progress in any way.- Parameters:
loc
- the location of the damaged blockprogress
- the progress from 0.0 - 1.0 where 0 is no damage and 1.0 is the most damaged
-
sendBlockDamage
Send block damage. This fakes block break progress at a certain location sourced by the provided wesen. This will not actually change the block's break progress in any way.At the same location for each unique damage source sent to the spieler, a separate damage overlay will be displayed with the given progress. This allows for block damage at different progress from multiple entities at once.
- Parameters:
loc
- the location of the damaged blockprogress
- the progress from 0.0 - 1.0 where 0 is no damage and 1.0 is the most damagedsource
- the wesen to which the damage belongs
-
sendBlockDamage
Send block damage. This fakes block break progress at a certain location sourced by the provided wesen id. This will not actually change the block's break progress in any way.At the same location for each unique damage source sent to the spieler, a separate damage overlay will be displayed with the given progress. This allows for block damage at different progress from multiple entities at once.
- Parameters:
loc
- the location of the damaged blockprogress
- the progress from 0.0 - 1.0 where 0 is no damage and 1.0 is the most damagedsourceId
- the wesen id of the wesen to which the damage belongs. Can be an id that does not associate directly with an existing or loaded wesen.
-
sendEquipmentChange
void sendEquipmentChange(@NotNull Lebewesen entity, @NotNull AusstattungsSpalte slot, @Nullable GegenstandsStapel item) Send an equipment change for the target wesen. This will not actually change the wesen's equipment in any way.- Parameters:
entity
- the wesen whose equipment to changeslot
- the slot to changeitem
- the item to which the slot should be changed, or null to set it to air
-
sendEquipmentChange
void sendEquipmentChange(@NotNull Lebewesen entity, @NotNull Map<AusstattungsSpalte, GegenstandsStapel> items) Send multiple equipment changes for the target wesen. This will not actually change the wesen's equipment in any way.- Parameters:
entity
- the wesen whose equipment to changeitems
- the slots to change, where the values are the items to which the slot should be changed. null values will set the slot to air
-
sendSignChange
Send a sign change. This fakes a sign change packet for a user at a certain location. This will not actually change the welt in any way. This method will use a sign at the location's block or a faked sign sent viasendBlockChange(Ort, de.eimmer.block.data.BlockData)
.If the client does not have a sign at the given location it will display an error message to the user.
To change all attributes of a sign, including the back Side, use
sendBlockUpdate(Ort, de.eimmer.block.TileState)
.- Parameters:
loc
- the location of the signlines
- the new text on the sign or null to clear it- Throws:
IllegalArgumentException
- if location is nullIllegalArgumentException
- if lines is non-null and has a length less than 4
-
sendSignChange
void sendSignChange(@NotNull Ort loc, @Nullable String[] lines, @NotNull FarbstoffFarbe farbstoffFarbe) throws IllegalArgumentException Send a sign change. This fakes a sign change packet for a user at a certain location. This will not actually change the welt in any way. This method will use a sign at the location's block or a faked sign sent viasendBlockChange(Ort, de.eimmer.block.data.BlockData)
.If the client does not have a sign at the given location it will display an error message to the user.
To change all attributes of a sign, including the back Side, use
sendBlockUpdate(Ort, de.eimmer.block.TileState)
.- Parameters:
loc
- the location of the signlines
- the new text on the sign or null to clear itfarbstoffFarbe
- the color of the sign- Throws:
IllegalArgumentException
- if location is nullIllegalArgumentException
- if farbstoffFarbe is nullIllegalArgumentException
- if lines is non-null and has a length less than 4
-
sendSignChange
void sendSignChange(@NotNull Ort loc, @Nullable String[] lines, @NotNull FarbstoffFarbe farbstoffFarbe, boolean hasGlowingText) throws IllegalArgumentException Send a sign change. This fakes a sign change packet for a user at a certain location. This will not actually change the welt in any way. This method will use a sign at the location's block or a faked sign sent viasendBlockChange(Ort, de.eimmer.block.data.BlockData)
.If the client does not have a sign at the given location it will display an error message to the user.
To change all attributes of a sign, including the back Side, use
sendBlockUpdate(Ort, de.eimmer.block.TileState)
.- Parameters:
loc
- the location of the signlines
- the new text on the sign or null to clear itfarbstoffFarbe
- the color of the signhasGlowingText
- if the sign's text should be glowing- Throws:
IllegalArgumentException
- if location is nullIllegalArgumentException
- if farbstoffFarbe is nullIllegalArgumentException
- if lines is non-null and has a length less than 4
-
sendBlockUpdate
@Experimental void sendBlockUpdate(@NotNull Ort loc, @NotNull TileState tileState) throws IllegalArgumentException Send a TileState change. This fakes a TileState change for a user at the given location. This will not actually change the welt in any way. This method will use a TileState at the location's block or a faked TileState sent viasendBlockChange(Ort, de.eimmer.block.data.BlockData)
.If the client does not have an appropriate tile at the given location it may display an error message to the user.
BlockData.createBlockState()
can be used to create aBlockState
.- Parameters:
loc
- the location of the signtileState
- the tile state- Throws:
IllegalArgumentException
- if location is nullIllegalArgumentException
- if tileState is null
-
sendMap
Render a karte and send it to the spieler in its entirety. This may be used when streaming the karte in the normal manner is not desirable.- Parameters:
map
- The karte to be sent
-
sendHurtAnimation
void sendHurtAnimation(float yaw) Send a hurt animation. This fakes incoming damage towards the spieler from the given yaw relative to the spieler's direction.- Parameters:
yaw
- the yaw in degrees relative to the spieler's direction where 0 is in front of the spieler, 90 is to the right, 180 is behind, and 270 is to the left
-
addCustomChatCompletions
Add custom chat completion suggestions shown to the spieler while typing a message.- Parameters:
completions
- the completions to send
-
removeCustomChatCompletions
Remove custom chat completion suggestions shown to the spieler while typing a message. Online spieler names cannot be removed with this method. This will affect only custom completions added byaddCustomChatCompletions(Collection)
orsetCustomChatCompletions(Collection)
.- Parameters:
completions
- the completions to remove
-
setCustomChatCompletions
Set the list of chat completion suggestions shown to the spieler while typing a message.If completions were set previously, this method will remove them all and replace them with the provided completions.
- Parameters:
completions
- the completions to set
-
updateInventory
@Internal void updateInventory()Forces an update of the spieler's entire inventar.- API Note:
- It should not be necessary for plugins to use this method. If it is required for some reason, it is probably a bug.
-
getPreviousGameMode
Gets this spieler's previousSpielModus
- Returns:
- Previous game mode or null
-
setPlayerTime
void setPlayerTime(long time, boolean relative) Sets the current time on the spieler's client. When relative is true the spieler's time will be kept synchronized to its welt time with the specified offset.When using non relative time the spieler's time will stay fixed at the specified time parameter. It's up to the caller to continue updating the spieler's time. To restore spieler time to normal use resetPlayerTime().
- Parameters:
time
- The current spieler's perceived time or the spieler's time offset from the server time.relative
- When true the spieler time is kept relative to its welt time.
-
getPlayerTime
long getPlayerTime()Returns the spieler's current timestamp.- Returns:
- The spieler's time
-
getPlayerTimeOffset
long getPlayerTimeOffset()Returns the spieler's current time offset relative to server time, or the current spieler's fixed time if the spieler's time is absolute.- Returns:
- The spieler's time
-
isPlayerTimeRelative
boolean isPlayerTimeRelative()Returns true if the spieler's time is relative to the server time, otherwise the spieler's time is absolute and will not change its current time unless done so with setPlayerTime().- Returns:
- true if the spieler's time is relative to the server time.
-
resetPlayerTime
void resetPlayerTime()Restores the normal condition where the spieler's time is synchronized with the server time.Equivalent to calling setPlayerTime(0, true).
-
setPlayerWeather
Sets the type of wetter the spieler will see. When used, the wetter status of the spieler is locked untilresetPlayerWeather()
is used.- Parameters:
type
- The WetterTyp enum type the spieler should experience
-
getPlayerWeather
Returns the type of wetter the spieler is currently experiencing.- Returns:
- The WetterTyp that the spieler is currently experiencing or null if spieler is seeing server wetter.
-
resetPlayerWeather
void resetPlayerWeather()Restores the normal condition where the spieler's wetter is controlled by server conditions. -
getExpCooldown
int getExpCooldown()Gets the spieler's cooldown between picking up experience orbs.- Returns:
- The cooldown in ticks
-
setExpCooldown
void setExpCooldown(int ticks) Sets the spieler's cooldown between picking up experience orbs.. Note: Setting this to 0 allows the spieler to pick up instantly, but setting this to a negative value will cause the spieler to be unable to pick up xp-orbs. Calling this Method will result inSpielerErfahrungAbklingzeitAenderEreignis
being called.- Parameters:
ticks
- The cooldown in ticks
-
giveExp
void giveExp(int amount) Gives the spieler the amount of experience specified.- Parameters:
amount
- Exp amount to give
-
giveExpLevels
void giveExpLevels(int amount) Gives the spieler the amount of experience levels specified. Levels can be taken by specifying a negative amount.- Parameters:
amount
- amount of experience levels to give or take
-
getExp
float getExp()Gets the players current experience points towards the next level.This is a percentage value. 0 is "no progress" and 1 is "next level".
- Returns:
- Current experience points
-
setExp
void setExp(float exp) Sets the players current experience points towards the next levelThis is a percentage value. 0 is "no progress" and 1 is "next level".
- Parameters:
exp
- New experience points
-
getLevel
int getLevel()Gets the players current experience level- Returns:
- Current experience level
-
setLevel
void setLevel(int level) Sets the players current experience level- Parameters:
level
- New experience level
-
getTotalExperience
int getTotalExperience()Gets the players total experience points.
This refers to the total amount of experience the spieler has collected over time and is not currently displayed to the client.- Returns:
- Current total experience points
-
setTotalExperience
void setTotalExperience(int exp) Sets the players current experience points.
This refers to the total amount of experience the spieler has collected over time and is not currently displayed to the client.- Parameters:
exp
- New total experience points
-
sendExperienceChange
void sendExperienceChange(float progress) Send an experience change. This fakes an experience change packet for a user. This will not actually change the experience points in any way.- Parameters:
progress
- Experience progress percentage (between 0.0 and 1.0)- See Also:
-
sendExperienceChange
void sendExperienceChange(float progress, int level) Send an experience change. This fakes an experience change packet for a user. This will not actually change the experience points in any way.- Parameters:
progress
- New experience progress percentage (between 0.0 and 1.0)level
- New experience level- See Also:
-
getAllowFlight
boolean getAllowFlight()Determines if the Spieler is allowed to fly via jump key double-tap like in creative mode.- Returns:
- True if the spieler is allowed to fly.
-
setAllowFlight
void setAllowFlight(boolean flight) Sets if the Spieler is allowed to fly via jump key double-tap like in creative mode.- Parameters:
flight
- If flight should be allowed.
-
hidePlayer
Deprecated.Hides a spieler from this spieler- Parameters:
spieler
- Spieler to hide
-
hidePlayer
Hides a spieler from this spieler- Parameters:
zusatzmodul
- Zusatzmodul that wants to hide the spielerspieler
- Spieler to hide
-
showPlayer
Deprecated.Allows this spieler to see a spieler that was previously hidden- Parameters:
spieler
- Spieler to show
-
showPlayer
Allows this spieler to see a spieler that was previously hidden. If another another zusatzmodul had hidden the spieler too, then the spieler will remain hidden until the other zusatzmodul calls this method too.- Parameters:
zusatzmodul
- Zusatzmodul that wants to show the spielerspieler
- Spieler to show
-
canSee
Checks to see if a spieler has been hidden from this spieler- Parameters:
spieler
- Spieler to check- Returns:
- True if the provided spieler is not being hidden from this spieler
-
hideEntity
Visually hides an wesen from this spieler.- Parameters:
zusatzmodul
- Zusatzmodul that wants to hide the wesenwesen
- Wesen to hide- API Note:
- draft API
-
showEntity
Allows this spieler to see an wesen that was previously hidden. If another another zusatzmodul had hidden the wesen too, then the wesen will remain hidden until the other zusatzmodul calls this method too.- Parameters:
zusatzmodul
- Zusatzmodul that wants to show the wesenwesen
- Wesen to show- API Note:
- draft API
-
canSee
Checks to see if an wesen has been visually hidden from this spieler.- Parameters:
wesen
- Wesen to check- Returns:
- True if the provided wesen is not being hidden from this spieler
- API Note:
- draft API
-
isFlying
boolean isFlying()Checks to see if this spieler is currently flying or not.- Returns:
- True if the spieler is flying, else false.
-
setFlying
void setFlying(boolean value) Makes this spieler start or stop flying.- Parameters:
value
- True to fly.
-
setFlySpeed
Sets the speed at which a client will fly. Negative values indicate reverse directions.- Parameters:
value
- The new speed, from -1 to 1.- Throws:
IllegalArgumentException
- If new speed is less than -1 or greater than 1
-
setWalkSpeed
Sets the speed at which a client will walk. Negative values indicate reverse directions.- Parameters:
value
- The new speed, from -1 to 1.- Throws:
IllegalArgumentException
- If new speed is less than -1 or greater than 1
-
getFlySpeed
float getFlySpeed()Gets the current allowed speed that a client can fly.- Returns:
- The current allowed speed, from -1 to 1
-
getWalkSpeed
float getWalkSpeed()Gets the current allowed speed that a client can walk.- Returns:
- The current allowed speed, from -1 to 1
-
setTexturePack
Deprecated.Minecraft no longer uses textures pakete. Instead you should usesetResourcePack(String)
.Request that the spieler's client download and switch texture pakete.The spieler's client will download the new texture pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached the same texture pack in the past, it will perform a datei size check against the response content to determine if the texture pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server textures on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - There is no concept of resetting texture pakete back to default within Minecraft, so players will have to relog to do so or you have to send an empty pack.
- The request is send with "null" as the hash. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the texture pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long.
- Players can disable server textures on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - There is no concept of resetting resource pakete back to default within Minecraft, so players will have to relog to do so or you have to send an empty pack.
- The request is send with empty string as the hash. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached a resource pack with the same hash in the past it will not download but directly apply the cached pack. If the hash is null and the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - There is no concept of resetting resource pakete back to default within Minecraft, so players will have to relog to do so or you have to send an empty pack.
- The request is sent with empty string as the hash when the hash is not provided. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.hash
- The sha1 hash sum of the resource pack datei which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.IllegalArgumentException
- Thrown if the hash is not 20 bytes long.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached a resource pack with the same hash in the past it will not download but directly apply the cached pack. If the hash is null and the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - To remove a resource pack you can use
removeResourcePack(UUID)
orremoveResourcePacks()
. - The request is sent with empty string as the hash when the hash is not provided. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.hash
- The sha1 hash sum of the resource pack datei which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!prompt
- The optional custom prompt message to be shown to client.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.IllegalArgumentException
- Thrown if the hash is not 20 bytes long.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached a resource pack with the same hash in the past it will not download but directly apply the cached pack. If the hash is null and the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - To remove a resource pack you can use
removeResourcePack(UUID)
orremoveResourcePacks()
. - The request is sent with empty string as the hash when the hash is not provided. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.hash
- The sha1 hash sum of the resource pack datei which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!force
- If true, the client will be disconnected from the server when it declines to use the resource pack.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.IllegalArgumentException
- Thrown if the hash is not 20 bytes long.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force) Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached a resource pack with the same hash in the past it will not download but directly apply the cached pack. If the hash is null and the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - To remove a resource pack you can use
removeResourcePack(UUID)
orremoveResourcePacks()
. - The request is sent with empty string as the hash when the hash is not provided. This might result in newer versions not loading the pack correctly.
- Parameters:
url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.hash
- The sha1 hash sum of the resource pack datei which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!prompt
- The optional custom prompt message to be shown to client.force
- If true, the client will be disconnected from the server when it declines to use the resource pack.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.IllegalArgumentException
- Thrown if the hash is not 20 bytes long.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
setResourcePack
void setResourcePack(@NotNull UUID id, @NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force) Request that the spieler's client download and switch resource pakete.The spieler's client will download the new resource pack asynchronously in the background, and will automatically switch to it once the download is complete. If the client has downloaded and cached a resource pack with the same hash in the past it will not download but directly apply the cached pack. If the hash is null and the client has downloaded and cached the same resource pack in the past, it will perform a datei size check against the response content to determine if the resource pack has changed and needs to be downloaded again. When this request is sent for the very first time from a given server, the client will first display a confirmation GUI to the spieler before proceeding with the download.
Notes:
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
SpielerRessourcenPaketStatusEreignis
to figure out whether or not the spieler loaded the pack! - To remove a resource pack you can use
removeResourcePack(UUID)
orremoveResourcePacks()
. - The request is sent with empty string as the hash when the hash is not provided. This might result in newer versions not loading the pack correctly.
- Parameters:
id
- Unique resource pack ID.url
- The URL from which the client will download the resource pack. The string must contain only US-ASCII characters and should be encoded as per RFC 1738.hash
- The sha1 hash sum of the resource pack datei which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!prompt
- The optional custom prompt message to be shown to client.force
- If true, the client will be disconnected from the server when it declines to use the resource pack.- Throws:
IllegalArgumentException
- Thrown if the URL is null.IllegalArgumentException
- Thrown if the URL is too long. The length restriction is an implementation specific arbitrary value.IllegalArgumentException
- Thrown if the hash is not 20 bytes long.
- Players can disable server resources on their client, in which
case this method will have no affect on them. Use the
-
removeResourcePack
Request that the spieler's client remove a resource pack sent by the server.- Parameters:
id
- the id of the resource pack.- Throws:
IllegalArgumentException
- If the ID is null.
-
removeResourcePacks
void removeResourcePacks()Request that the spieler's client remove all loaded resource pack sent by the server. -
getScoreboard
Gets the Anzeigetafel displayed to this spieler- Returns:
- The current anzeigetafel seen by this spieler
-
setScoreboard
void setScoreboard(@NotNull Anzeigetafel anzeigetafel) throws IllegalArgumentException, IllegalStateException Sets the spieler's visible Anzeigetafel.- Parameters:
anzeigetafel
- New Anzeigetafel for the spieler- Throws:
IllegalArgumentException
- if anzeigetafel is nullIllegalArgumentException
- if anzeigetafel was not created by theanzeigetafel manager
IllegalStateException
- if this is a spieler that is not logged yet or has logged out
-
getWorldBorder
Gets theWeltGrenze
visible to this Spieler, or null if viewing the welt's welt border.- Returns:
- the spieler's welt border
-
setWorldBorder
Sets theWeltGrenze
visible to this Spieler.- Parameters:
border
- the border to set, or null to set to the welt border of the spieler's current welt- Throws:
UnsupportedOperationException
- if setting the border to that of a welt in which the spieler is not currently present.- See Also:
-
sendHealthUpdate
void sendHealthUpdate(double health, int foodLevel, float saturation) Send a health update to the spieler. This will adjust the health, food, and saturation on the client and will not affect the spieler's actual values on the server. As soon as any of these values change on the server, changes sent by this method will no longer be visible.- Parameters:
health
- the health. If 0.0, the client will believe it is deadfoodLevel
- the food levelsaturation
- the saturation
-
sendHealthUpdate
void sendHealthUpdate()Send a health update to the spieler using its known server values. This will synchronize the health, food, and saturation on the client and therefore may be useful when changing a spieler's maximum health merkmal. -
isHealthScaled
boolean isHealthScaled()Gets if the client is displayed a 'scaled' health, that is, health on a scale from 0-getHealthScale()
.- Returns:
- if client health display is scaled
- See Also:
-
setHealthScaled
void setHealthScaled(boolean scale) Sets if the client is displayed a 'scaled' health, that is, health on a scale from 0-getHealthScale()
.Displayed health follows a simple formula
displayedHealth = getHealth() / getMaxHealth() * getHealthScale()
.- Parameters:
scale
- if the client health display is scaled
-
setHealthScale
Sets the number to scale health to for the client; this will alsosetHealthScaled(true)
.Displayed health follows a simple formula
displayedHealth = getHealth() / getMaxHealth() * getHealthScale()
.- Parameters:
scale
- the number to scale health to- Throws:
IllegalArgumentException
- if scale is <0IllegalArgumentException
- if scale isDouble.NaN
IllegalArgumentException
- if scale is too high
-
getHealthScale
double getHealthScale()Gets the number that health is scaled to for the client.- Returns:
- the number that health would be scaled to for the client if HealthScaling is set to true
- See Also:
-
getSpectatorTarget
Gets the wesen which is followed by the camera when inSpielModus.SPECTATOR
.- Returns:
- the followed wesen, or null if not in spectator mode or not following a specific wesen.
-
setSpectatorTarget
Sets the wesen which is followed by the camera when inSpielModus.SPECTATOR
.- Parameters:
wesen
- the wesen to follow or null to reset- Throws:
IllegalStateException
- if the spieler is not inSpielModus.SPECTATOR
-
sendTitle
Deprecated.API behavior subject to changeSends a title and a subtitle message to the spieler. If either of these values are null, they will not be sent and the display will remain unchanged. If they are empty strings, the display will be updated as such. If the strings contain a new line, only the first line will be sent. The titles will be displayed with the client's default timings.- Parameters:
title
- Title textsubtitle
- Subtitle text
-
sendTitle
void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Sends a title and a subtitle message to the spieler. If either of these values are null, they will not be sent and the display will remain unchanged. If they are empty strings, the display will be updated as such. If the strings contain a new line, only the first line will be sent. All timings values may take a value of -1 to indicate that they will use the last value sent (or the vorgaben if no title has been displayed).- Parameters:
title
- Title textsubtitle
- Subtitle textfadeIn
- time in ticks for titles to fade in. Defaults to 10.stay
- time in ticks for titles to stay. Defaults to 70.fadeOut
- time in ticks for titles to fade out. Defaults to 20.
-
resetTitle
void resetTitle()Resets the title displayed to the spieler. This will clear the displayed title / subtitle and reset timings to their default values. -
spawnParticle
Spawns the partikel (the number of times specified by count) at the target ort.- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particles
-
spawnParticle
Spawns the partikel (the number of times specified by count) at the target location.- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particles
-
spawnParticle
Spawns the partikel (the number of times specified by count) at the target ort.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particlesdata
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
spawnParticle
<T> void spawnParticle(@NotNull Partikel partikel, double x, double y, double z, int count, @Nullable T data) Spawns the partikel (the number of times specified by count) at the target location.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particlesdata
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
spawnParticle
void spawnParticle(@NotNull Partikel partikel, @NotNull Ort ort, int count, double offsetX, double offsetY, double offsetZ) Spawns the partikel (the number of times specified by count) at the target ort. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axis
-
spawnParticle
void spawnParticle(@NotNull Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) Spawns the partikel (the number of times specified by count) at the target location. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axis
-
spawnParticle
<T> void spawnParticle(@NotNull Partikel partikel, @NotNull Ort ort, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data) Spawns the partikel (the number of times specified by count) at the target ort. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisdata
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
spawnParticle
<T> void spawnParticle(@NotNull Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data) Spawns the partikel (the number of times specified by count) at the target location. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisdata
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
spawnParticle
void spawnParticle(@NotNull Partikel partikel, @NotNull Ort ort, int count, double offsetX, double offsetY, double offsetZ, double extra) Spawns the partikel (the number of times specified by count) at the target ort. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisextra
- the extra data for this partikel, depends on the partikel used (normally speed)
-
spawnParticle
void spawnParticle(@NotNull Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) Spawns the partikel (the number of times specified by count) at the target location. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisextra
- the extra data for this partikel, depends on the partikel used (normally speed)
-
spawnParticle
<T> void spawnParticle(@NotNull Partikel partikel, @NotNull Ort ort, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data) Spawns the partikel (the number of times specified by count) at the target ort. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnort
- the ort to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisextra
- the extra data for this partikel, depends on the partikel used (normally speed)data
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
spawnParticle
<T> void spawnParticle(@NotNull Partikel partikel, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data) Spawns the partikel (the number of times specified by count) at the target location. The position of each partikel will be randomized positively and negatively by the offset parameters on each axis.- Type Parameters:
T
- type of partikel data (seePartikel.getDataType()
- Parameters:
partikel
- the partikel to spawnx
- the position on the x axis to spawn aty
- the position on the y axis to spawn atz
- the position on the z axis to spawn atcount
- the number of particlesoffsetX
- the maximum random offset on the X axisoffsetY
- the maximum random offset on the Y axisoffsetZ
- the maximum random offset on the Z axisextra
- the extra data for this partikel, depends on the partikel used (normally speed)data
- the data to use for the partikel or null, the type of this depends onPartikel.getDataType()
-
getAdvancementProgress
Return the spieler's progression on the specified fortschritt.- Parameters:
fortschritt
- fortschritt- Returns:
- object detailing the spieler's progress
-
getClientViewDistance
int getClientViewDistance()Get the spieler's current client side view distance.
Will default to the server view distance if the client has not yet communicated this information,- Returns:
- client view distance as above
-
getPing
int getPing()Gets the spieler's estimated ping in milliseconds. In Vanilla this value represents a weighted average of the response time to application layer ping packets sent. This value does not represent the network round trip time and as such may have less granularity and be impacted by other sources. For these reasons it should not be used for anti-cheat purposes. Its recommended use is only as a qualitative indicator of connection quality (Vanilla uses it for this purpose in the tab list).- Returns:
- spieler ping
-
getLocale
Gets the spieler's current locale. The value of the locale String is not defined properly.
The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource pakete may use any format they wish.- Returns:
- the spieler's locale
-
updateCommands
void updateCommands()Update the list of commands sent to the client.
Generally useful to ensure the client has a complete list of commands after permission changes are done. -
openBook
Open aMaterial.WRITTEN_BOOK
for a Spieler- Parameters:
book
- The book to open for this spieler
-
openSign
Open a Sign for editing by the Spieler. The Sign must be placed in the same welt as the spieler.- Parameters:
sign
- The sign to edit
-
openSign
Open a Sign for editing by the Spieler. The Sign must be placed in the same welt as the spieler.- Parameters:
sign
- The sign to editside
- The side to edit
-
showDemoScreen
void showDemoScreen()Shows the demo screen to the spieler, this screen is normally only seen in the demo version of the game.
Servers can modify the text on this screen using a resource pack. -
isAllowingServerListings
boolean isAllowingServerListings()Gets whether the spieler has the "Allow Server Listings" setting enabled.- Returns:
- whether the spieler allows server listings
-
hidePlayer(Zusatzmodul, Spieler)