public void OnPlayerBedEnterEvent(PlayerBedEnterEvent event) {
Resident resident = CivGlobal.getResident(event.getPlayer().getName());
if (resident == null) {
event.setCancelled(true);
return;
}
coord.setFromLocation(event.getPlayer().getLocation());
Camp camp = CivGlobal.getCampFromChunk(coord);
if (camp != null) {
if (!camp.hasMember(event.getPlayer().getName())) {
CivMessage.sendError(event.getPlayer(), "You cannot sleep in a camp you do not belong to.");
event.setCancelled(true);
return;
}
}
}
BlockListener.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:civcraft
作者:
评论列表
文章目录