From 24d07152ab921d5b9ce45542eac4a1077150744c Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sat, 3 Mar 2012 11:42:14 +0100 Subject: [PATCH] first maven step also: - fixed playermoveevent coarse-check --- .gitignore | 10 +++++-- pom.xml | 28 +++++++++++++++++++ .../minecraft/worldguard/CListener.java | 5 ++-- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index 1383453..7961ff4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ +/bin + +# Eclipse stuff /.project /.classpath -/bin -/.settings \ No newline at end of file +/.settings +/.buildpath + +# maven +/target diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..35f40ed --- /dev/null +++ b/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + LimitedCreative + LimitedCreative + LimitedCreative + 1.2.0-SNAPSHOT + https://github.com/possi/LimitedCreative + + scm:git:git://github.com/possi/LimitedCreative.git + scm:git:git@github.com:possi/LimitedCreative.git + https://github.com/possi/LimitedCreative/tree/master + + + + org.bukkit + bukkit + 1.2.3-R0.1-SNAPSHOT + + + com.sk89q + worldguard + 5.5.2-SNAPSHOT + + + + UTF-8 + + \ No newline at end of file diff --git a/src/de/jaschastarke/minecraft/worldguard/CListener.java b/src/de/jaschastarke/minecraft/worldguard/CListener.java index ca956a0..84a1cc6 100644 --- a/src/de/jaschastarke/minecraft/worldguard/CListener.java +++ b/src/de/jaschastarke/minecraft/worldguard/CListener.java @@ -42,10 +42,11 @@ public class CListener implements Listener { public void onPlayerMove(PlayerMoveEvent event) { if (event.isCancelled()) return; - //if (event.isCoarse()) { // next bukkit release will shortcut that + if (event.getFrom().getBlockX() != event.getTo().getBlockX() || event.getFrom().getBlockY() != event.getTo().getBlockY() - || event.getFrom().getBlockZ() != event.getTo().getBlockZ()) { // he really moved, and not just looked around + || event.getFrom().getBlockZ() != event.getTo().getBlockZ() + || !event.getFrom().getWorld().equals(event.getTo().getWorld())) { // he really moved, and not just looked around String current_hash = CPlayer.get(event.getPlayer()).getHash(); if (current_hash == null) {