Skip to content

Commit

Permalink
Bug fixes. dPlayer now allowing null fixed. Comparable comparing stri…
Browse files Browse the repository at this point in the history
…ngs fixed.
  • Loading branch information
aufdemrand committed Jun 24, 2013
1 parent cd7daf2 commit f3c42b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public static boolean matches(String arg) {
/////////////////

public dPlayer(OfflinePlayer player) {
if (player == null) return;

this.player_name = player.getName();

// Keep in a map to avoid multiple instances of a dPlayer per player.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ private void compare_as_strings() {

outcome = false;

String comparable = (String) this.comparable;
String comparedto = (String) this.comparedto;
String comparable = String.valueOf(this.comparable);
String comparedto = String.valueOf(this.comparedto);

if (comparable == null || comparedto == null) return;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/aufdemrand/denizen/tags/TagManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void registerCoreTags() {
new LocationTags(denizen);
new SpecialCharacterTags(denizen);
new TextTags(denizen);
new ForeignCharacterTags(denizen);
}

public static String tag(dPlayer player, dNPC npc, String arg) {
Expand Down

0 comments on commit f3c42b5

Please sign in to comment.