13
0
geforkt von Mirrors/Paper

SPIGOT-4966: Provide access to Entity in PortalCreateEvent

Dieser Commit ist enthalten in:
md_5 2019-05-21 12:08:19 +10:00
Ursprung 49e15b4d9a
Commit 0e4ca96e47
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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()) {

Datei anzeigen

@ -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()) {

Datei anzeigen

@ -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()) {