类的使用
org.bukkit.event.Event
使用Event的程序包
程序包
说明
与袭击有关的
事件(Minecraft Wiki - 袭击).与服务器程序状态变化有关的
事件.与天气状态变化相关的
事件.专门用于在运行时加载软件模组(插件)的类.
用Java编写的处理
插件的类.Spigot特有的玩家事件.
-
org.bukkit.event.block中Event的使用
修饰符和类型类说明classCalled when a bell resonated after being rung and highlights nearby raiders.classCalled when a bell is being rung.class当一个方块被玩家破坏的时候,调用本事件.classCalled when a block is brushed by a player.class当一个方块被火烧掉的时候触发此事件.class当我们尝试建造一个方块的时候,可以检测我们是否可以在此建造它。class当物品堆在方块内成功烹饪时触发本事件 (原版中这个方块一般是营火).classCalled when a player stops damaging a Block.class方块被玩家损坏的事件.class当一个可装备物品从某个方块发射出来并装备到附近的实体上时触发本事件.class物品被方块(比如发射器,投掷器等)射出的事件.classCalled when a block dispenses loot from its designated LootTable.class当一个方块被玩家破坏且掉落物品时触发本事件.class代表与方块相关的事件.class方块产生经验的时候(比如煤矿被被打破会掉落经验)时触发.class方块爆炸事件.class方块因为自然条件消退,融化,消失的事件.class当玩家使用骨粉向某方块施肥后导致方块发生变化时触发本事件.class当一个方块因为自然变化被放置、更改或者蔓延时(比如下雪),触发此事件.class液体流动/龙蛋自己传送的事件(源方块到目标方块).class当一个方块在世界中自然生长的时触发此事件(如小麦生长).class当一个方块被点燃时触发.class当玩家放一个方块, 而连锁放置了第二个方块时(例如玩家放置一个床)触发本事件.class方块物理事件(例如是沙子掉落、流水).class活塞相关事件class活塞臂推出事件.class活塞臂缩回事件class当一个方块被玩家放置的时候触发此事件.class当Sculk Sensor接收到游戏事件并因此可能激活时调用.class当方块接受到的红石信号变化时触发此事件class当发射器剪掉附近的羊的羊毛时触发本事件 (发射器内含剪刀时有机会触发本事件).class当一个方块基于自然法则地蔓延时触发此事件(比如菌丝的蔓延).classCalled when a brewing stand starts to brew.classCalled when a Campfire starts to cook.class炼药锅水位发生变化时触发本事件.classEvent called when a Crafter is about to craft an item.class实体形成方块时触发此事件class当液体方块的液面高度因相邻方块而发生变化时触发本事件.classUsed when: A Furnace starts smeltingFurnaceStartSmeltEventA Brewing-Stand starts brewingBrewingStartEventA Campfire starts cookingCampfireStartEventclass当树叶消失时触发此事件.class当耕地的湿润等级发生变化时触发本事件.class音符盒播放音符的事件[玩家点击/红石触发]classRepresents an event triggered when a new cursor is created by aSculkCatalyst.class在玩家设置牌子上的内容子时触发.class当海绵吸水时触发本事件.classCalled when a block of TNT in the world become primed.classCalled when a vault in a trial chamber is about to display an item. -
org.bukkit.event.enchantment中Event的使用
修饰符和类型类说明class成功附魔物品的事件 (在附魔台里面附魔的)class物品塞入附魔台的事件 - 可被多次调用。 -
org.bukkit.event.entity中Event的使用
修饰符和类型类说明class当滞留药水应用它的效果时触发本事件,期间每5 tick发生一次。class当箭矢射进实体或从实体上拔出(脱落)时触发本事件.class当一只蝙蝠将要睡觉或醒来时触发本事件.class当一个生物体在世界中出生时触发该事件.class当爬行者被闪电击中时触发该事件.classCalled when an EnderDragon switches controller phase.class当实体的氧气值发生变化时触发本事件class当实体破坏门时触发本事件.class当一个实体与另一个实体交配繁殖时触发本事件.classCalled when any Entity changes a block and a more specific event is not available.class当方块造成实体燃烧时触发该事件.class当一个实体造成另外一个实体燃烧时触发该事件.class当实体燃烧时触发该事件class已过时。class当一个实体受到来自方块的伤害时触发该事件class当一个实体受到另外一个实体伤害时触发该事件class储存伤害事件的数据class当一个实体死亡时触发本事件classCalled when an entity stops riding another entity.classThrown when an entity creates an item drop.class当实体进入方块, 保存到那个方块时触发本事件.class当实体进入求爱模式时触发本事件.class代表实体相关事件.classCalled when a human entity experiences exhaustion.class当一个实体爆炸的时候触发本事件class当一个实体与其他物体互交时触发本事件classCalled when an entity receives knockback from another entity.classCalled when a living entity receives knockback.classCalled when an entity attempts to ride another entity.class当实体捡起地面上的掉落物时触发本事件.class当一个实体因玩家在一个方块上"放置"一物品而创建时触发本事件.class当一个实体与传送门接触时触发本事件.class当一个非玩家的实体被传送门传送时触发本事件class在实体退出传送门前触发本事件.class当实体改变它的姿态时触发本事件.class当实体上的药水效果发生改变时触发本事件.class当实体恢复生命值时触发本事件.classCalled when anEntityis removed.class当实体死亡并且有机会复活时触发本事件.classCalled when a LivingEntity shoots a bow firing an arrowclass当实体生成于世界内时触发本事件.classCalled when aSpellcastercasts a spell.class当生物实体被驯服时触发本事件.classCalled when a creature targets or untargets another entityclassCalled when an Entity targets aLivingEntityand can only target LivingEntity's.class当非玩家实体从一处传送到另一处时触发本事件.classSent when an entity's gliding status is toggled with an Elytra.class当实体游泳状态改变时触发本事件.class当实体将转化/蜕变为其它实体时触发本事件.classCalled immediately prior to an entity being unleashed.classCalled when a ThrownExpBottle hits and releases experience.classCalled when an entity has made a decision to explode.class当烟花爆炸时触发本事件class当一个人类实体的饥饿值发生变化时触发本事件class当马跳起时调用此事件.class当掉落物存在时间超过5分钟后被移除时触发本事件 (注:掉落物存在时间因服务器配置和安装的插件而异).classclass当掉落物生成于某个世界时触发本事件.classCalled when a splash potion hits an areaclassStores all data related to the bartering interaction with a piglin.classStores data for pigs being zappedclassCalled when a Pig Zombie is angered by another entity.class当一个玩家死亡时触发本事件classCalled immediately prior to a creature being leashed by a player.classCalled when a splash potion hits an areaclassCalled when a projectile hits an objectclass当一个抛射物被发射时触发本事件.class当羊身上的毛被染色时触发本事件.class当羊身上的羊毛重新长出时触发本事件.class当史莱姆死亡后分裂成小史莱姆时触发本事件class当刷怪笼刷出实体时触发本事件.classCalled when aStrider's temperature has changed as a result of entering or exiting blocks it considers warm.classCalled when an entity is spawned into a world by a trial spawner.classCalled whenever a villager acquires a new trade.classclassCalled when aVillageris about to restock one of its trades.classCalled whenever an entity's reputation with a villager changes. -
org.bukkit.event.hanging中Event的使用
修饰符和类型类说明class当一个悬挂实体被一个实体移除时调用本事件class当一个悬挂实体被移除时调用.class代表与悬挂实体有关的事件.class当一个悬挂实体被放置时触发本事件。 -
org.bukkit.event.inventory中Event的使用
修饰符和类型类说明class当酿造完成时触发这个事件.classCalled when an ItemStack is about to increase the fuel level of a brewing stand.class当一个物品被合成的时候触发这个事件.class当一个物品作为燃料被燃烧的时候触发这个事件.class当玩家从熔炉取出产物时触发这个事件.class当一个物品烧炼完毕时触发本事件.classCalled when a Furnace starts smelting.classEvent that gets called each time a Hopper attempts to find its source/attached containers.class当玩家点击物品栏中的格子时触发事件事件.
译注:事实上打开任意容器的物品栏(包括玩家的背包)后点击任何一个地方都会触发这个事件。class当玩家关闭背包时触发本事件classThis 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.classThis event is called when the player drags an item in their cursor across the inventory.class代表与玩家相关的物品栏事件classAn abstract base class for events that describe an interaction between a HumanEntity and the contents of an Inventory.classCalled when some entity or block (e.g. hopper) tries to move items directly from one inventory to another.class当玩家打开物品栏时触发本事件class当漏斗/漏斗矿车收起掉落的物品时触发本事件.class当物品放入铁砧内,并且可以合成出物品的时候触发该事件classCalled when an item is put in a slot for repair or unenchanting in a grindstone.classCalled when an item is put in a slot and the result is calculated.classclassCalled when an item is put in a slot for upgrade by a Smithing Table.classCalled when the recipe of an Item is completed inside a smithing table.classThis event is called whenever a player clicks a new trade on the trades sidebar. -
org.bukkit.event.player中Event的使用
修饰符和类型类说明class当玩家聊天时触发这个事件.class已过时。chat previews have been removedclass存储尝试登录的玩家的详细信息,玩家尝试登录服务器的事件.class当玩家完成一个进度中所有的标准时触发此事件.class玩家动作事件.class当玩家与装甲架交互并且进行交换, 取回或放置物品时触发本事件.class玩家准备躺到床上时触发此事件.class玩家离开床时触发此事件.class玩家用完一只桶后触发此事件.classThis event is called whenever a player captures an entity in a bucket.class当玩家使用桶时触发本事件.class水桶装满水事件.class已过时。Use the more genericPlayerBucketEntityEventclass当玩家在客户端设置改变主手时触发本事件.class当玩家切换到另一个世界时触发此事件.class当玩家注册/注销一个新的插件通道时触发本事件class已过时。这个事件将被主线程触发,允许使用所有的 Bukkit API,不像AsyncPlayerChatEvent.class已过时。因客户端的改变(1.13更新较大幅度改善了命令输入的体验), 该事件不再触发. 1.13+版本可以参考:PlayerCommandSendEventclass这个事件是,当一个玩家执行一个命令的时候将会被触发(也就是在聊天框里面输入信息以/开头的时候,算作命令,就会触发此事件)。class当服务器可用命令列表发送给玩家时触发本事件.classCalled after a player runs a custom action from a chat event or form submission.class玩家丢出物品事件.class当玩家编辑或签名书与笔时触发。class玩家抛出鸡蛋时触发本事件,鸡蛋可能孵化.class代表玩家事件.class当玩家经验值发生变化时调用此事件.classCalled when a player's experience cooldown changes.class当玩家钓鱼时触发本事件.class当玩家游戏模式发生变化时调用此事件.class当玩家收获方块时触发此事件。classCalled when a visible entity is hidden from a player.classThis event is called when a player sends updated input to the server.class当玩家在实体上点击某实体上的某位置时触发此事件.class当玩家点击一个实体时调用此事件.class当玩家对一个对象或空气进行交互时触发本事件.class某玩家工具耐久消耗完毕时触发(比如铲子,打火石,铁制工具).class当玩家消耗完物品时, 此事件将触发 例如:(食物, 药水, 牛奶桶).classCalled when an item used by the player takes durability damage as a result of being used.class玩家手持某物品事件.class当玩家通过装备上的经验修补附魔修复装备耐久时触发该事件.class玩家进入服务器事件.class玩家被服务器踢出事件.class玩家等级改变事件.classThis event is called when the list of links is sent to the player.class当玩家改变他们的语言设置时触发本事件.class玩家尝试登录的事件.class玩家移动事件.class当玩家从地上捡起箭时触发本事件.classclass玩家将要被传送门传送的事件, 传送过程中会生成一个退出传送门.class已过时。这个事件使登录线程同步; 建议使用AsyncPlayerPreLoginEvent.class玩家离开服务器事件.classCalled when a player clicks a recipe in the recipe book.classCalled when a player changes recipe book settings.class当玩家在配方书中解锁新配方(合成公式)时触发本事件.class玩家注册通信通道之后立即触发此事件.class当玩家对通过Player.setResourcePack(java.lang.String)发起的资源包请求采取动作时触发本事件.class玩家重生事件.class当玩家在使用三叉戟上的激流附魔推动它们在空中飞行(需要在雨天才能在空中飞行)时触发本事件
什么是激流: 是三叉戟上的一个附魔 最高等级为III 用于三叉戟上, 可以在水中或下雨时投掷后推进玩家. 激流不会使三叉戟被抛出, 而会使玩家向前推进. 如果玩家未处在水中或所处地未下雨, 则玩家将无法投掷激流附魔的三叉戟
注意: 激流动作在客户端执行, 因此在此事件中操纵玩家可能会产生所不期望的影响.class玩家对某实体使用剪刀采集物品时调用此事件.classCalled when a hidden entity is shown to a player.classThis event is fired when a sign is opened by the player.classThis event is fired when the spawn point of the player is changed.class当玩家统计信息增长时触发本事件.class玩家用快捷键互换主手和副手的物品时触发本事件.classThis event is called when a player clicks the button to take a book of a Lectern.class玩家传送事件.class玩家切换飞行状态则调用此事件.class玩家切换潜行状态则调用此事件.class玩家切换疾跑状态时调用此事件class当一个实体被玩家解开拴绳时调用.class当玩家注销插件通道时触发事件.class玩家移动速度变化事件. -
org.bukkit.event.raid中Event的使用
-
org.bukkit.event.server中Event的使用
修饰符和类型类说明class当服务器发送广播消息 (比如使用Server.broadcast(String, String)方法) 时调用.class地图初始化时调用.class当一个插件被停用时调用.class当一个插件被启用时调用.class用于插件的启用和禁用事件.class这个事件当服务器RCON收到指令时调用.了解更多.class这个事件当服务器后台发送指令时调用.class各种服务器事件.class当收到MOTD请求时被调用。class当服务器启动/重载完成时调用.class与已注册服务有关的事件.class当一个服务注册时调用.class当一个服务注销时调用.class当一个CommandSender尝试补全命令时触发本事件. -
org.bukkit.event.vehicle中Event的使用
修饰符和类型类说明class载具撞击方块的事件class两个载具碰撞的事件class载具创建事件class载具受到伤害的事件class载具被损毁的事件(包含被玩家/自然损坏)。class实体进入载具的事件class载具撞击实体的事件class代表所有和载具有关的事件class实体退出载具的事件class载具移动事件class载具更新事件 -
org.bukkit.event.weather中Event的使用
修饰符和类型类说明class雷击事件class雷暴天气切换事件.class天气改变事件class和天气有关的事件 -
org.bukkit.event.world中Event的使用
修饰符和类型类说明classThis event will sometimes fire synchronously, depending on how it was triggered.classCalled when aStructureis naturally generated in the world.class代表与区块有关系的事件.class当一个区块被加载时调用.class当一个新生成的区块填充完毕时调用.class当一个区块被卸载时调用class当实体将被加载时调用.class当实体被卸载时调用.class代表 Mojang 通用游戏事件.class当生成给予InventoryHolder的战利品时调用.class当传送门被创建时调用.class一个在世界的出生点被改变时调用的事件.包含这个世界之前的出生点.class当一个有机结构试图生长的时调用此事件(树苗 -> 树, 蘑菇 -> 巨型蘑菇, 自然生长的或使用骨粉生长的).class当世界内的世界发生快进时调用.class代表世界范围内的事件.class当一个世界被初始化时调用.class当一个世界被加载时调用.class当一个世界被保存时调用.class当一个世界被卸载时调用. -
org.bukkit.plugin中Event的使用
返回变量类型为Event的类型的org.bukkit.plugin中的方法修饰符和类型方法说明PluginLoader.createRegisteredListeners(@NotNull Listener listener, @NotNull Plugin plugin) 创建并返回给定的监听器中为对应事件类注册过的监听器.TimedRegisteredListener.getEventClass()Gets the class of the events this listener handled.参数类型为Event的org.bukkit.plugin中的方法修饰符和类型方法说明void调用一个具有详细信息的事件.voidCalls the event executorvoid调用一个具有详细信息的事件.voidvoid类型变量类型为Event的org.bukkit.plugin中的方法参数修饰符和类型方法说明voidPluginManager.registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin) 将指定的执行器注册至指定的事件类.voidPluginManager.registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled) 将指定的执行器注册至指定的事件类.voidSimplePluginManager.registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin) voidSimplePluginManager.registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled) 将指定的执行器注册至指定的事件类. -
org.bukkit.plugin.java中Event的使用
返回变量类型为Event的类型的org.bukkit.plugin.java中的方法 -
org.spigotmc.event.player中Event的使用
PortalCreateEvent