@EventHandler
public void playerRespawnEvent(PlayerRespawnEvent event)
{
Player player = event.getPlayer();
for(StationaryGUIDisplayContainer stationaryDisplay : holoGUI.getStationaryDisplays())
{
if(stationaryDisplay.playerInRange(player))
{
if(!stationaryDisplay.isDisplayingToPlayer(player))//player in range of display but not currently viewing the stationary gui, make gui visible
{
stationaryDisplay.display(player);
}
}
else if(stationaryDisplay.isDisplayingToPlayer(player))//player was viewing the stationary gui, but moved out of range. Remove the gui for that player
{
stationaryDisplay.destroy(player);
}
}
}
PlayerRespawnEventListener.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:HoloGUIApi
作者:
评论列表
文章目录