类 PlayerEditBookEvent
- 所有已实现的接口:
Cancellable
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.player.PlayerEvent
player
-
构造器概要
-
方法概要
修饰符和类型方法说明static @NotNull HandlerList
获取玩家试图新增的书本元数据。获取当前书本元数据。int
getSlot()
已过时。书可能被副手签名boolean
获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.boolean
检测书本是否正在被签名。void
setCancelled
(boolean cancel) 取消这个事件.void
setNewBookMeta
(@NotNull BookMeta newBookMeta) 设置新增的书本元数据。void
setSigning
(boolean signing) 设置书本是否正在被签名。从类继承的方法 org.bukkit.event.player.PlayerEvent
getPlayer
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
PlayerEditBookEvent
-
-
方法详细资料
-
getPreviousBookMeta
获取当前书本元数据。注意:获取书本的元数据副本。你无法使用该对象来修改书本元数据。
原文:Gets the book meta currently on the book.
Note: this is a copy of the book meta. You cannot use this object to change the existing book meta.
- 返回:
- 当前书本的元数据
-
getNewBookMeta
获取玩家试图新增的书本元数据。注意:获取的元数据为副本。使用
setNewBookMeta(BookMeta)
修改实际想要更新的书本元数据原文:Gets the book meta that the player is attempting to add to the book.
Note: this is a copy of the proposed new book meta. Use
setNewBookMeta(BookMeta)
to change what will actually be added to the- 返回:
- 玩家试图新增的书本元数据
-
getSlot
已过时。书可能被副手签名获取触发事件时,书本在物品栏所在的格子序号.对应为玩家快捷操作栏,取值范围 0-8, 或-1代表副手.
原文:Gets the inventory slot number for the book item that triggered this event.
This is a slot number on the player's hotbar in the range 0-8, or -1 for off hand.
- 返回:
- 事件中书本在玩家物品栏所占用的格子序号
-
setNewBookMeta
设置新增的书本元数据。原文:Sets the book meta that will actually be added to the book.
- 参数:
newBookMeta
- 构造书本元数据- 抛出:
IllegalArgumentException
- 当构造的书本元数据不为空值时抛出异常
-
isSigning
public boolean isSigning()检测书本是否正在被签名。如果正在签名,书与笔将转变为成书。原文:Gets whether or not the book is being signed. If a book is signed the Material changes from BOOK_AND_QUILL to WRITTEN_BOOK.
- 返回:
- 当书本正在被签名时,返回true。
-
setSigning
public void setSigning(boolean signing) 设置书本是否正在被签名。如果正在签名,书与笔将转变为成书。原文:Sets whether or not the book is being signed. If a book is signed the Material changes from BOOK_AND_QUILL to WRITTEN_BOOK.
- 参数:
signing
- 书本是否正在被签名
-
getHandlers
- 指定者:
getHandlers
在类中Event
-
getHandlerList
-
isCancelled
public boolean isCancelled()从接口复制的说明:Cancellable
获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
- 指定者:
isCancelled
在接口中Cancellable
- 返回:
- 如果事件已经被取消,则为true
-
setCancelled
public void setCancelled(boolean cancel) 从接口复制的说明:Cancellable
取消这个事件. 一个被取消的事件不会在 服务器里执行,但是仍然会传递事件到其他插件.原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
- 指定者:
setCancelled
在接口中Cancellable
- 参数:
cancel
- 如果你想取消这个事件,则为true
-