Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 20:10:10 +01:00
SPIGOT-4966: Provide access to Entity in PortalCreateEvent
Dieser Commit ist enthalten in:
Ursprung
49e15b4d9a
Commit
0e4ca96e47
@ -121,7 +121,7 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ PortalCreateEvent event = new PortalCreateEvent(blocks, bworld, PortalCreateEvent.CreateReason.FIRE);
|
||||
+ PortalCreateEvent event = new PortalCreateEvent(blocks, bworld, null, PortalCreateEvent.CreateReason.FIRE);
|
||||
+ this.a.getMinecraftWorld().getMinecraftServer().server.getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
|
@ -454,7 +454,7 @@
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.World bworld = worldserver1.getWorld();
|
||||
+ org.bukkit.event.world.PortalCreateEvent portalEvent = new org.bukkit.event.world.PortalCreateEvent((List<org.bukkit.block.BlockState>) (List) blockList.getList(), bworld, org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM);
|
||||
+ org.bukkit.event.world.PortalCreateEvent portalEvent = new org.bukkit.event.world.PortalCreateEvent((List<org.bukkit.block.BlockState>) (List) blockList.getList(), bworld, this.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM);
|
||||
+
|
||||
+ this.world.getServer().getPluginManager().callEvent(portalEvent);
|
||||
+ if (!portalEvent.isCancelled()) {
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.World bworld = this.world.getWorld();
|
||||
+ org.bukkit.event.world.PortalCreateEvent event = new org.bukkit.event.world.PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blockList.getList(), bworld, org.bukkit.event.world.PortalCreateEvent.CreateReason.NETHER_PAIR);
|
||||
+ org.bukkit.event.world.PortalCreateEvent event = new org.bukkit.event.world.PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blockList.getList(), bworld, entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.NETHER_PAIR);
|
||||
+
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+ if (!event.isCancelled()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren