Skip to content

Commit

Permalink
[semi-breaking] return true nulls where possible
Browse files Browse the repository at this point in the history
all the root tags should return true nulls, just like the sub tags
  • Loading branch information
mcmonkey4eva committed Nov 11, 2014
1 parent 5c9b817 commit 7780c1f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 7 deletions.
Expand Up @@ -54,7 +54,7 @@ public void contextTags(ReplaceableTagEvent event) {
}
}

else event.setReplaced("null");
else return;

}

Expand Down
Expand Up @@ -32,7 +32,6 @@ public void locationTags(ReplaceableTagEvent event) {

// Check if cuboid is null, return null if it is
if (cuboid == null) {
event.setReplaced("null");
return;
}

Expand Down
Expand Up @@ -50,7 +50,6 @@ public void entityTags(ReplaceableTagEvent event) {

if (e == null || !e.isValid()) {
if (!event.hasAlternative()) dB.echoError("Invalid or missing entity for tag <" + event.raw_tag + ">!");
event.setReplaced("null");
return;
}

Expand Down
Expand Up @@ -31,7 +31,6 @@ public void locationTags(ReplaceableTagEvent event) {

// Check if list is null, return null if it is
if (list == null) {
event.setReplaced("null");
return;
}

Expand Down
Expand Up @@ -38,7 +38,6 @@ else if (event.getScriptEntry().hasObject("location"))

// Check if location is null, return null if it is
if (loc == null) {
event.setReplaced("null");
return;
}

Expand Down
Expand Up @@ -57,7 +57,6 @@ public void npcTags(ReplaceableTagEvent event) {

if (n == null || !n.isValid()) {
if (!event.hasAlternative()) dB.echoError("Invalid or missing NPC for tag <" + event.raw_tag + ">!");
event.setReplaced("null");
return;
}

Expand Down
Expand Up @@ -76,7 +76,6 @@ public void playerTags(ReplaceableTagEvent event) {

if (p == null || !p.isValid()) {
if (!event.hasAlternative()) dB.echoError("Invalid or missing player for tag <" + event.raw_tag + ">!");
event.setReplaced("null");
return;
}

Expand Down

0 comments on commit 7780c1f

Please sign in to comment.