mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Update to 1.16.2
This commit is contained in:
59
patches/api/0029-DragonEggPlaceEvent.patch
Normal file
59
patches/api/0029-DragonEggPlaceEvent.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 30 Jul 2020 18:15:04 -0500
|
||||
Subject: [PATCH] DragonEggPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java b/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..bdabfd2b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java
|
||||
@@ -0,0 +1,47 @@
|
||||
+package net.pl3x.purpur.event.block;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public class DragonEggPlaceEvent extends Event implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private Location location;
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ public DragonEggPlaceEvent(@NotNull Location location) {
|
||||
+ this.location = location;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public Location getLocation() {
|
||||
+ return location;
|
||||
+ }
|
||||
+
|
||||
+ public void setLocation(@NotNull Location location) {
|
||||
+ this.location = location;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
Reference in New Issue
Block a user