mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
fix spacing
This commit is contained in:
parent
d828e37224
commit
8a0fee1d63
@ -5,7 +5,7 @@ Subject: [PATCH] add PlayerCreateMapEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/EmptyMapItem.java b/src/main/java/net/minecraft/world/item/EmptyMapItem.java
|
||||
index e92bb09dd3218d5a13e6251bddd0812acadda2be..3e4a20de2140615afd7ff271a072b11caef9b214 100644
|
||||
index e92bb09dd3218d5a13e6251bddd0812acadda2be..7da8084db2ad53d2d467e3b9868a523f7ce3970a 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/EmptyMapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/EmptyMapItem.java
|
||||
@@ -18,13 +18,18 @@ public class EmptyMapItem extends ComplexItem {
|
||||
@ -22,9 +22,9 @@ index e92bb09dd3218d5a13e6251bddd0812acadda2be..3e4a20de2140615afd7ff271a072b11c
|
||||
+ // Paper start
|
||||
+ io.papermc.paper.event.player.PlayerCreateMapEvent playerCreateMapEvent = new io.papermc.paper.event.player.PlayerCreateMapEvent((org.bukkit.entity.Player) user.getBukkitEntity(), itemStack2.asBukkitCopy());
|
||||
+ world.getCraftServer().getPluginManager().callEvent(playerCreateMapEvent);
|
||||
+ if(playerCreateMapEvent.isCancelled()){
|
||||
+ if (playerCreateMapEvent.isCancelled()) {
|
||||
+ return InteractionResultHolder.consume(itemStack);
|
||||
+ }else if (!user.getAbilities().instabuild) { // Paper - moved down a couple of lines so an item gets removed only if the event wasn't cancelled!
|
||||
+ } else if (!user.getAbilities().instabuild) { // Paper - moved down a couple of lines so an item gets removed only if the event wasn't cancelled!
|
||||
+ itemStack.shrink(1);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
Loading…
Reference in New Issue
Block a user