Skip to content

Commit

Permalink
correct paper entity properties thanks to new core warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 12, 2021
1 parent c30dcb9 commit c403142
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Expand Up @@ -12,11 +12,15 @@
import java.util.UUID;

public class EntityExperienceOrb implements Property {

public static boolean describes(ObjectTag entity) {
return entity instanceof EntityTag
&& ((EntityTag) entity).getBukkitEntity() instanceof ExperienceOrb;
}

public static final String[] handledMechs = new String[] {
}; // None

public static EntityExperienceOrb getFrom(ObjectTag entity) {
if (!describes(entity)) {
return null;
Expand Down
Expand Up @@ -8,10 +8,14 @@
import com.denizenscript.denizencore.objects.properties.PropertyParser;

public class EntityFromSpawner implements Property {

public static boolean describes(ObjectTag entity) {
return entity instanceof EntityTag;
}

public static final String[] handledMechs = new String[] {
}; // None

public static EntityFromSpawner getFrom(ObjectTag entity) {
if (!describes(entity)) {
return null;
Expand Down
Expand Up @@ -14,6 +14,9 @@ public static boolean describes(ObjectTag entity) {
return entity instanceof EntityTag;
}

public static final String[] handledMechs = new String[] {
}; // None

public static EntitySpawnLocation getFrom(ObjectTag entity) {
if (!describes(entity)) {
return null;
Expand Down

0 comments on commit c403142

Please sign in to comment.