Package org.spout.api

Examples of org.spout.api.Engine


import org.spout.api.entity.Entity;
import org.spout.api.entity.Player;

public class EntityMocker {
  public static Player mockPlayer() {
    Engine engine = EngineFaker.setupEngine();

    final Player player = Mockito.mock(Player.class);
    final EntityComponentAnswer componentHolder = new EntityComponentAnswer(player);
    componentHolder.add(NetworkComponent.class);
View Full Code Here


    return player;
  }

  public static Entity mockEntity() {
    // TODO: this is broken, please fix.
    Engine engine = EngineFaker.setupEngine();

    final Entity entity = Mockito.mock(Entity.class);
    final EntityComponentAnswer componentHolder = new EntityComponentAnswer(entity);

    //Set up component holder methods
View Full Code Here

public class ScoreboardListener implements Listener {
  @EventHandler (order = Order.LATEST)
  public void entityDeath(EntityDeathEvent event) {
    Entity entity = event.getEntity();
    Engine engine = Spout.getEngine();

    // kill count criteria
    Object lastDamager = event.getLastDamager();
    if (lastDamager instanceof Player) {
      Player killer = (Player) lastDamager;
View Full Code Here

  }

  @EventHandler (order = Order.LATEST)
  public void entityHealth(EntityHealthChangeEvent event) {
    Entity entity = event.getEntity();
    Engine engine = Spout.getEngine();
    if (!(entity instanceof Player) || !(engine instanceof Server)) {
      return;
    }

    Player player = (Player) entity;
View Full Code Here

TOP

Related Classes of org.spout.api.Engine

Copyright © 2018 www.massapicom. 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.