程序包 org.bukkit

# 类 GameEvent

java.lang.Object
org.bukkit.GameEvent

所有已实现的接口:
  `Keyed`

public abstract class GameEvent extends Object implements Keyed
代表 Mojang 通用游戏事件.

译注:这些事件非 Bukkit 框架内提供的事件, 而是 Mojang 在原游戏引入的事件, 目前已知原版游戏用于幽匿感测体中.

不过 Bukkit 框架提供了一个新的事件: `GenericGameEvent`, 使得监听 Mojang 游戏事件成为可能.

原文:Represents a generic Mojang game event.

从以下版本开始:
  1.17

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `static final GameEvent`
  `BLOCK_ACTIVATE`
  `static final GameEvent`
  `BLOCK_ATTACH`
  `static final GameEvent`
  `BLOCK_CHANGE`
  `static final GameEvent`
  `BLOCK_CLOSE`
  `static final GameEvent`
  `BLOCK_DEACTIVATE`
  `static final GameEvent`
  `BLOCK_DESTROY`
  `static final GameEvent`
  `BLOCK_DETACH`
  `static final GameEvent`
  `BLOCK_OPEN`
  `static final GameEvent`
  `BLOCK_PLACE`
  `static final GameEvent`
  `BLOCK_PRESS`
  已过时。
  `static final GameEvent`
  `BLOCK_SWITCH`
  已过时。
  `static final GameEvent`
  `BLOCK_UNPRESS`
  已过时。
  `static final GameEvent`
  `BLOCK_UNSWITCH`
  已过时。
  `static final GameEvent`
  `CONTAINER_CLOSE`
  `static final GameEvent`
  `CONTAINER_OPEN`
  `static final GameEvent`
  `DISPENSE_FAIL`
  已过时。
  `static final GameEvent`
  `DRINK`
  `static final GameEvent`
  `DRINKING_FINISH`
  已过时。
  `static final GameEvent`
  `EAT`
  `static final GameEvent`
  `ELYTRA_FREE_FALL`
  已过时。
  `static final GameEvent`
  `ELYTRA_GLIDE`
  `static final GameEvent`
  `ENTITY_ACTION`
  `static final GameEvent`
  `ENTITY_DAMAGE`
  `static final GameEvent`
  `ENTITY_DAMAGED`
  已过时。
  `static final GameEvent`
  `ENTITY_DIE`
  `static final GameEvent`
  `ENTITY_DISMOUNT`
  `static final GameEvent`
  `ENTITY_DYING`
  已过时。
  `static final GameEvent`
  `ENTITY_INTERACT`
  `static final GameEvent`
  `ENTITY_KILLED`
  已过时。
  `static final GameEvent`
  `ENTITY_MOUNT`
  `static final GameEvent`
  `ENTITY_PLACE`
  `static final GameEvent`
  `ENTITY_ROAR`
  已过时。
  `static final GameEvent`
  `ENTITY_SHAKE`
  已过时。
  `static final GameEvent`
  `EQUIP`
  `static final GameEvent`
  `EXPLODE`
  `static final GameEvent`
  `FLAP`
  `static final GameEvent`
  `FLUID_PICKUP`
  `static final GameEvent`
  `FLUID_PLACE`
  `static final GameEvent`
  `HIT_GROUND`
  `static final GameEvent`
  `INSTRUMENT_PLAY`
  `static final GameEvent`
  `ITEM_INTERACT_FINISH`
  `static final GameEvent`
  `ITEM_INTERACT_START`
  `static final GameEvent`
  `JUKEBOX_PLAY`
  `static final GameEvent`
  `JUKEBOX_STOP_PLAY`
  `static final GameEvent`
  `LIGHTNING_STRIKE`
  `static final GameEvent`
  `MOB_INTERACT`
  已过时。
  `static final GameEvent`
  `NOTE_BLOCK_PLAY`
  `static final GameEvent`
  `PISTON_CONTRACT`
  已过时。
  `static final GameEvent`
  `PISTON_EXTEND`
  已过时。
  `static final GameEvent`
  `PRIME_FUSE`
  `static final GameEvent`
  `PROJECTILE_LAND`
  `static final GameEvent`
  `PROJECTILE_SHOOT`
  `static final GameEvent`
  `RAVAGER_ROAR`
  已过时。
  `static final GameEvent`
  `RESONATE_1`
  `static final GameEvent`
  `RESONATE_10`
  `static final GameEvent`
  `RESONATE_11`
  `static final GameEvent`
  `RESONATE_12`
  `static final GameEvent`
  `RESONATE_13`
  `static final GameEvent`
  `RESONATE_14`
  `static final GameEvent`
  `RESONATE_15`
  `static final GameEvent`
  `RESONATE_2`
  `static final GameEvent`
  `RESONATE_3`
  `static final GameEvent`
  `RESONATE_4`
  `static final GameEvent`
  `RESONATE_5`
  `static final GameEvent`
  `RESONATE_6`
  `static final GameEvent`
  `RESONATE_7`
  `static final GameEvent`
  `RESONATE_8`
  `static final GameEvent`
  `RESONATE_9`
  `static final GameEvent`
  `RING_BELL`
  已过时。
  `static final GameEvent`
  `SCULK_SENSOR_TENDRILS_CLICKING`
  `static final GameEvent`
  `SHEAR`
  `static final GameEvent`
  `SHRIEK`
  `static final GameEvent`
  `SHULKER_CLOSE`
  已过时。
  `static final GameEvent`
  `SHULKER_OPEN`
  已过时。
  `static final GameEvent`
  `SPLASH`
  `static final GameEvent`
  `STEP`
  `static final GameEvent`
  `SWIM`
  `static final GameEvent`
  `TELEPORT`
  `static final GameEvent`
  `UNEQUIP`
  `static final GameEvent`
  `WOLF_SHAKING`
  已过时。

