All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bukkit.block.PistonMoveReaction Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.bukkit.block;

import java.util.HashMap;
import java.util.Map;

public enum PistonMoveReaction {

  /**
   * Indicates that the block can be pushed or pulled.
   */
  MOVE(0),
  /**
   * Indicates the block is fragile and will break if pushed on.
   */
  BREAK(1),
  /**
   * Indicates that the block will resist being pushed or pulled.
   */
  BLOCK(2);

  private static final Map byId = new HashMap();

  static {
    for (PistonMoveReaction reaction : PistonMoveReaction.values()) {
      byId.put(reaction.id, reaction);
    }
  }

  private final int id;

  PistonMoveReaction(int id) {
    this.id = id;
  }

  /**
   * @param id An ID
   * @return The move reaction with that ID
   * @deprecated Magic value
   */
  @Deprecated
  public static PistonMoveReaction getById(int id) {
    return byId.get(id);
  }

  /**
   * @return The ID of the move reaction
   * @deprecated Magic value
   */
  @Deprecated
  public int getId() {
    return this.id;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy