Minor changes

This commit is contained in:
fullwall 2012-04-01 19:14:11 +08:00
parent 43341db5bf
commit 755a00f901
2 changed files with 10 additions and 4 deletions

View File

@ -14,6 +14,7 @@
<bukkit.version>1.2.4-R0.1-SNAPSHOT</bukkit.version> <bukkit.version>1.2.4-R0.1-SNAPSHOT</bukkit.version>
<craftbukkit.version>1.2.4-R0.1-SNAPSHOT</craftbukkit.version> <craftbukkit.version>1.2.4-R0.1-SNAPSHOT</craftbukkit.version>
<citizensapi.version>2.0-SNAPSHOT</citizensapi.version> <citizensapi.version>2.0-SNAPSHOT</citizensapi.version>
<rhino.version>1.7R2</rhino.version>
<build.number>Unknown</build.number> <build.number>Unknown</build.number>
</properties> </properties>
@ -25,7 +26,7 @@
<repository> <repository>
<id>everything</id> <id>everything</id>
<url>http://repo.citizensnpcs.net/</url> <url>http://repo.citizensnpcs.net</url>
</repository> </repository>
</repositories> </repositories>
@ -51,6 +52,11 @@
<type>jar</type> <type>jar</type>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
<version>${rhino.version}</version>
</dependency>
</dependencies> </dependencies>
<url>http://www.citizensnpcs.net</url> <url>http://www.citizensnpcs.net</url>

View File

@ -69,7 +69,7 @@ public class LinearWaypointProvider implements WaypointProvider, Iterable<Waypoi
@Override @Override
public void load(DataKey key) { public void load(DataKey key) {
for (DataKey root : key.getRelative("waypoints").getIntegerSubKeys()) { for (DataKey root : key.getRelative("points").getIntegerSubKeys()) {
root = root.getRelative("location"); root = root.getRelative("location");
waypoints.add(new Waypoint(new Location(Bukkit.getWorld(root.getString("world")), root.getDouble("x"), root waypoints.add(new Waypoint(new Location(Bukkit.getWorld(root.getString("world")), root.getDouble("x"), root
.getDouble("y"), root.getDouble("z"), (float) root.getDouble("yaw", 0), (float) root.getDouble( .getDouble("y"), root.getDouble("z"), (float) root.getDouble("yaw", 0), (float) root.getDouble(
@ -80,8 +80,8 @@ public class LinearWaypointProvider implements WaypointProvider, Iterable<Waypoi
@Override @Override
public void save(DataKey key) { public void save(DataKey key) {
key.removeKey("waypoints"); key.removeKey("points");
key = key.getRelative("waypoints"); key = key.getRelative("points");
for (int i = 0; i < waypoints.size(); ++i) { for (int i = 0; i < waypoints.size(); ++i) {
Location location = waypoints.get(i).getLocation(); Location location = waypoints.get(i).getLocation();
DataKey root = key.getRelative(Integer.toString(i) + ".location"); DataKey root = key.getRelative(Integer.toString(i) + ".location");