-
StackOverflow 文件
-
bukkit 教程
-
玩家活動
-
PlayerMoveListener
public class PlayerMoveListener implements Listener {
@EventHandler
public void onPlayerMove(PlayerMoveEvent evt) {
Location from = evt.getFrom();
Location to = evt.getTo();
double xFrom = from.getX();
double yFrom = from.getY();
double zFrom = from.getZ();
double xTo = to.getX();
double yTo = to.getY();
double zTo = to.getZ();
Bukkit.getLogger().info("Player " + evt.getPlayer().getName()
+ " has moved from x: " + xFrom + " y: " + yFrom + " z: "
+ zFrom + " to x: " + xTo + " y: " + yTo + " z: " + zTo);
}
}