mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-30 19:52:06 -07:00
Start working on 1.19.4
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 May 2017 06:26:01 -0500
|
||||
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Item item;
|
||||
+ private boolean flyAtPlayer = true; // Paper
|
||||
private boolean cancel = false;
|
||||
private final int remaining;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
return remaining;
|
||||
}
|
||||
|
||||
+ // Paper Start
|
||||
+ /**
|
||||
+ * Set if the item will fly at the player
|
||||
+ * <p>Cancelling the event will set this value to false.</p>
|
||||
+ *
|
||||
+ * @param flyAtPlayer True for item to fly at player
|
||||
+ */
|
||||
+ public void setFlyAtPlayer(boolean flyAtPlayer) {
|
||||
+ this.flyAtPlayer = flyAtPlayer;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the item will fly at the player
|
||||
+ *
|
||||
+ * @return True if the item will fly at the player
|
||||
+ */
|
||||
+ public boolean getFlyAtPlayer() {
|
||||
+ return flyAtPlayer;
|
||||
+ }
|
||||
+ // Paper End
|
||||
+
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
@@ -0,0 +0,0 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
+ this.flyAtPlayer = !cancel; // Paper
|
||||
}
|
||||
|
||||
@NotNull
|
Reference in New Issue
Block a user