Skip to content

Commit

Permalink
Flag ListTags should be treated similar to elements for type validating
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 24, 2020
1 parent 351504d commit 7215335
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -7,6 +7,7 @@
import com.denizenscript.denizencore.objects.ObjectFetcher;
import com.denizenscript.denizencore.objects.ObjectTag;
import com.denizenscript.denizencore.objects.core.ElementTag;
import com.denizenscript.denizencore.objects.core.ListTag;
import com.denizenscript.denizencore.utilities.CoreUtilities;

public class CommonRegistries {
Expand Down Expand Up @@ -119,7 +120,10 @@ public boolean canBecome(ObjectTag inp) {
if (inpType == EntityTag.class || inpType == PlayerTag.class || inpType == NPCTag.class) {
return true;
}
else if (inpType == ElementTag.class) {
if (inpType == ListTag.class && ((ListTag) inp).flag != null) {
inpType = ElementTag.class;
}
if (inpType == ElementTag.class) {
String simple = inp.identifySimple();
int atIndex = simple.indexOf('@');
if (atIndex != -1) {
Expand Down

0 comments on commit 7215335

Please sign in to comment.