Class PlayerSystems.PlayerSpawnedSystem

java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.RefSystem<EntityStore>
com.hypixel.hytale.server.core.modules.entity.player.PlayerSystems.PlayerSpawnedSystem
All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>
Enclosing class:
PlayerSystems

public static class PlayerSystems.PlayerSpawnedSystem extends RefSystem<EntityStore>
A ref system that is called upon the spawning of a player entity.
  • Constructor Details

    • PlayerSpawnedSystem

      public PlayerSpawnedSystem()
  • Method Details

    • getQuery

      @Nonnull public Query<EntityStore> getQuery()
    • onEntityAdded

      public void onEntityAdded(@Nonnull Ref<EntityStore> ref, @Nonnull AddReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer)
      Description copied from class: RefSystem
      Called after an entity has been added to a Store and has an Archetype that fulfills the Query provided by QuerySystem.getQuery()}.
      Specified by:
      onEntityAdded in class RefSystem<EntityStore>
      Parameters:
      ref - The entity reference of the added entity.
      reason - The reason for the entity being added.
      store - The store the entity was added to.
      commandBuffer - The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity add.
    • onEntityRemove

      public void onEntityRemove(@Nonnull Ref<EntityStore> ref, @Nonnull RemoveReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer)
      Description copied from class: RefSystem
      Called before an entity has been removed from a Store and has an Archetype that fulfills the Query provided by QuerySystem.getQuery()}.
      Specified by:
      onEntityRemove in class RefSystem<EntityStore>
      Parameters:
      ref - The entity reference of the removed entity.
      reason - The reason for the entity being removed.
      store - The store the entity is being removed from.
      commandBuffer - The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity remove.
    • sendPlayerSelf

      @Deprecated public static void sendPlayerSelf(@Nonnull Ref<EntityStore> viewerRef, @Nonnull Store<EntityStore> store)
      Deprecated.
      this method exists only as a solution for how players are currently added to worlds.
      Called to send the full entity data for the player themselves when they join a world.
      Parameters:
      viewerRef - The entity reference of the player to send the data to.
      store - The Store<EntityStore> for component access.