diff --git a/pom.xml b/pom.xml
index ac1a44d..ff2e1c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.black_ixx
PlayerPoints
- 2.0.0
+ 2.1.0-SNAPSHOT
PlayerPoints
Player points system for Bukkit
diff --git a/src/org/black_ixx/playerpoints/PlayerPointsAPI.java b/src/org/black_ixx/playerpoints/PlayerPointsAPI.java
index 2131337..721d780 100644
--- a/src/org/black_ixx/playerpoints/PlayerPointsAPI.java
+++ b/src/org/black_ixx/playerpoints/PlayerPointsAPI.java
@@ -45,6 +45,15 @@ public boolean give(UUID playerId, int amount) {
return false;
}
+ @Deprecated
+ public boolean give(String playerName, int amount) {
+ boolean success = false;
+ if(playerName != null) {
+ success = give(plugin.translateNameToUUID(playerName), amount);
+ }
+ return success;
+ }
+
/**
* Take points from specified player. If the amount given is not already
* negative, we make it negative.
@@ -66,6 +75,15 @@ public boolean take(UUID playerId, int amount) {
}
return give(playerId, take);
}
+
+ @Deprecated
+ public boolean take(String playerName, int amount) {
+ boolean success = false;
+ if(playerName != null) {
+ success = take(plugin.translateNameToUUID(playerName), amount);
+ }
+ return success;
+ }
/**
* Look up the current points of a player, if available. If player does not
@@ -78,6 +96,11 @@ public boolean take(UUID playerId, int amount) {
public int look(UUID playerId) {
return plugin.getModuleForClass(StorageHandler.class).getPoints(playerId.toString());
}
+
+ @Deprecated
+ public int look(String playerName) {
+ return look(plugin.translateNameToUUID(playerName));
+ }
/**
* Transfer points from one player to another. Attempts to take the points,
@@ -97,6 +120,15 @@ public boolean pay(UUID source, UUID target, int amount) {
}
return false;
}
+
+ @Deprecated
+ public boolean pay(String sourceName, String targetName, int amount) {
+ boolean success = false;
+ if(sourceName != null && targetName != null) {
+ success = pay(plugin.translateNameToUUID(sourceName), plugin.translateNameToUUID(targetName), amount);
+ }
+ return success;
+ }
/**
* Sets a player's points to a given value.
@@ -118,6 +150,15 @@ public boolean set(UUID playerId, int amount) {
}
return false;
}
+
+ @Deprecated
+ public boolean set(String playerName, int amount) {
+ boolean success = false;
+ if(playerName != null) {
+ success = set(plugin.translateNameToUUID(playerName), amount);
+ }
+ return success;
+ }
/**
* Reset a player's points by removing their entry from the config.
@@ -135,4 +176,13 @@ public boolean reset(UUID playerId) {
}
return false;
}
+
+ @Deprecated
+ public boolean reset(String playerName, int amount) {
+ boolean success = false;
+ if(playerName != null) {
+ success = reset(plugin.translateNameToUUID(playerName));
+ }
+ return success;
+ }
}
diff --git a/src/org/black_ixx/playerpoints/services/version/Version.java b/src/org/black_ixx/playerpoints/services/version/Version.java
index 5075da3..67f872f 100644
--- a/src/org/black_ixx/playerpoints/services/version/Version.java
+++ b/src/org/black_ixx/playerpoints/services/version/Version.java
@@ -184,9 +184,9 @@ public boolean validate() {
valid = valid && StringUtils.countMatches(version, "-") <= 1;
valid = valid && StringUtils.countMatches(version, "+") <= 1;
} catch(IndexOutOfBoundsException e) {
-
+ valid = false;
} catch(NumberFormatException e) {
-
+ valid = false;
}
return valid;
}
diff --git a/src/org/black_ixx/playerpoints/update/modules/TwoZeroZeroUpdate.java b/src/org/black_ixx/playerpoints/update/modules/TwoZeroZeroUpdate.java
index b0e244f..9c76b2b 100644
--- a/src/org/black_ixx/playerpoints/update/modules/TwoZeroZeroUpdate.java
+++ b/src/org/black_ixx/playerpoints/update/modules/TwoZeroZeroUpdate.java
@@ -17,7 +17,6 @@ public class TwoZeroZeroUpdate extends UpdateModule {
public TwoZeroZeroUpdate(PlayerPoints plugin) {
super(plugin);
targetVersion = new Version("2.0.0");
- targetVersion.setIgnorePatch(true);
}
@Override