API方法和事件
方法
API的主类是InteractionsAPI.你可以在你的插件你使用它
// 返回玩家当前所处的对话
InteractionsConversation iConv = InteractionsAPI.getPlayerConversation(Player player)// 由文件开始对话的方法(文件名不要带.yml)
boolean startConversation = InteractionsAPI.startConversation(Player player,String conversationName)// 终止当前玩家的对话
InterationsAPI.endConversation(Player player)事件
到现在为止,此插件有三个API事件
//当玩家要开始对话时唤起的事件
//你可以取消它,如果你需要的话
@EventHandler
public void conversationStart(ConversationStartEvent event){
Player player = event.getPlayer();
InteractionsConversation iConv = event.getConversation();
}Last updated
Was this helpful?