Here we go 1.19.4
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cryptite <cryptite@gmail.com>
|
||||
Date: Fri, 12 Aug 2022 11:00:39 -0500
|
||||
Subject: [PATCH] Add PlayerGetRespawnLocationEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerGetRespawnLocationEvent.java b/src/main/java/org/bukkit/event/player/PlayerGetRespawnLocationEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7eca4d6929fc7a75974d182c1ea692d3823a19c0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerGetRespawnLocationEvent.java
|
||||
@@ -0,0 +1,53 @@
|
||||
+package org.bukkit.event.player;
|
||||
+
|
||||
+import org.apache.commons.lang3.Validate;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a respawn event tries to determine the location of a respawn
|
||||
+ */
|
||||
+public class PlayerGetRespawnLocationEvent extends PlayerEvent {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private Location respawnLocation;
|
||||
+
|
||||
+ public PlayerGetRespawnLocationEvent(@NotNull final Player respawnPlayer) {
|
||||
+ super(respawnPlayer);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the current respawn location
|
||||
+ *
|
||||
+ * @return Location current respawn location
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location getRespawnLocation() {
|
||||
+ return this.respawnLocation;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the new respawn location
|
||||
+ *
|
||||
+ * @param respawnLocation new location for the respawn
|
||||
+ */
|
||||
+ public void setRespawnLocation(@NotNull Location respawnLocation) {
|
||||
+ Validate.notNull(respawnLocation, "Respawn location can not be null");
|
||||
+ Validate.notNull(respawnLocation.getWorld(), "Respawn world can not be null");
|
||||
+
|
||||
+ this.respawnLocation = respawnLocation;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
Reference in New Issue
Block a user