Add API for client-side signs (#11903)
This commit is contained in:
@@ -12,6 +12,7 @@ import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import io.papermc.paper.entity.LookAnchor;
|
||||
import io.papermc.paper.entity.PlayerGiveResult;
|
||||
import io.papermc.paper.math.Position;
|
||||
import org.bukkit.BanEntry;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
@@ -52,7 +53,6 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
@@ -3449,6 +3449,21 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void openSign(Sign sign, Side side);
|
||||
|
||||
/**
|
||||
* Open a sign for editing by the player.
|
||||
* <p>
|
||||
* The sign must only be placed locally for the player, which can be done with {@link #sendBlockChange(Location, BlockData)} and {@link #sendBlockUpdate(Location, TileState)}.
|
||||
* A side-effect of this is that normal events, like {@link org.bukkit.event.block.SignChangeEvent} will not be called (unless there is an actual sign in the world).
|
||||
* Additionally, the client may enforce distance limits to the opened position.
|
||||
* </p>
|
||||
*
|
||||
* @param block The block where the client has a sign placed
|
||||
* @param side The side to edit
|
||||
* @see io.papermc.paper.event.packet.UncheckedSignChangeEvent
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
void openVirtualSign(Position block, Side side);
|
||||
|
||||
/**
|
||||
* Shows the demo screen to the player, this screen is normally only seen in
|
||||
* the demo version of the game.
|
||||
|
||||
Reference in New Issue
Block a user