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

View File

@ -69,7 +69,7 @@ public class LinearWaypointProvider implements WaypointProvider, Iterable<Waypoi
@Override
public void load(DataKey key) {
for (DataKey root : key.getRelative("waypoints").getIntegerSubKeys()) {
for (DataKey root : key.getRelative("points").getIntegerSubKeys()) {
root = root.getRelative("location");
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(
@ -80,8 +80,8 @@ public class LinearWaypointProvider implements WaypointProvider, Iterable<Waypoi
@Override
public void save(DataKey key) {
key.removeKey("waypoints");
key = key.getRelative("waypoints");
key.removeKey("points");
key = key.getRelative("points");
for (int i = 0; i < waypoints.size(); ++i) {
Location location = waypoints.get(i).getLocation();
DataKey root = key.getRelative(Integer.toString(i) + ".location");