Examples of DestroyEvent


Examples of org.groovymud.engine.event.action.DestroyEvent

    }

  }

  protected void doDestroyEvent(IScopedEvent arg) {
    DestroyEvent ev = (DestroyEvent) arg;
    MudObject object = (MudObject) ev.getSource();
    if (object instanceof Player) {
      fireLeavingMessage((Player) object);
    }
    if (object instanceof Container) {
      unregisterContents(((Container) object));
View Full Code Here

Examples of org.groovymud.engine.event.action.DestroyEvent

  boolean methodCalled;

  public void testDoUpdate() {
    final MessageEvent mE = new MessageEvent();
    final MovementEvent moveEvent = new MovementEvent(null, null, null, null);
    final DestroyEvent dE = new DestroyEvent();
    final SaveEvent sE = new SaveEvent();

    Registry reg = new Registry(null) {

      @Override
View Full Code Here

Examples of org.terasology.logic.health.DestroyEvent

    @Command(shortDescription = "Reduce the player's health to zero", runOnServer = true)
    public void kill(EntityRef client) {
        ClientComponent clientComp = client.getComponent(ClientComponent.class);
        HealthComponent health = clientComp.character.getComponent(HealthComponent.class);
        if (health != null) {
            clientComp.character.send(new DestroyEvent(clientComp.character, EntityRef.NULL, EngineDamageTypes.DIRECT.get()));
        }
    }
View Full Code Here

Examples of org.terasology.logic.health.DestroyEvent

    @ReceiveEvent
    public void checkForSupport(DelayedActionTriggeredEvent event, EntityRef entity, BlockComponent block, SideBlockSupportRequiredComponent supportRequired) {
        if (event.getActionId().equals(SUPPORT_CHECK_ACTION_ID)) {
            if (!isSufficientlySupported(block.getPosition(), null, Collections.<Vector3i, Block>emptyMap(), supportRequired)) {
                PrefabManager prefabManager = CoreRegistry.get(PrefabManager.class);
                entity.send(new DestroyEvent(entity, EntityRef.NULL, prefabManager.getPrefab("engine:supportRemovedDamage")));
            }
        }
    }
View Full Code Here

Examples of org.terasology.logic.health.DestroyEvent

            final Side sideReverse = side.reverse();

            for (BlockStructuralSupport support : supports) {
                if (support.shouldBeRemovedDueToChange(blockPosition, sideReverse)) {
                    System.out.println("Removing block due to: " + support.getClass());
                    blockEntityRegistry.getBlockEntityAt(blockPosition).send(new DestroyEvent(gatheringEntity,
                            EntityRef.NULL, prefabManager.getPrefab("engine:supportRemovedDamage")));
                    break;
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.