From 628f916af8dbc618ef5f9fff7f183f91b21b6512 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 25 Dec 2011 22:13:25 -0800 Subject: [PATCH] Implement PortalCreateEvent reason codes. Addresses BUKKIT-833 This commit modifies the construction of PortalCreateEvents to specify a reason for the event. Reasons are either: 1. FIRE: the portal is being created because a player set fire to an obsidian frame. 2. DESTINATION: the portal is being created as a destination for an existing portal. By: Sam Wilson --- .../src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java index 0e3fbda805..8abe81e148 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java @@ -341,7 +341,7 @@ public class PortalTravelAgent implements TravelAgent { } } - PortalCreateEvent event = new PortalCreateEvent(blocks, (org.bukkit.World) craftWorld); + PortalCreateEvent event = new PortalCreateEvent(blocks, (org.bukkit.World) craftWorld, PortalCreateEvent.CreateReason.OBC_DESTINATION); Bukkit.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { return false;