示例#1
0
  /**
   * @param plugin
   * @param placedBlock
   * @param player
   */
  public static BlockPlaceEvent BlockPlaceEvent(Mythos plugin, Block placedBlock, Player player) {

    BlockState replacedBlockState = placedBlock.getState();

    Block placedAgainst = placedBlock.getRelative(MythosUtil.getPlayerFacing(player));

    BlockPlaceEvent event =
        new BlockPlaceEvent(placedBlock, replacedBlockState, placedAgainst, null, player, true);
    plugin.getServer().getPluginManager().callEvent(event);

    return event;
  }
示例#2
0
 /**
  * @param theBlock
  * @param player
  */
 public static BlockBreakEvent BlockBreakEvent(Mythos plugin, Block theBlock, Player player) {
   BlockBreakEvent event = new BlockBreakEvent(theBlock, player);
   plugin.getServer().getPluginManager().callEvent(event);
   return event;
 }