mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
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 <sam.wilson@gmail.com>
This commit is contained in:
parent
65a08c8c6e
commit
628f916af8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue