Class XpOrbData

java.lang.Object
ch.njol.skript.entity.EntityData<org.bukkit.entity.ExperienceOrb>
ch.njol.skript.entity.XpOrbData
All Implemented Interfaces:
SyntaxElement, YggdrasilSerializable, YggdrasilSerializable.YggdrasilExtendedSerializable

public class XpOrbData extends EntityData<org.bukkit.entity.ExperienceOrb>
  • Constructor Details

    • XpOrbData

      public XpOrbData()
    • XpOrbData

      public XpOrbData(int xp)
  • Method Details

    • init

      protected boolean init(Literal<?>[] exprs, int matchedPattern, SkriptParser.ParseResult parseResult)
      Specified by:
      init in class EntityData<org.bukkit.entity.ExperienceOrb>
    • init

      protected boolean init(@Nullable @Nullable Class<? extends org.bukkit.entity.ExperienceOrb> c, @Nullable @Nullable org.bukkit.entity.ExperienceOrb e)
      Specified by:
      init in class EntityData<org.bukkit.entity.ExperienceOrb>
      Parameters:
      c - An entity's class, e.g. Player
      e - An actual entity, or null to get an entity data for an entity class
      Returns:
      Whether initialisation was successful
    • getType

      public Class<? extends org.bukkit.entity.ExperienceOrb> getType()
      Specified by:
      getType in class EntityData<org.bukkit.entity.ExperienceOrb>
    • match

      protected boolean match(org.bukkit.entity.ExperienceOrb entity)
      Specified by:
      match in class EntityData<org.bukkit.entity.ExperienceOrb>
    • set

      public void set(org.bukkit.entity.ExperienceOrb entity)
      Specified by:
      set in class EntityData<org.bukkit.entity.ExperienceOrb>
    • spawn

      @Nullable public @Nullable org.bukkit.entity.ExperienceOrb spawn(org.bukkit.Location loc, @Nullable @Nullable Consumer<org.bukkit.entity.ExperienceOrb> consumer)
      Description copied from class: EntityData
      Spawn this entity data at a location. The consumer allows for modification to the entity before it actually gets spawned.
      Overrides:
      spawn in class EntityData<org.bukkit.entity.ExperienceOrb>
      Parameters:
      loc - The Location to spawn the entity at.
      consumer - A Consumer to apply the entity changes to.
      Returns:
      The Entity object that is spawned.
    • toString

      public String toString(int flags)
      Overrides:
      toString in class EntityData<org.bukkit.entity.ExperienceOrb>
    • getExperience

      public int getExperience()
    • getInternalExperience

      public int getInternalExperience()
    • hashCode_i

      protected int hashCode_i()
      Specified by:
      hashCode_i in class EntityData<org.bukkit.entity.ExperienceOrb>
    • equals_i

      protected boolean equals_i(EntityData<?> obj)
      Specified by:
      equals_i in class EntityData<org.bukkit.entity.ExperienceOrb>
    • deserialize

      protected boolean deserialize(String s)
      Overrides:
      deserialize in class EntityData<org.bukkit.entity.ExperienceOrb>
    • isSupertypeOf

      public boolean isSupertypeOf(EntityData<?> e)
      Specified by:
      isSupertypeOf in class EntityData<org.bukkit.entity.ExperienceOrb>
    • getSuperType

      public EntityData getSuperType()
      Description copied from class: EntityData
      Returns the super type of this entity data, e.g. 'wolf' for 'angry wolf'.
      Specified by:
      getSuperType in class EntityData<org.bukkit.entity.ExperienceOrb>
      Returns:
      The supertype of this entity data. Must not be null.