mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Add Player#openBook(ItemStack) method
This PR adds the openBook(ItemStack) method to Player that allows opening a Material.WRITTEN_BOOK for a player on demand. By: simpleauthority <jacob@algorithmjunkie.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import org.bukkit.advancement.AdvancementProgress;
|
|||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.conversations.Conversable;
|
import org.bukkit.conversations.Conversable;
|
||||||
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
|
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.map.MapView;
|
import org.bukkit.map.MapView;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||||
@@ -1471,4 +1472,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||||||
* after permission changes are done.
|
* after permission changes are done.
|
||||||
*/
|
*/
|
||||||
public void updateCommands();
|
public void updateCommands();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a {@link Material#WRITTEN_BOOK} for a Player
|
||||||
|
*
|
||||||
|
* @param book The book to open for this player
|
||||||
|
*/
|
||||||
|
public void openBook(@NotNull ItemStack book);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user