first maven step

also:
 - fixed playermoveevent coarse-check
This commit is contained in:
Jascha Starke 2012-03-03 11:42:14 +01:00
parent 69786772f7
commit 24d07152ab
3 changed files with 39 additions and 4 deletions

10
.gitignore vendored
View file

@ -1,4 +1,10 @@
/bin
# Eclipse stuff
/.project /.project
/.classpath /.classpath
/bin /.settings
/.settings /.buildpath
# maven
/target

28
pom.xml Normal file
View file

@ -0,0 +1,28 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>LimitedCreative</groupId>
<artifactId>LimitedCreative</artifactId>
<name>LimitedCreative</name>
<version>1.2.0-SNAPSHOT</version>
<url>https://github.com/possi/LimitedCreative</url>
<scm>
<connection>scm:git:git://github.com/possi/LimitedCreative.git</connection>
<developerConnection>scm:git:git@github.com:possi/LimitedCreative.git</developerConnection>
<url>https://github.com/possi/LimitedCreative/tree/master</url>
</scm>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.2.3-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>5.5.2-SNAPSHOT</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View file

@ -42,10 +42,11 @@ public class CListener implements Listener {
public void onPlayerMove(PlayerMoveEvent event) { public void onPlayerMove(PlayerMoveEvent event) {
if (event.isCancelled()) if (event.isCancelled())
return; return;
//if (event.isCoarse()) { // next bukkit release will shortcut that
if (event.getFrom().getBlockX() != event.getTo().getBlockX() if (event.getFrom().getBlockX() != event.getTo().getBlockX()
|| event.getFrom().getBlockY() != event.getTo().getBlockY() || 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(); String current_hash = CPlayer.get(event.getPlayer()).getHash();
if (current_hash == null) { if (current_hash == null) {