程序包 | 说明 |
---|---|
org.bukkit.event.block | |
org.bukkit.event.enchantment | |
org.bukkit.event.entity | |
org.bukkit.event.hanging | |
org.bukkit.event.inventory | |
org.bukkit.event.player | |
org.bukkit.event.server |
与服务器程序状态变化有关的
事件 . |
org.bukkit.event.vehicle | |
org.bukkit.event.weather |
与天气状态变化相关的
事件 . |
org.bukkit.event.world | |
org.bukkit.plugin |
专门用于在运行时加载软件模组(插件)的类.
|
org.bukkit.plugin.java |
用Java编写的处理
插件 的类. |
限定符和类型 | 类和说明 |
---|---|
class |
BlockBreakEvent
当一个方块被玩家破坏的时候,调用本事件.
|
class |
BlockBurnEvent
当一个方块被火烧掉的时候触发此事件.
|
class |
BlockCanBuildEvent
当我们尝试建造一个方块的时候,可以看到我们是否可以在此建造它。
|
class |
BlockDamageEvent
方块被玩家损坏的事件.
|
class |
BlockDispenseEvent
物品被方块(比如发射器,投掷器等)射出的事件.
|
class |
BlockEvent
代表与方块相关的事件.
|
class |
BlockExpEvent
方块产生经验的时候(比如煤矿被被打破会掉落经验)时触发.
|
class |
BlockExplodeEvent
方块爆炸事件.
|
class |
BlockFadeEvent
方块因为自然条件消退,融化,消失的事件(比如雪融化).
|
class |
BlockFormEvent
当一个方块因为自然变化被放置、更改或者蔓延时(比如下雪),触发此事件.
|
class |
BlockFromToEvent
液体流动/龙蛋自己传送的事件(源方块到目标方块).
|
class |
BlockGrowEvent
当一个方块在世界中自然生长的时触发此事件(如小麦生长).
|
class |
BlockIgniteEvent
当一个方块被点燃时触发.
|
class |
BlockMultiPlaceEvent
当玩家放一个方块,而连锁放置了第二个方块时(例如玩家放置一个床)触发本事件.
|
class |
BlockPhysicsEvent
方块物理事件(例如是沙子掉落).
|
class |
BlockPistonEvent
活塞相关事件
|
class |
BlockPistonExtendEvent
活塞臂推出事件.
|
class |
BlockPistonRetractEvent
活塞臂缩回事件
|
class |
BlockPlaceEvent
当一个方块被玩家放置的时候触发此事件.
|
class |
BlockRedstoneEvent
当方块接受到的红石信号变化时触发此事件
|
class |
BlockSpreadEvent
当一个方块基于自然法则地蔓延时触发此事件(比如菌丝的蔓延).
|
class |
CauldronLevelChangeEvent |
class |
EntityBlockFormEvent
方块搭建成实体时调用本事件.
|
class |
LeavesDecayEvent
当树叶消失时触发此事件.
|
class |
NotePlayEvent
音符盒播放音符的事件[玩家点击/红石触发]
|
class |
SignChangeEvent
在玩家设置牌子上的内容子时触发.
|
限定符和类型 | 类和说明 |
---|---|
class |
EnchantItemEvent
成功附魔物品的事件 (在附魔台里面附魔的)
|
class |
PrepareItemEnchantEvent
物品塞入附魔台的事件 - 可以同时调用。
|
限定符和类型 | 类和说明 |
---|---|
class |
AreaEffectCloudApplyEvent
当滞留药水应用它的效果时触发本事件,期间每5 tick发生一次。
|
class |
CreatureSpawnEvent
当一个生物体在世界中出生时触发该事件.
|
class |
CreeperPowerEvent
当爬行者被闪电击中时触发该事件.
|
class |
EnderDragonChangePhaseEvent
Called when an EnderDragon switches controller phase.
|
class |
EntityAirChangeEvent
当实体的氧气值发生变化时触发本事件
|
class |
EntityBreakDoorEvent
当
实体 破坏门时触发本事件. |
class |
EntityBreedEvent
Called when one Entity breeds with another Entity.
|
class |
EntityChangeBlockEvent
当一个非玩家的实体在改变方块时调用该事件。
|
class |
EntityCombustByBlockEvent
当方块造成实体燃烧时触发该事件.
|
class |
EntityCombustByEntityEvent
当一个实体造成另外一个实体燃烧时触发该事件.
|
class |
EntityCombustEvent
当实体燃烧时触发该事件
如果这个事件被取消,那么这个实体将不会燃烧.
|
class |
EntityCreatePortalEvent
当一个
LivingEntity 在世界中创建传送门时触发该事件. |
class |
EntityDamageByBlockEvent
当一个实体受到来自方块的伤害时触发该事件
原文:
Called when an entity is damaged by a block
|
class |
EntityDamageByEntityEvent
当一个实体受到另外一个实体伤害时触发该事件
|
class |
EntityDamageEvent
储存伤害事件的数据
原文:
Stores data for damage events
|
class |
EntityDeathEvent
当任何一个实体死亡时触发本事件
|
class |
EntityEvent
代表实体相关事件.
|
class |
EntityExplodeEvent
当一个实体爆炸的时候触发本事件
|
class |
EntityInteractEvent
当一个实体与其他物体互交时触发本事件
|
class |
EntityPickupItemEvent
Thrown when a entity picks an item up from the ground
|
class |
EntityPortalEnterEvent
当一个实体与传送门接触时触发本事件.
|
class |
EntityPortalEvent
当一个非玩家的实体被传送门传送时触发本事件
对于玩家请看
PlayerPortalEvent
原文:
Called when a non-player entity is about to teleport because it is in
contact with a portal. |
class |
EntityPortalExitEvent
Called before an entity exits a portal.
|
class |
EntityRegainHealthEvent
Stores data for health-regain events
|
class |
EntityResurrectEvent
Called when an entity dies and may have the opportunity to be resurrected.
|
class |
EntityShootBowEvent
Called when a LivingEntity shoots a bow firing an arrow
|
class |
EntityTameEvent
Thrown when a LivingEntity is tamed
|
class |
EntityTargetEvent
Called when a creature targets or untargets another entity
|
class |
EntityTargetLivingEntityEvent
Called when an Entity targets a
LivingEntity and can only target
LivingEntity's. |
class |
EntityTeleportEvent
Thrown when a non-player entity (such as an Enderman) tries to teleport
from one location to another.
|
class |
EntityToggleGlideEvent
Sent when an entity's gliding status is toggled with an Elytra.
|
class |
EntityUnleashEvent
Called immediately prior to an entity being unleashed.
|
class |
ExpBottleEvent
Called when a ThrownExpBottle hits and releases experience.
|
class |
ExplosionPrimeEvent
Called when an entity has made a decision to explode.
|
class |
FireworkExplodeEvent
当烟花爆炸时触发本事件
|
class |
FoodLevelChangeEvent
当一个人类实体的饥饿值发生变化时触发本事件
|
class |
HorseJumpEvent
当马跳起时调用此事件.
|
class |
ItemDespawnEvent
This event is called when a
Item is removed from
the world because it has existed for 5 minutes. |
class |
ItemMergeEvent |
class |
ItemSpawnEvent
Called when an item is spawned into a world
|
class |
LingeringPotionSplashEvent
Called when a splash potion hits an area
|
class |
PigZapEvent
Stores data for pigs being zapped
|
class |
PlayerDeathEvent
当一个
玩家 死亡时触发本事件 |
class |
PlayerLeashEntityEvent
Called immediately prior to a creature being leashed by a player.
|
class |
PotionSplashEvent
Called when a splash potion hits an area
|
class |
ProjectileHitEvent
Called when a projectile hits an object
|
class |
ProjectileLaunchEvent
当一个抛射物被发射时触发本事件.
|
class |
SheepDyeWoolEvent
Called when a sheep's wool is dyed
|
class |
SheepRegrowWoolEvent
Called when a sheep regrows its wool
|
class |
SlimeSplitEvent
当史莱姆死亡后分裂成小史莱姆时触发本事件
|
class |
VillagerAcquireTradeEvent
Called whenever a villager acquires a new trade.
|
class |
VillagerReplenishTradeEvent
Called when a villager's trade's maximum uses is increased, due to a player's
trade.
|
限定符和类型 | 类和说明 |
---|---|
class |
HangingBreakByEntityEvent
当一个悬挂实体被一个实体移除时调用本事件
|
class |
HangingBreakEvent
当一个悬挂实体被移除时调用.
|
class |
HangingEvent
代表与悬挂实体有关的事件.
|
class |
HangingPlaceEvent
当一个悬挂实体被放置时触发本事件。
|
限定符和类型 | 类和说明 |
---|---|
class |
BrewEvent
当酿造完成时触发这个事件.
|
class |
BrewingStandFuelEvent
Called when an ItemStack is about to increase the fuel level of a brewing
stand.
|
class |
CraftItemEvent
当一个物品被合成的时候触发这个事件.
|
class |
FurnaceBurnEvent
当一个物品作为燃料被燃烧的时候触发这个事件.
|
class |
FurnaceExtractEvent
当玩家从熔炉取出产物时触发这个事件.
|
class |
FurnaceSmeltEvent
当一个物品被熔炼完毕时触发这个事件.
|
class |
InventoryClickEvent
当玩家点击物品栏中的格子时触发事件事件.
|
class |
InventoryCloseEvent
当玩家关闭背包时触发本事件
|
class |
InventoryCreativeEvent
This event is called when a player in creative mode puts down or picks up
an item in their inventory / hotbar and when they drop items from their
Inventory while in creative mode.
|
class |
InventoryDragEvent
This event is called when the player drags an item in their cursor across
the inventory.
|
class |
InventoryEvent
代表与玩家相关的物品栏事件
|
class |
InventoryInteractEvent
An abstract base class for events that describe an interaction between a
HumanEntity and the contents of an Inventory.
|
class |
InventoryMoveItemEvent
Called when some entity or block (e.g. hopper) tries to move items directly
from one inventory to another.
|
class |
InventoryOpenEvent
当玩家打开物品栏时触发本事件
|
class |
InventoryPickupItemEvent
当漏斗/漏斗矿车收起掉落的物品时触发本事件.
|
class |
PrepareAnvilEvent
当物品放入铁砧内,并且可以合成出物品的时候触发该事件
|
class |
PrepareItemCraftEvent |
限定符和类型 | 类和说明 |
---|---|
class |
AsyncPlayerChatEvent
当玩家聊天时触发这个事件.
|
class |
AsyncPlayerPreLoginEvent
存储尝试登录的玩家的详细信息,玩家尝试登录服务器的事件.
|
class |
PlayerAchievementAwardedEvent
已过时。
未来版本的Minecraft将不会有成就(取而代之的是进度).
|
class |
PlayerAdvancementDoneEvent
Called when a player has completed all criteria in an advancement.
|
class |
PlayerAnimationEvent
玩家动作事件.
|
class |
PlayerArmorStandManipulateEvent
Called when a player interacts with an armor stand and will either swap, retrieve or place an item.
|
class |
PlayerBedEnterEvent
玩家躺在床上时触发此事件.
|
class |
PlayerBedLeaveEvent
玩家离开床时触发此事件.
|
class |
PlayerBucketEmptyEvent
玩家用完一只桶后触发此事件.
|
class |
PlayerBucketEvent
当玩家使用桶时触发本事件.
|
class |
PlayerBucketFillEvent
水桶装满水事件.
|
class |
PlayerChangedMainHandEvent
当玩家在客户端设置改变主手时触发本事件.
|
class |
PlayerChangedWorldEvent
当玩家切换到另一个世界时触发此事件.
|
class |
PlayerChannelEvent
当玩家注册/注销一个新的插件通道时触发本事件
|
class |
PlayerChatEvent
已过时。
这个事件将被主线程触发,允许使用所有的 Bukkit API,不像
AsyncPlayerChatEvent .
监听这个事件迫使聊天等待主线程,会导致聊天消息延迟展现。建议使用线程安全的 |
class |
PlayerChatTabCompleteEvent
当玩家尝试补全聊天消息时触发本事件
|
class |
PlayerCommandPreprocessEvent
这个事件是,当一个玩家执行一个命令的时候将会被触发(也就是在聊天框里面输入信息以/开头的时候,算作命令,就会触发此事件)。
|
class |
PlayerDropItemEvent
玩家丢出物品事件.
|
class |
PlayerEditBookEvent
当玩家编辑或签名书与笔时触发。
|
class |
PlayerEggThrowEvent
玩家抛出鸡蛋时触发本事件,鸡蛋可能孵化.
|
class |
PlayerEvent
代表玩家事件.
|
class |
PlayerExpChangeEvent
当玩家经验值发生变化时调用此事件.
|
class |
PlayerFishEvent
当玩家钓鱼时触发本事件.
|
class |
PlayerGameModeChangeEvent
当玩家游戏模式发生变化时调用此事件.
|
class |
PlayerInteractAtEntityEvent
当玩家在实体上点击某实体上的某位置时触发此事件.
|
class |
PlayerInteractEntityEvent
当玩家点击一个实体时调用此事件.
|
class |
PlayerInteractEvent
当玩家对一个对象或空气进行交互时触发本事件, 可能在左右手交互时也会被触发
你可以使用
PlayerInteractEvent.getHand() 方法来确定是哪只手
如果是原版行为触发了本事件, 则本事件将会被取消(例如与空气进行交互)
原文:Represents an event that is called when a player interacts with an object or
air, potentially fired once for each hand. |
class |
PlayerItemBreakEvent
某玩家工具耐久消耗完毕时触发(比如铲子,打火石,铁制工具).
|
class |
PlayerItemConsumeEvent
This event will fire when a player is finishing consuming an item (food,
potion, milk bucket).
|
class |
PlayerItemHeldEvent
玩家手持某物品事件.
|
class |
PlayerItemMendEvent
Represents when a player has an item repaired via the Mending enchantment.
|
class |
PlayerJoinEvent
玩家进入服务器事件.
|
class |
PlayerKickEvent
玩家被服务器踢出事件.
|
class |
PlayerLevelChangeEvent
玩家等级改变事件.
|
class |
PlayerLocaleChangeEvent
当玩家改变他们的语言设置时触发本事件.
|
class |
PlayerLoginEvent
玩家尝试登录的事件
|
class |
PlayerMoveEvent
玩家移动事件.
|
class |
PlayerPickupArrowEvent
当玩家从地上捡起箭时触发本事件.
|
class |
PlayerPickupItemEvent
|
class |
PlayerPortalEvent
玩家将要被传送门传送的事件.
|
class |
PlayerPreLoginEvent
已过时。
这个事件使登录线程同步;
建议使用
AsyncPlayerPreLoginEvent . |
class |
PlayerQuitEvent
玩家离开服务器事件.
|
class |
PlayerRegisterChannelEvent
玩家注册通信通道之后立即触发此事件.
|
class |
PlayerResourcePackStatusEvent
当玩家对通过
Player.setResourcePack(java.lang.String) 发起的资源包请求采取动作时触发本事件. |
class |
PlayerRespawnEvent
玩家重生事件.
|
class |
PlayerShearEntityEvent
玩家剪羊毛时调用此事件.
|
class |
PlayerStatisticIncrementEvent
当玩家统计信息增长时触发本事件.
|
class |
PlayerSwapHandItemsEvent
玩家用快捷键互换主手和副手的物品时触发本事件.
|
class |
PlayerTeleportEvent
玩家传送事件.
|
class |
PlayerToggleFlightEvent
玩家切换飞行状态则调用此事件.
|
class |
PlayerToggleSneakEvent
玩家切换潜行状态则调用此事件.
|
class |
PlayerToggleSprintEvent
玩家切换疾跑状态时调用此事件
|
class |
PlayerUnleashEntityEvent
当一个实体被玩家解开拴绳时调用.
|
class |
PlayerUnregisterChannelEvent
当玩家注销插件通道时触发事件.
|
class |
PlayerVelocityEvent
玩家移动速度变化事件.
|
限定符和类型 | 类和说明 |
---|---|
class |
BroadcastMessageEvent
Event triggered for server broadcast messages such as from
Server.broadcast(String, String) . |
class |
MapInitializeEvent
地图初始化时调用.
|
class |
PluginDisableEvent
当一个插件被禁用时调用.
|
class |
PluginEnableEvent
当一个插件被启用时调用.
|
class |
PluginEvent
用于插件的启用和禁用事件.
|
class |
RemoteServerCommandEvent
这个事件当服务器RCON收到指令时调用.
|
class |
ServerCommandEvent
这个事件当服务器后台发送指令时调用.
|
class |
ServerEvent
其它服务器事件(杂项).
|
class |
ServerListPingEvent
当收到MOTD请求时被调用。
|
class |
ServiceEvent
事件关联的注册服务器.这就相当于一个
ServicesManager . |
class |
ServiceRegisterEvent
当一个服务注册时调用.
|
class |
ServiceUnregisterEvent
当一个服务注销时调用.
|
class |
TabCompleteEvent
当一个
CommandSender 尝试补全命令时触发本事件. |
限定符和类型 | 类和说明 |
---|---|
class |
VehicleBlockCollisionEvent
载具撞击方块的事件
|
class |
VehicleCollisionEvent
两个载具碰撞的事件
|
class |
VehicleCreateEvent
载具创建事件
|
class |
VehicleDamageEvent
载具被伤害的事件
|
class |
VehicleDestroyEvent
载具被损毁的事件(包含被玩家/自然损坏)。
|
class |
VehicleEnterEvent
实体进入载具的事件
|
class |
VehicleEntityCollisionEvent
载具撞击实体的事件
|
class |
VehicleEvent
代表所有和载具有关的事件
|
class |
VehicleExitEvent
实体退出载具的事件
|
class |
VehicleMoveEvent
载具移动事件
|
class |
VehicleUpdateEvent
载具更新事件
|
限定符和类型 | 类和说明 |
---|---|
class |
LightningStrikeEvent
雷击事件
|
class |
ThunderChangeEvent
世界打雷事件
|
class |
WeatherChangeEvent
天气改变事件
|
class |
WeatherEvent
和天气有关的事件
|
限定符和类型 | 类和说明 |
---|---|
class |
ChunkEvent
代表与区块有关系的事件.
|
class |
ChunkLoadEvent
当一个区块被加载时调用.
|
class |
ChunkPopulateEvent
当一个新的区块填充完毕时调用.
|
class |
ChunkUnloadEvent
当一个区块被卸载时调用
|
class |
PortalCreateEvent
当传送门被创建时调用.
|
class |
SpawnChangeEvent
一个在世界的出生点被改变时调用的事件.包含这个世界之前的出生点.
|
class |
StructureGrowEvent
当一个有机结构试图生长的时调用此事件(树苗 -> 树, 蘑菇 -> 巨型蘑菇, 自然生长的或使用骨粉生长的).
|
class |
WorldEvent
代表世界范围内的事件.
|
class |
WorldInitEvent
当一个世界被初始化时调用.
|
class |
WorldLoadEvent
当一个世界被加载时调用.
|
class |
WorldSaveEvent
当一个世界被保存时调用.
|
class |
WorldUnloadEvent
当一个世界被卸载时调用.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<java.lang.Class<? extends Event>,java.util.Set<RegisteredListener>> |
PluginLoader.createRegisteredListeners(Listener listener,
Plugin plugin)
Creates and returns registered listeners for the event classes used in
this listener
|
java.lang.Class<? extends Event> |
TimedRegisteredListener.getEventClass()
Gets the class of the events this listener handled.
|
限定符和类型 | 方法和说明 |
---|---|
void |
TimedRegisteredListener.callEvent(Event event) |
void |
SimplePluginManager.callEvent(Event event)
Calls an event with the given details.
|
void |
PluginManager.callEvent(Event event)
Calls an event with the given details
|
void |
RegisteredListener.callEvent(Event event)
Calls the event executor
|
void |
EventExecutor.execute(Listener listener,
Event event) |
限定符和类型 | 方法和说明 |
---|---|
void |
SimplePluginManager.registerEvent(java.lang.Class<? extends Event> event,
Listener listener,
EventPriority priority,
EventExecutor executor,
Plugin plugin) |
void |
PluginManager.registerEvent(java.lang.Class<? extends Event> event,
Listener listener,
EventPriority priority,
EventExecutor executor,
Plugin plugin)
Registers the specified executor to the given event class
|
void |
SimplePluginManager.registerEvent(java.lang.Class<? extends Event> event,
Listener listener,
EventPriority priority,
EventExecutor executor,
Plugin plugin,
boolean ignoreCancelled)
Registers the given event to the specified listener using a directly
passed EventExecutor
|
void |
PluginManager.registerEvent(java.lang.Class<? extends Event> event,
Listener listener,
EventPriority priority,
EventExecutor executor,
Plugin plugin,
boolean ignoreCancelled)
Registers the specified executor to the given event class
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<java.lang.Class<? extends Event>,java.util.Set<RegisteredListener>> |
JavaPluginLoader.createRegisteredListeners(Listener listener,
Plugin plugin) |