Skip to content

Commit 9841952

Browse files
committed
this actually applies
1 parent 81b91aa commit 9841952

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

parchment-api/paper-patches/files/src/main/java/io/papermc/paper/event/player/PlayerPickItemEvent.java.patch

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,31 @@
99
import org.bukkit.entity.Player;
1010
import org.bukkit.event.Cancellable;
1111
import org.bukkit.event.HandlerList;
12-
@@ -21,14 +_,21 @@
13-
14-
private int targetSlot;
15-
private int sourceSlot;
12+
@@ -24,6 +_,8 @@
13+
14+
private static final HandlerList HANDLER_LIST = new HandlerList();
15+
1616
+ private final Location location;
1717
+ private final Entity entity;
18-
+ private boolean isRequestingData;
19-
+
20-
18+
private final boolean includeData;
19+
20+
private int targetSlot;
21+
@@ -32,11 +_,13 @@
2122
private boolean cancelled;
2223

2324
@ApiStatus.Internal
24-
- public PlayerPickItemEvent(final Player player, final int targetSlot, final int sourceSlot) {
25-
+ public PlayerPickItemEvent(final Player player, final int targetSlot, final int sourceSlot, final Location location, final Entity entity, boolean isRequestingData) {
25+
- protected PlayerPickItemEvent(final Player player, final boolean includeData, final int targetSlot, final int sourceSlot) {
26+
+ public PlayerPickItemEvent(final Player player, final int targetSlot, final int sourceSlot, final Location location, final Entity entity, boolean includeData) {
2627
super(player);
28+
this.includeData = includeData;
2729
this.targetSlot = targetSlot;
2830
this.sourceSlot = sourceSlot;
2931
+ this.location = location;
3032
+ this.entity = entity;
31-
+ this.isRequestingData = isRequestingData;
3233
}
3334

3435
/**
35-
@@ -72,6 +_,18 @@
36+
@@ -89,6 +_,14 @@
3637
public void setSourceSlot(final @Range(from = -1, to = 35) int sourceSlot) {
3738
Preconditions.checkArgument(sourceSlot >= -1 && sourceSlot <= 35, "Source slot must be in range of the player's inventory slot, or -1");
3839
this.sourceSlot = sourceSlot;
@@ -44,10 +45,6 @@
4445
+
4546
+ public @org.jetbrains.annotations.Nullable Entity getEntity() {
4647
+ return entity;
47-
+ }
48-
+
49-
+ public boolean isRequestingData() {
50-
+ return isRequestingData;
5148
}
5249

5350
@Override

0 commit comments

Comments
 (0)