mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
60 lines
1.6 KiB
Diff
60 lines
1.6 KiB
Diff
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;
|
|
+ }
|
|
+}
|