- ## 构造器概要

  构造器
  构造器
  说明
  `GameEvent()`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static @Nullable GameEvent`
  `getByKey(@NotNull NamespacedKey namespacedKey)`
  已过时。
  请使用 `Registry.get(NamespacedKey)`
  `static @NotNull Collection<GameEvent>`
  `values()`
  已过时。
  请使用 `Iterable.iterator()`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### 从接口继承的方法 org.bukkit.Keyed

  `getKey`

- ## 字段详细资料

  - ### BLOCK_ACTIVATE

    public static final GameEvent BLOCK_ACTIVATE

  - ### BLOCK_ATTACH

    public static final GameEvent BLOCK_ATTACH

  - ### BLOCK_CHANGE

    public static final GameEvent BLOCK_CHANGE

  - ### BLOCK_CLOSE

    public static final GameEvent BLOCK_CLOSE

  - ### BLOCK_DEACTIVATE

    public static final GameEvent BLOCK_DEACTIVATE

  - ### BLOCK_DESTROY

    public static final GameEvent BLOCK_DESTROY

  - ### BLOCK_DETACH

    public static final GameEvent BLOCK_DETACH

  - ### BLOCK_OPEN

    public static final GameEvent BLOCK_OPEN

  - ### BLOCK_PLACE

    public static final GameEvent BLOCK_PLACE

  - ### BLOCK_PRESS

    @Deprecated public static final GameEvent BLOCK_PRESS
    已过时。

  - ### BLOCK_SWITCH

    @Deprecated public static final GameEvent BLOCK_SWITCH
    已过时。

  - ### BLOCK_UNPRESS

    @Deprecated public static final GameEvent BLOCK_UNPRESS
    已过时。

  - ### BLOCK_UNSWITCH

    @Deprecated public static final GameEvent BLOCK_UNSWITCH
    已过时。

  - ### CONTAINER_CLOSE

    public static final GameEvent CONTAINER_CLOSE

  - ### CONTAINER_OPEN

    public static final GameEvent CONTAINER_OPEN

  - ### DISPENSE_FAIL

    @Deprecated public static final GameEvent DISPENSE_FAIL
    已过时。

  - ### DRINK

    public static final GameEvent DRINK

  - ### DRINKING_FINISH

    @Deprecated public static final GameEvent DRINKING_FINISH
    已过时。

  - ### EAT

    public static final GameEvent EAT

  - ### ELYTRA_FREE_FALL

    @Deprecated public static final GameEvent ELYTRA_FREE_FALL
    已过时。

  - ### ELYTRA_GLIDE

    public static final GameEvent ELYTRA_GLIDE

  - ### ENTITY_DAMAGE

    public static final GameEvent ENTITY_DAMAGE

  - ### ENTITY_DAMAGED

    @Deprecated public static final GameEvent ENTITY_DAMAGED
    已过时。

  - ### ENTITY_DIE

    public static final GameEvent ENTITY_DIE

  - ### ENTITY_DISMOUNT

    public static final GameEvent ENTITY_DISMOUNT

  - ### ENTITY_DYING

    @Deprecated public static final GameEvent ENTITY_DYING
    已过时。

  - ### ENTITY_INTERACT

    public static final GameEvent ENTITY_INTERACT

  - ### ENTITY_MOUNT

    public static final GameEvent ENTITY_MOUNT

  - ### ENTITY_KILLED

    @Deprecated public static final GameEvent ENTITY_KILLED
    已过时。

  - ### ENTITY_PLACE

    public static final GameEvent ENTITY_PLACE

  - ### ENTITY_ACTION

    public static final GameEvent ENTITY_ACTION

  - ### ENTITY_ROAR

    @Deprecated public static final GameEvent ENTITY_ROAR
    已过时。

  - ### ENTITY_SHAKE

    @Deprecated public static final GameEvent ENTITY_SHAKE
    已过时。

  - ### EQUIP

    public static final GameEvent EQUIP

  - ### EXPLODE

    public static final GameEvent EXPLODE

  - ### FLAP

    public static final GameEvent FLAP

  - ### FLUID_PICKUP

    public static final GameEvent FLUID_PICKUP

  - ### FLUID_PLACE

    public static final GameEvent FLUID_PLACE

  - ### HIT_GROUND

    public static final GameEvent HIT_GROUND

  - ### INSTRUMENT_PLAY

    public static final GameEvent INSTRUMENT_PLAY

  - ### ITEM_INTERACT_FINISH

    public static final GameEvent ITEM_INTERACT_FINISH

  - ### ITEM_INTERACT_START

    public static final GameEvent ITEM_INTERACT_START

  - ### JUKEBOX_PLAY

    public static final GameEvent JUKEBOX_PLAY

  - ### JUKEBOX_STOP_PLAY

    public static final GameEvent JUKEBOX_STOP_PLAY

  - ### LIGHTNING_STRIKE

    public static final GameEvent LIGHTNING_STRIKE

  - ### MOB_INTERACT

    @Deprecated public static final GameEvent MOB_INTERACT
    已过时。

  - ### NOTE_BLOCK_PLAY

    public static final GameEvent NOTE_BLOCK_PLAY

  - ### PISTON_CONTRACT

    @Deprecated public static final GameEvent PISTON_CONTRACT
    已过时。

  - ### PISTON_EXTEND

    @Deprecated public static final GameEvent PISTON_EXTEND
    已过时。

  - ### PRIME_FUSE

    public static final GameEvent PRIME_FUSE

  - ### PROJECTILE_LAND

    public static final GameEvent PROJECTILE_LAND

  - ### PROJECTILE_SHOOT

    public static final GameEvent PROJECTILE_SHOOT

  - ### RAVAGER_ROAR

    @Deprecated public static final GameEvent RAVAGER_ROAR
    已过时。

  - ### RING_BELL

    @Deprecated public static final GameEvent RING_BELL
    已过时。

  - ### SCULK_SENSOR_TENDRILS_CLICKING

    public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING

  - ### SHEAR

    public static final GameEvent SHEAR

  - ### SHRIEK

    public static final GameEvent SHRIEK

  - ### SHULKER_CLOSE

    @Deprecated public static final GameEvent SHULKER_CLOSE
    已过时。

  - ### SHULKER_OPEN

    @Deprecated public static final GameEvent SHULKER_OPEN
    已过时。

  - ### SPLASH

    public static final GameEvent SPLASH

  - ### STEP

    public static final GameEvent STEP

  - ### SWIM

    public static final GameEvent SWIM

  - ### TELEPORT

    public static final GameEvent TELEPORT

  - ### UNEQUIP

    public static final GameEvent UNEQUIP

  - ### WOLF_SHAKING

    @Deprecated public static final GameEvent WOLF_SHAKING
    已过时。

  - ### RESONATE_1

    public static final GameEvent RESONATE_1

  - ### RESONATE_2

    public static final GameEvent RESONATE_2

  - ### RESONATE_3

    public static final GameEvent RESONATE_3

  - ### RESONATE_4

    public static final GameEvent RESONATE_4

  - ### RESONATE_5

    public static final GameEvent RESONATE_5

  - ### RESONATE_6

    public static final GameEvent RESONATE_6

  - ### RESONATE_7

    public static final GameEvent RESONATE_7

  - ### RESONATE_8

    public static final GameEvent RESONATE_8

  - ### RESONATE_9

    public static final GameEvent RESONATE_9

  - ### RESONATE_10

    public static final GameEvent RESONATE_10

  - ### RESONATE_11

    public static final GameEvent RESONATE_11

  - ### RESONATE_12

    public static final GameEvent RESONATE_12

  - ### RESONATE_13

    public static final GameEvent RESONATE_13

  - ### RESONATE_14

    public static final GameEvent RESONATE_14

  - ### RESONATE_15

    public static final GameEvent RESONATE_15

- ## 构造器详细资料

  - ### GameEvent

    public GameEvent()

- ## 方法详细资料

  - ### getByKey

    @Nullable @Deprecated public static @Nullable GameEvent getByKey(@NotNull @NotNull NamespacedKey namespacedKey)
    已过时。
    请使用 `Registry.get(NamespacedKey)`
    根据指定的`NamespacedKey`获取`游戏事件`.

    原文:Returns a `GameEvent` by a `NamespacedKey`.

    参数:
      `namespacedKey` - the key
    返回:
      游戏事件, 如果 key 不存在则返回 null

  - ### values

    @NotNull @Deprecated public static @NotNull Collection<GameEvent> values()
    已过时。
    请使用 `Iterable.iterator()`
    返回所有游戏事件的集合.

    原文:Returns the set of all GameEvents.

    返回:
      游戏事件键的集合