mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
0e7361704a
Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 4068c6aa PR-1053: Change docs for max power in FireworkMeta 6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API 5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml CraftBukkit Changes: 7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports 93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta 5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API 11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml Spigot Changes: ca581228 Rebuild patches
26 lines
1.6 KiB
Diff
26 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Eearslya Sleiarion <eearslya@gmail.com>
|
|
Date: Sun, 23 Aug 2020 13:04:02 +0200
|
|
Subject: [PATCH] Add BellRingEvent
|
|
|
|
Add a new event, BellRingEvent, to trigger whenever a player rings a
|
|
village bell. Passes along the bell block and the player who rang it.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
index 44fd82bf887e5c6d946d7eed18e21f966efda9de..241e6527575c6d6b4facbd3ae1e4a8b65708e397 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -378,10 +378,11 @@ public class CraftEventFactory {
|
|
return tradeSelectEvent;
|
|
}
|
|
|
|
+ @SuppressWarnings("deprecation") // Paper use deprecated event to maintain compat (it extends modern event)
|
|
public static boolean handleBellRingEvent(Level world, BlockPos position, Direction direction, Entity entity) {
|
|
Block block = CraftBlock.at(world, position);
|
|
BlockFace bukkitDirection = CraftBlock.notchToBlockFace(direction);
|
|
- BellRingEvent event = new BellRingEvent(block, bukkitDirection, (entity != null) ? entity.getBukkitEntity() : null);
|
|
+ BellRingEvent event = new io.papermc.paper.event.block.BellRingEvent(block, bukkitDirection, (entity != null) ? entity.getBukkitEntity() : null); // Paper - deprecated BellRingEvent
|
|
Bukkit.getPluginManager().callEvent(event);
|
|
return !event.isCancelled();
|
|
}
|