mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 01:12:47 +01:00
SPIGOT-4966: Provide access to Entity in PortalCreateEvent
This commit is contained in:
parent
49e15b4d9a
commit
0e4ca96e47
3 changed files with 3 additions and 3 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue