Skip to content

Commit

Permalink
Update to API 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbax committed Dec 15, 2016
1 parent 12fcf20 commit c44c4ea
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>4.0.0</version>
<version>5.0.0</version>
<type>jar</type>
<optional>true</optional>
<scope>provided</scope>
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/org/kitteh/spectastic/Spectastic.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.kitteh.spectastic;

import com.google.common.reflect.TypeToken;
import com.google.inject.Inject;
import org.kitteh.spectastic.data.gamemode.ImmutablePastGameModeData;
import org.kitteh.spectastic.data.gamemode.PastGameModeData;
Expand Down Expand Up @@ -57,11 +58,11 @@
@Plugin(id = "spectastic", name = "Spectastic", version = "1.1.0-SNAPSHOT")
public class Spectastic {
public static final String PERMISSION_SPEC = "spectastic.spec";
public static final Key<Value<String>> PAST_GAME_MODE = KeyFactory.makeSingleKey(String.class, Value.class, DataQuery.of("PastGameMode"));
public static final Key<Value<String>> PAST_LOCATION_WORLD = KeyFactory.makeSingleKey(String.class, Value.class, DataQuery.of("PastLocationWorld"));
public static final Key<Value<Double>> PAST_LOCATION_X = KeyFactory.makeSingleKey(Double.class, Value.class, DataQuery.of("PastLocationX"));
public static final Key<Value<Double>> PAST_LOCATION_Y = KeyFactory.makeSingleKey(Double.class, Value.class, DataQuery.of("PastLocationY"));
public static final Key<Value<Double>> PAST_LOCATION_Z = KeyFactory.makeSingleKey(Double.class, Value.class, DataQuery.of("PastLocationZ"));
public static final Key<Value<String>> PAST_GAME_MODE = KeyFactory.makeSingleKey(TypeToken.of(String.class), new TypeToken<Value<String>>(){}, DataQuery.of("PastGameMode"), "spectastic:past_gamemode", "Spectastic: Past game mode");
public static final Key<Value<String>> PAST_LOCATION_WORLD = KeyFactory.makeSingleKey(TypeToken.of(String.class), new TypeToken<Value<String>>(){}, DataQuery.of("PastLocationWorld"), "spectastic:past_world", "Spectastic: Past world");
public static final Key<Value<Double>> PAST_LOCATION_X = KeyFactory.makeSingleKey(TypeToken.of(Double.class), new TypeToken<Value<Double>>(){}, DataQuery.of("PastLocationX"), "spectastic:past_x", "Spectastic: Past x");
public static final Key<Value<Double>> PAST_LOCATION_Y = KeyFactory.makeSingleKey(TypeToken.of(Double.class), new TypeToken<Value<Double>>(){}, DataQuery.of("PastLocationY"), "spectastic:past_y", "Spectastic: Past y");
public static final Key<Value<Double>> PAST_LOCATION_Z = KeyFactory.makeSingleKey(TypeToken.of(Double.class), new TypeToken<Value<Double>>(){}, DataQuery.of("PastLocationZ"), "spectastic:past_z", "Spectastic: Past z");

@Inject
private Game game;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ public PastGameModeData asMutable() {
return new PastGameModeData(this.pastGameMode);
}

@Override
public int compareTo(@Nonnull ImmutablePastGameModeData o) {
return this.pastGameMode.compareTo(o.pastGameMode);
}

@Override
public int getContentVersion() {
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public ImmutablePastGameModeData asImmutable() {
return new ImmutablePastGameModeData(this.pastGameMode);
}

@Override
public int compareTo(@Nonnull PastGameModeData o) {
return this.pastGameMode.compareTo(o.pastGameMode);
}

@Override
public int getContentVersion() {
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public PastLocationData asMutable() {
return new PastLocationData(this.world, this.x, this.y, this.z);
}

@Override
public int compareTo(@Nonnull ImmutablePastLocationData o) {
return this.world.compareTo(o.world) + Double.compare(this.x, o.x) + Double.compare(this.y, o.y) + Double.compare(this.z, o.z);
}

@Override
public int getContentVersion() {
return PastLocationData.VERSION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ public ImmutablePastLocationData asImmutable() {
return new ImmutablePastLocationData(this.world, this.x, this.y, this.z);
}

@Override
public int compareTo(@Nonnull PastLocationData o) {
return this.world.compareTo(o.world) + Double.compare(this.x, o.x) + Double.compare(this.y, o.y) + Double.compare(this.z, o.z);
}

@Override
public int getContentVersion() {
return VERSION;
Expand Down

0 comments on commit c44c4ea

Please sign in to comment.