Examples of RedstoneChangeEvent


Examples of org.spout.vanilla.event.material.RedstoneChangeEvent

    } else if (newMat == oldMat && oldMat instanceof RedstoneSource) {
      prevPower = ((RedstoneSource) oldMat).getRedstonePowerStrength(initialState);
      newPower = ((RedstoneSource) newMat).getRedstonePowerStrength(event.getSnapshot());
    }
    if (prevPower != -1) {
      RedstoneChangeEvent redstoneEvent = new RedstoneChangeEvent(event.getBlock(), event.getCause(), prevPower, newPower);
      plugin.getEngine().getEventManager().callEvent(redstoneEvent);
      if (redstoneEvent.isCancelled()) {
        event.setCancelled(true);
      }
    }
  }
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.