mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
SPIGOT-6829: Add per-player world border API
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
@@ -10,9 +10,11 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Note;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.SoundCategory;
|
||||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.WorldBorder;
|
||||
import org.bukkit.advancement.Advancement;
|
||||
import org.bukkit.advancement.AdvancementProgress;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -1153,6 +1155,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void setScoreboard(@NotNull Scoreboard scoreboard) throws IllegalArgumentException, IllegalStateException;
|
||||
|
||||
/**
|
||||
* Gets the {@link WorldBorder} visible to this Player, or null if viewing
|
||||
* the world's world border.
|
||||
*
|
||||
* @return the player's world border
|
||||
*/
|
||||
@Nullable
|
||||
public WorldBorder getWorldBorder();
|
||||
|
||||
/**
|
||||
* Sets the {@link WorldBorder} visible to this Player.
|
||||
*
|
||||
* @param border the border to set, or null to set to the world border of
|
||||
* the player's current world
|
||||
*
|
||||
* @throws UnsupportedOperationException if setting the border to that of
|
||||
* a world in which the player is not currently present.
|
||||
*
|
||||
* @see Server#createWorldBorder()
|
||||
*/
|
||||
public void setWorldBorder(@Nullable WorldBorder border);
|
||||
|
||||
/**
|
||||
* Gets if the client is displayed a 'scaled' health, that is, health on a
|
||||
* scale from 0-{@link #getHealthScale()}.
|
||||
|
Reference in New Issue
Block a user