mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-15 23:25:37 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11102)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3a3bea52 SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention 5cd1c8cb SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT a8e278f0 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals 53729d12 Remove spurious ApiStatus.Internal annotation b9f57486 SPIGOT-7799, PR-1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent 7983b966 PR-1029: Trial changing a small number of inner enums to classes/interfaces to better support custom values CraftBukkit Changes: 403accd56 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT 812761660 Increase outdated build delay bed1e3ff6 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals 2444c8b23 SPIGOT-7823: Suspicious sand and gravel material are not marked as having gravity correctly aceddcd0b SPIGOT-7820: Enum changes - duplicate method name a0d2d6a84 SPIGOT-7813: Material#isInteractable() always returns false 8fd64b091 SPIGOT-7806: Handle both loot and inventory item drop behaviour in PlayerDeathEvent a4ee40b74 SPIGOT-7799, PR-1436: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent 082aa51c5 PR-1424: Trial changing a small number of inner enums to classes/interfaces to better support custom values 66e78a96b SPIGOT-7815: Consider EntityDamageEvent status for Wolf armor damage Spigot Changes: 5bbef5ad SPIGOT-7834: Modify max value for generic.max_absorption
This commit is contained in:
parent
44c3dd0d4c
commit
dd11ef8441
@ -4880,10 +4880,10 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822
|
||||
+ // Paper end - adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f100ea9467e 100644
|
||||
index 8250821fe7be7987c92edbc36911f88875c470fc..2aadb995ab512086ac41b48df4c724722697e166 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -13,7 +13,7 @@ public final class MapCursor {
|
||||
@@ -17,7 +17,7 @@ public final class MapCursor {
|
||||
private byte x, y;
|
||||
private byte direction;
|
||||
private boolean visible;
|
||||
@ -4892,7 +4892,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
private Type type;
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ public final class MapCursor {
|
||||
@@ -32,7 +32,7 @@ public final class MapCursor {
|
||||
*/
|
||||
@Deprecated
|
||||
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) {
|
||||
@ -4901,7 +4901,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ public final class MapCursor {
|
||||
@@ -45,7 +45,7 @@ public final class MapCursor {
|
||||
* @param visible Whether the cursor is visible by default.
|
||||
*/
|
||||
public MapCursor(byte x, byte y, byte direction, @NotNull Type type, boolean visible) {
|
||||
@ -4910,7 +4910,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ public final class MapCursor {
|
||||
@@ -57,7 +57,7 @@ public final class MapCursor {
|
||||
* @param type The type (color/style) of the map cursor.
|
||||
* @param visible Whether the cursor is visible by default.
|
||||
* @param caption cursor caption
|
||||
@ -4919,7 +4919,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
*/
|
||||
@Deprecated
|
||||
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) {
|
||||
@@ -62,8 +62,42 @@ public final class MapCursor {
|
||||
@@ -66,8 +66,42 @@ public final class MapCursor {
|
||||
setDirection(direction);
|
||||
setRawType(type);
|
||||
this.visible = visible;
|
||||
@ -4963,7 +4963,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
|
||||
/**
|
||||
* Initialize the map cursor.
|
||||
@@ -81,7 +115,7 @@ public final class MapCursor {
|
||||
@@ -85,7 +119,7 @@ public final class MapCursor {
|
||||
setDirection(direction);
|
||||
this.type = type;
|
||||
this.visible = visible;
|
||||
@ -4972,7 +4972,7 @@ index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f10
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,23 +234,45 @@ public final class MapCursor {
|
||||
@@ -204,23 +238,45 @@ public final class MapCursor {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
|
@ -607,18 +607,18 @@ index af5110b4160979c39cc1e5de6fa3bd7957b21403..15a0a733b0e5804655b5957cbf208312
|
||||
* @param location the location to remove
|
||||
* @see #getExploredLocations()
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 6bf3af3ed81b66f61e53105d3591165ea74dba0e..a91400cd8bb4c72d1f3200a17f6de025540fe09d 100644
|
||||
index 45dd54afa6d6f3d9895ef52f13076d3351036e4b..cfa0d4809f9bb4ac150251efa85ba4d1808ab1b2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -202,7 +202,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -228,7 +228,7 @@ public interface Villager extends AbstractVillager {
|
||||
*/
|
||||
NITWIT,
|
||||
Profession NITWIT = getProfession("nitwit");
|
||||
/**
|
||||
- * Sheperd profession. Wears a brown robe. Shepherds primarily trade for
|
||||
+ * Shepherd profession. Wears a brown robe. Shepherds primarily trade for
|
||||
* wool items, and shears.
|
||||
*/
|
||||
SHEPHERD,
|
||||
Profession SHEPHERD = getProfession("shepherd");
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java b/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java
|
||||
index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab7695b24f 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java
|
||||
@ -647,10 +647,10 @@ index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab
|
||||
* The Block is already broken as this event is called, so #getBlock() will be
|
||||
* AIR in most cases. Use #getBlockState() for more Information about the broken
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
index e534954457a9961a26dbec7ac035bec07e1d6694..a7c297364805c58ae16895055d8eae0484384b7d 100644
|
||||
index 1df172c0bb48de3b143179a3f0c63d6ecc30649e..254d549f956053af4264ca3a52d34a97ede4273d 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
@@ -13,6 +13,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -14,6 +14,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Note that due to the nature of explosions, {@link #getBlock()} will always be
|
||||
* an air block. {@link #getExplodedBlockState()} should be used to get
|
||||
* information about the block state that exploded.
|
||||
@ -660,14 +660,6 @@ index e534954457a9961a26dbec7ac035bec07e1d6694..a7c297364805c58ae16895055d8eae04
|
||||
*/
|
||||
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -29,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
+ @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) {
|
||||
this(what, what.getState(), blocks, yield);
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java b/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java
|
||||
index 340fa397e68c024df380a28db21545a0c83d9fa6..79ac8a5db689cf9f8e2ff4cb7c06df6989128d10 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java
|
||||
@ -721,7 +713,7 @@ index a37febd0d4dd5b733e9ee72628fdf9395fec4367..9cee218b9ee14688356f16b1f5851218
|
||||
*/
|
||||
public class AreaEffectCloudApplyEvent extends EntityEvent implements Cancellable {
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
index 90b287cd2cc6f05bb0c588d8be397cf52a7822de..15cb5ea4b68eca070f73d2b899543274415ad240 100644
|
||||
index d3f93163fb3108f42e542c22e437c9cb8289f0e8..1e2bb345d19ebe03589d85bdab13021b6fa2ed98 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
@@ -158,11 +158,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
@ -765,10 +757,10 @@ index 573165ddf3368a96e1ffc6476eb27c9e29a6f86e..148c4aad384ae8e3b8b22d264a84bddf
|
||||
* @return the block state
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
index 10d0e18dfd423b108fe381e8142867eb10399359..099efafa14c10910e4ed04abb1823f0c1a96b6a6 100644
|
||||
index fc2158793aec67310bc8d06ac1f0bac39d2a5c3d..50161d313cfcc9e61441589685c3d0e1f057dd86 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
@@ -9,7 +9,9 @@ import org.bukkit.event.HandlerList;
|
||||
@@ -10,7 +10,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ index 99e1f17fddf9cebe7057998d1635804c55f18312..c3387a88a16cfd9157ade5d8a06eae25
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
index 15cb5ea4b68eca070f73d2b899543274415ad240..2de81ee445824562aec7b52b7369b75280aab959 100644
|
||||
index 1e2bb345d19ebe03589d85bdab13021b6fa2ed98..6ff1988092de06f9d751cd40da521c2ed6e2e4bd 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
@@ -206,6 +206,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
@ -44,5 +44,5 @@ index 15cb5ea4b68eca070f73d2b899543274415ad240..2de81ee445824562aec7b52b7369b752
|
||||
+ OMINOUS_ITEM_SPAWNER,
|
||||
+ // Paper end - Fixes and additions to the SpawnReason API
|
||||
/**
|
||||
* When a creature is spawned by plugins
|
||||
*/
|
||||
* When a creature is spawned by a potion effect, for example:
|
||||
* {@link org.bukkit.potion.PotionType#OOZING}, {@link org.bukkit.potion.PotionType#INFESTED}
|
||||
|
@ -453,7 +453,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index f1a7f3b3e20963fa9d97bcc0686a35863de2b60f..3effaea369d9c7a6a22979fbfc270f55f9f25cf2 100644
|
||||
index 3bd96bbd35b657a6030d744e86622e616c2c3b08..5529e227781cd2411de9c6581a1cb1255ce9bb20 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@ -471,7 +471,7 @@ index f1a7f3b3e20963fa9d97bcc0686a35863de2b60f..3effaea369d9c7a6a22979fbfc270f55
|
||||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Damage types.
|
||||
@@ -336,8 +334,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -335,8 +333,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
@ -1823,10 +1823,10 @@ index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711cc4d8e550 100644
|
||||
index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0eed73307 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -159,9 +159,9 @@ public final class MapCursor {
|
||||
@@ -163,9 +163,9 @@ public final class MapCursor {
|
||||
* Get the type of this cursor.
|
||||
*
|
||||
* @return The type (color/style) of the map cursor.
|
||||
@ -1836,9 +1836,9 @@ index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711c
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getRawType() {
|
||||
return type.value;
|
||||
return type.getValue();
|
||||
}
|
||||
@@ -216,9 +216,9 @@ public final class MapCursor {
|
||||
@@ -220,9 +220,9 @@ public final class MapCursor {
|
||||
* Set the type of this cursor.
|
||||
*
|
||||
* @param type The type (color/style) of the map cursor.
|
||||
@ -1850,7 +1850,7 @@ index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711c
|
||||
public void setRawType(byte type) {
|
||||
Type enumType = Type.byValue(type);
|
||||
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
|
||||
@@ -337,9 +337,9 @@ public final class MapCursor {
|
||||
@@ -336,9 +336,9 @@ public final class MapCursor {
|
||||
* Gets the internal value of the cursor.
|
||||
*
|
||||
* @return the value
|
||||
@ -1859,10 +1859,10 @@ index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711c
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getValue() {
|
||||
return value;
|
||||
}
|
||||
@@ -349,9 +349,9 @@ public final class MapCursor {
|
||||
byte getValue();
|
||||
|
||||
/**
|
||||
@@ -346,9 +346,9 @@ public final class MapCursor {
|
||||
*
|
||||
* @param value the value
|
||||
* @return the matching type
|
||||
@ -1872,7 +1872,7 @@ index 940066ec529acc4cb9c8136f15345f100ea9467e..82993302cb3cf62ad4a94a0ebaa7711c
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Type byValue(byte value) {
|
||||
static Type byValue(byte value) {
|
||||
for (Type t : values()) {
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index 3a9aaca2e76411a9c27f9f5e0f22d060d5a66d06..c80faa079eca1564847070f0338fc98024639829 100644
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Villager Restocks API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index a91400cd8bb4c72d1f3200a17f6de025540fe09d..4128b848ec739308694d54d9e859c28185f42a63 100644
|
||||
index cfa0d4809f9bb4ac150251efa85ba4d1808ab1b2..ecb0f32a4449f8000248c4bebf89a56df186899f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -78,6 +78,20 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -82,6 +82,20 @@ public interface Villager extends AbstractVillager {
|
||||
*/
|
||||
public void setVillagerExperience(int experience);
|
||||
|
||||
|
@ -110,20 +110,20 @@ index 0000000000000000000000000000000000000000..5600fcdc9795a9f49091db48d73bbd49
|
||||
+ TRADING,
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 4128b848ec739308694d54d9e859c28185f42a63..49db82ceff5e2c5f6414045648d68bd384c857c8 100644
|
||||
index ecb0f32a4449f8000248c4bebf89a56df186899f..d839630d7b2e51629e52edf24e7c6dd86b5f58f6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.bukkit.entity;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.Locale;
|
||||
+import java.util.Map; // Paper
|
||||
+import java.util.UUID; // Paper
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@@ -242,4 +244,50 @@ public interface Villager extends AbstractVillager {
|
||||
return key;
|
||||
@@ -289,4 +291,50 @@ public interface Villager extends AbstractVillager {
|
||||
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
@ -420,27 +420,27 @@ index d248069adfc67eb840951f7ab4a1fa5d30214dec..976f701ed9b9873945a5628173c580e2
|
||||
* Gets if this EntityType is enabled by feature in a world.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 49db82ceff5e2c5f6414045648d68bd384c857c8..b3957b3ff64f35fdeb2daa2ed1fb34fd65e24693 100644
|
||||
index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b5ed9f4b5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -160,7 +160,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -185,7 +185,7 @@ public interface Villager extends AbstractVillager {
|
||||
* Represents the various different Villager professions there may be.
|
||||
* Villagers have different trading options depending on their profession,
|
||||
*/
|
||||
- public enum Profession implements Keyed {
|
||||
+ public enum Profession implements Keyed, net.kyori.adventure.translation.Translatable { // Paper
|
||||
NONE,
|
||||
- interface Profession extends OldEnum<Profession>, Keyed {
|
||||
+ interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable {
|
||||
|
||||
Profession NONE = getProfession("none");
|
||||
/**
|
||||
* Armorer profession. Wears a black apron. Armorers primarily trade for
|
||||
@@ -243,6 +243,13 @@ public interface Villager extends AbstractVillager {
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
@@ -290,6 +290,13 @@ public interface Villager extends AbstractVillager {
|
||||
static Profession[] values() {
|
||||
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public @NotNull String translationKey() {
|
||||
+ return "entity.minecraft.villager." + this.key.getKey();
|
||||
+ default @NotNull String translationKey() {
|
||||
+ return "entity.minecraft.villager." + this.getKey().getKey();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
|
||||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd678feef26a 100644
|
||||
index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c17bf68ec7 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@ -218,7 +218,13 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
|
||||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -139,8 +139,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -134,13 +134,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Cat.Type
|
||||
*/
|
||||
- Registry<Cat.Type> CAT_VARIANT = Objects.requireNonNull(Bukkit.getRegistry(Cat.Type.class), "No registry present for Cat Type. This is a bug.");
|
||||
+ Registry<Cat.Type> CAT_VARIANT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.CAT_VARIANT); // Paper
|
||||
/**
|
||||
* Server enchantments.
|
||||
*
|
||||
* @see Enchantment
|
||||
@ -276,7 +282,7 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
|
||||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -219,28 +223,35 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -219,40 +223,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
@ -317,7 +323,27 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
|
||||
/**
|
||||
* Villager profession.
|
||||
*
|
||||
@@ -294,8 +305,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see Villager.Profession
|
||||
*/
|
||||
- Registry<Villager.Profession> VILLAGER_PROFESSION = Objects.requireNonNull(Bukkit.getRegistry(Villager.Profession.class), "No registry present for Villager Profession. This is a bug.");
|
||||
+ Registry<Villager.Profession> VILLAGER_PROFESSION = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.VILLAGER_PROFESSION); // Paper
|
||||
/**
|
||||
* Villager type.
|
||||
*
|
||||
* @see Villager.Type
|
||||
*/
|
||||
- Registry<Villager.Type> VILLAGER_TYPE = Objects.requireNonNull(Bukkit.getRegistry(Villager.Type.class), "No registry present for Villager Type. This is a bug.");
|
||||
+ Registry<Villager.Type> VILLAGER_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.VILLAGER_TYPE); // Paper
|
||||
/**
|
||||
* Memory Keys.
|
||||
*
|
||||
@@ -289,25 +300,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Frog.Variant
|
||||
*/
|
||||
- Registry<Frog.Variant> FROG_VARIANT = Objects.requireNonNull(Bukkit.getRegistry(Frog.Variant.class), "No registry present for Frog Variant. This is a bug.");
|
||||
+ Registry<Frog.Variant> FROG_VARIANT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.FROG_VARIANT); // Paper
|
||||
/**
|
||||
* Wolf variants.
|
||||
*
|
||||
* @see Wolf.Variant
|
||||
@ -329,7 +355,12 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..93e898c14728491a59bb2d08aff0dd67
|
||||
/**
|
||||
* Map cursor types.
|
||||
*
|
||||
@@ -308,7 +321,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see MapCursor.Type
|
||||
*/
|
||||
- Registry<MapCursor.Type> MAP_DECORATION_TYPE = Objects.requireNonNull(Bukkit.getRegistry(MapCursor.Type.class), "No registry present for MapCursor Type. This is a bug.");
|
||||
+ Registry<MapCursor.Type> MAP_DECORATION_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.MAP_DECORATION_TYPE); // Paper
|
||||
/**
|
||||
* Game events.
|
||||
*
|
||||
* @see GameEvent
|
||||
*/
|
||||
|
@ -258,11 +258,11 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index d1327761a4b95eba97877f1991fc19b298b48eaf..0534fbc228f64cf3b361ab097d9b88212bdb0f36 100644
|
||||
index 117e3e8c63e56247213b2a9cf9908915d4c65665..70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -68,4 +68,36 @@ public interface Cat extends Tameable, Sittable {
|
||||
return key;
|
||||
@@ -94,4 +94,36 @@ public interface Cat extends Tameable, Sittable {
|
||||
return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 93e898c14728491a59bb2d08aff0dd678feef26a..17714f04fdd87ed4332ea62bcfab7063560bf1be 100644
|
||||
index a583d26883c8b7012203e128cd64113df94307c1..4d3e0b90579b33ff93fc565e8ee99a01b690c62b 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -322,6 +322,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -321,6 +321,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
|
@ -123,10 +123,10 @@ index 0000000000000000000000000000000000000000..c43a3ad32902dbb13287e80137521374
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index 0534fbc228f64cf3b361ab097d9b88212bdb0f36..d03adfaa4176617ef2ace2754fe02b63860e3aee 100644
|
||||
index 70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868..60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Meow.
|
||||
*/
|
||||
@ -135,7 +135,7 @@ index 0534fbc228f64cf3b361ab097d9b88212bdb0f36..d03adfaa4176617ef2ace2754fe02b63
|
||||
|
||||
/**
|
||||
* Gets the current type of this cat.
|
||||
@@ -31,6 +31,7 @@ public interface Cat extends Tameable, Sittable {
|
||||
@@ -36,6 +36,7 @@ public interface Cat extends Tameable, Sittable {
|
||||
* @return the color of the collar
|
||||
*/
|
||||
@NotNull
|
||||
@ -143,7 +143,7 @@ index 0534fbc228f64cf3b361ab097d9b88212bdb0f36..d03adfaa4176617ef2ace2754fe02b63
|
||||
public DyeColor getCollarColor();
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,7 @@ public interface Cat extends Tameable, Sittable {
|
||||
@@ -43,6 +44,7 @@ public interface Cat extends Tameable, Sittable {
|
||||
*
|
||||
* @param color the color to apply
|
||||
*/
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index b3957b3ff64f35fdeb2daa2ed1fb34fd65e24693..48c8af31b2bdc849b5269784ff3829ba31fb3f47 100644
|
||||
index 0759f66986cec2c7e3f765aaa5b1654b5ed9f4b5..444744ea6f5921b0ae229995f8b15ea9d980c402 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -60,8 +60,11 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -64,8 +64,11 @@ public interface Villager extends AbstractVillager {
|
||||
* A villager with a level of 1 and no experience is liable to lose its
|
||||
* profession.
|
||||
*
|
||||
@ -20,7 +20,7 @@ index b3957b3ff64f35fdeb2daa2ed1fb34fd65e24693..48c8af31b2bdc849b5269784ff3829ba
|
||||
*/
|
||||
public void setVillagerLevel(int level);
|
||||
|
||||
@@ -81,6 +84,34 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -85,6 +88,34 @@ public interface Villager extends AbstractVillager {
|
||||
public void setVillagerExperience(int experience);
|
||||
|
||||
// Paper start
|
||||
|
@ -84,13 +84,21 @@ index 6818e9f0ba32ca1a1e612703f7526b29f5a6438f..d3724db0a5a67cde15b05fecd32b2ca3
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPortalEvent.java b/src/main/java/org/bukkit/event/entity/EntityPortalEvent.java
|
||||
index 67fb9d93e808e907fa980f3004d415ae5d0a53fc..97e36c7f6e09276fbae20eaeee0965566332ca46 100644
|
||||
index d70400236b08217ba675e560877f951ea4f143ca..4544e7e155619a6ae31cbb2999ae3dedfd3b5f4b 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPortalEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPortalEvent.java
|
||||
@@ -15,15 +15,58 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class EntityPortalEvent extends EntityTeleportEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.event.entity;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -17,23 +18,68 @@ public class EntityPortalEvent extends EntityTeleportEvent {
|
||||
private int searchRadius = 128;
|
||||
private boolean canCreatePortal = true;
|
||||
private int creationRadius = 16;
|
||||
+ private final org.bukkit.PortalType type; // Paper
|
||||
|
||||
public EntityPortalEvent(@NotNull final Entity entity, @NotNull final Location from, @Nullable final Location to) {
|
||||
@ -102,15 +110,24 @@ index 67fb9d93e808e907fa980f3004d415ae5d0a53fc..97e36c7f6e09276fbae20eaeee096556
|
||||
super(entity, from, to);
|
||||
this.searchRadius = searchRadius;
|
||||
+ this.type = org.bukkit.PortalType.CUSTOM; // Paper
|
||||
}
|
||||
|
||||
public EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius) {
|
||||
+ // Paper start
|
||||
+ this(entity, from, to, searchRadius, canCreatePortal, creationRadius, org.bukkit.PortalType.CUSTOM);
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ public EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, final @NotNull org.bukkit.PortalType portalType) {
|
||||
+ super(entity, from, to);
|
||||
+ this.searchRadius = searchRadius;
|
||||
+ @ApiStatus.Internal
|
||||
+ public EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius, final @NotNull org.bukkit.PortalType portalType) {
|
||||
super(entity, from, to);
|
||||
+ this.type = portalType;
|
||||
+ }
|
||||
+
|
||||
+ // Paper end
|
||||
this.searchRadius = searchRadius;
|
||||
this.canCreatePortal = canCreatePortal;
|
||||
this.creationRadius = creationRadius;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Get the portal type relating to this event.
|
||||
+ *
|
||||
@ -142,11 +159,12 @@ index 67fb9d93e808e907fa980f3004d415ae5d0a53fc..97e36c7f6e09276fbae20eaeee096556
|
||||
+ @Override
|
||||
+ public void setTo(@Nullable final Location to) {
|
||||
+ super.setTo(to);
|
||||
}
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
+
|
||||
/**
|
||||
* Set the Block radius to search in for available portals.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java b/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java
|
||||
index 57eeeafae84f83a939925820e827769749ff27ec..929a997671de8202efb9da97fbf9b4a0bf7c37e8 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java
|
||||
|
@ -196,33 +196,33 @@ index e404cd1e2ba44e4c2d09524bc7cf730d8ffbdabd..cea0ebf50876dd32ab7fba6025b30f29
|
||||
public interface BundleMeta extends ItemMeta {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 82993302cb3cf62ad4a94a0ebaa7711cc4d8e550..bd37310d27e73bfe65d680594f3a9be8577a72a0 100644
|
||||
index 4d96cf385fa5c6d80097bdf6282be5f0eed73307..fb6b1491202bbc1ea0d5475c9c6574b0c16943b4 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -309,12 +309,26 @@ public final class MapCursor {
|
||||
BANNER_RED(24, "banner_red"),
|
||||
BANNER_BLACK(25, "banner_black"),
|
||||
RED_X(26, "red_x"),
|
||||
@@ -314,12 +314,26 @@ public final class MapCursor {
|
||||
Type BANNER_RED = getType("banner_red");
|
||||
Type BANNER_BLACK = getType("banner_black");
|
||||
Type RED_X = getType("red_x");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
VILLAGE_DESERT(27, "village_desert"),
|
||||
Type VILLAGE_DESERT = getType("village_desert");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
VILLAGE_PLAINS(28, "village_plains"),
|
||||
Type VILLAGE_PLAINS = getType("village_plains");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
VILLAGE_SAVANNA(29, "village_savanna"),
|
||||
Type VILLAGE_SAVANNA = getType("village_savanna");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
VILLAGE_SNOWY(30, "village_snowy"),
|
||||
Type VILLAGE_SNOWY = getType("village_snowy");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
VILLAGE_TAIGA(31, "village_taiga"),
|
||||
Type VILLAGE_TAIGA = getType("village_taiga");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
JUNGLE_TEMPLE(32, "jungle_temple"),
|
||||
Type JUNGLE_TEMPLE = getType("jungle_temple");
|
||||
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.TRADE_REBALANCE) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
SWAMP_HUT(33, "swamp_hut"),
|
||||
TRIAL_CHAMBERS(34, "trial_chambers")
|
||||
;
|
||||
Type SWAMP_HUT = getType("swamp_hut");
|
||||
Type TRIAL_CHAMBERS = getType("trial_chambers");
|
||||
|
||||
|
@ -31,10 +31,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 17714f04fdd87ed4332ea62bcfab7063560bf1be..27b987db385a594fede4e884b6437dc363f6e817 100644
|
||||
index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89f02611a0 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -358,6 +358,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -357,6 +357,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
||||
@ -114,7 +114,7 @@ index 17714f04fdd87ed4332ea62bcfab7063560bf1be..27b987db385a594fede4e884b6437dc3
|
||||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
*
|
||||
@@ -432,5 +505,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -431,5 +504,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
public Class<T> getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ index 1a9575ad4c81aefa5ef0b927f6ac8f7064b55c49..24e1a49e48dd8f9eb2515b2ffe472a0c
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
index 099efafa14c10910e4ed04abb1823f0c1a96b6a6..8506fa03293c575c35b55b052224807470fdbd98 100644
|
||||
index 50161d313cfcc9e61441589685c3d0e1f057dd86..e468e55d426b8f81f87c0a08451d02b3866c226f 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
@@ -59,7 +59,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
@@ -72,7 +72,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
*/
|
||||
@NotNull
|
||||
public Location getLocation() {
|
||||
|
@ -790,10 +790,10 @@ index 0000000000000000000000000000000000000000..11d19e339c7c62f2eb4467277552c27e
|
||||
+record TagKeyImpl<T>(RegistryKey<T> registryKey, Key key) implements TagKey<T> {
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 27b987db385a594fede4e884b6437dc363f6e817..9725580b6458e5d37fbc6059869604f9883bd6d1 100644
|
||||
index 36a8f6082f111a1cbb25e0ff3c968a89f02611a0..ff4997c6c5cecf7caf957e1aedaafb22df647e7d 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -357,6 +357,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -356,6 +356,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
@ -821,7 +821,7 @@ index 27b987db385a594fede4e884b6437dc363f6e817..9725580b6458e5d37fbc6059869604f9
|
||||
|
||||
// Paper start - improve Registry
|
||||
/**
|
||||
@@ -431,6 +452,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -430,6 +451,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
||||
@ -856,7 +856,7 @@ index 27b987db385a594fede4e884b6437dc363f6e817..9725580b6458e5d37fbc6059869604f9
|
||||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
*
|
||||
@@ -512,5 +561,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -511,5 +560,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
return value.getKey();
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
@ -131,7 +131,7 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4
|
||||
|
||||
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 9c232b6eb11d87420fb24a668a2043581cca3bd2..5f73afa688fd1c83af17e6f566862cd5e2603ff3 100644
|
||||
index 82b8485a4781105bce874485119110576d1e2d63..a07e26caf48acf9ef193a74497a201166bfbe098 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -210,7 +210,7 @@ public class Main {
|
||||
@ -142,7 +142,7 @@ index 9c232b6eb11d87420fb24a668a2043581cca3bd2..5f73afa688fd1c83af17e6f566862cd5
|
||||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
@ -5042,10 +5042,10 @@ index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4
|
||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6d1d3f9cf7451494af7c57d8bb1cd0ed25ea63e2..f1302dfb68bf8e4e1f4d8b084ad81422f65eecc4 100644
|
||||
index e8fac2863c5feb875cf0c78f062b4b87acbcb49b..751900e0c2a946ba4291174c81b2bdbdbe994e94 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -954,6 +954,7 @@ public final class CraftServer implements Server {
|
||||
@@ -962,6 +962,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -5054,7 +5054,7 @@ index 6d1d3f9cf7451494af7c57d8bb1cd0ed25ea63e2..f1302dfb68bf8e4e1f4d8b084ad81422
|
||||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 5f73afa688fd1c83af17e6f566862cd5e2603ff3..e2bfbedce18c4ecb01ffcc44d495e72b76806a92 100644
|
||||
index a07e26caf48acf9ef193a74497a201166bfbe098..dbcde37cfdeb6141c3f5c4f8b95d60fca91c7977 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -142,6 +142,19 @@ public class Main {
|
||||
@ -5078,7 +5078,7 @@ index 5f73afa688fd1c83af17e6f566862cd5e2603ff3..e2bfbedce18c4ecb01ffcc44d495e72b
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 192b6fbd34b9b90112f869ae6e367ab9ba5a5906..08b0ca7b68bf238366f4d6904478852ecbe9394a 100644
|
||||
index 038fd72710b3084c17d52d4cce087a5bd0aa3a01..e42677a14ec8e1a42747603fb4112822e326fb70 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -96,7 +96,7 @@ public class SpigotConfig
|
||||
|
@ -83,10 +83,10 @@ index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16d
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f1302dfb68bf8e4e1f4d8b084ad81422f65eecc4..fe0f57dbeecc4b5a0c81863f33e41d11eb60943a 100644
|
||||
index 751900e0c2a946ba4291174c81b2bdbdbe994e94..f04c0f8b3905b488aac221fedde335a54ad1ff58 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2514,7 +2514,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2522,7 +2522,13 @@ public final class CraftServer implements Server {
|
||||
Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
|
||||
|
||||
ReloadableServerRegistries.Holder registry = this.getServer().reloadableRegistries();
|
||||
@ -102,7 +102,7 @@ index f1302dfb68bf8e4e1f4d8b084ad81422f65eecc4..fe0f57dbeecc4b5a0c81863f33e41d11
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index e2bfbedce18c4ecb01ffcc44d495e72b76806a92..7e3c4c8a4d87e0c616a9fb98f09d89c93597bb23 100644
|
||||
index dbcde37cfdeb6141c3f5c4f8b95d60fca91c7977..2122d7316f55ab5bec7058fe1b8ee3ceb42deea7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -123,6 +123,7 @@ public class Main {
|
||||
|
@ -5376,10 +5376,10 @@ index 9d11fcb3df12182ae00ce73f7e30091fd199a341..4c39d9e0466240b5cd459ee649a22fe3
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index defe0b30964613cbae5195485aafff21d73ff18e..8d535d96252068fd2a1608600ce29d5d16690fec 100644
|
||||
index ff1a8e62d2bb3de62e0c27b2335cb512ea91dedd..cb136a30287a17947ed018cdc48e6f91ed904072 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -280,6 +280,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -281,6 +281,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public boolean sentListPacket = false;
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
@ -5461,7 +5461,7 @@ index aede9b65e799a1f123f71f9390fb05acddda676b..2510589400b3012b827efcab477c6483
|
||||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 586acbb52b0fcb09cda195b49b6c737a29a4e35e..b0843917caedc32f800c50cc54706ace9523f64f 100644
|
||||
index 05a4056b242159b1c85aa6ebf43b69cf85c00021..06cbe7a7ea131a8bead857cbfbd27810a9093320 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -339,6 +339,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@ -6032,10 +6032,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fe0f57dbeecc4b5a0c81863f33e41d11eb60943a..9babfd8e6c847ea26863be6243f17fc252dc9e1d 100644
|
||||
index f04c0f8b3905b488aac221fedde335a54ad1ff58..7f8864da8a6f9c2410191851add1ba566b8c171c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2593,4 +2593,9 @@ public final class CraftServer implements Server {
|
||||
@@ -2601,4 +2601,9 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -6165,10 +6165,10 @@ index e130d0aa64d0caaa7760d8de4b1f989523f9de20..9ca244b69995552df63fb5d4e3d6961b
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 48e3923347341f1bb2027cf48b0dea9d0dcd20cf..21ed720118073b14bc8b5d1d665b0e17a8bbc1d2 100644
|
||||
index 952c6ebde7031dc060efe98992f82c02bf3534ea..17fa2d3db112762bcb8b941b69b8ddcc53f47224 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -22,6 +22,20 @@ import org.bukkit.material.MaterialData;
|
||||
@@ -23,6 +23,20 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
@DelegateDeserialization(ItemStack.class)
|
||||
public final class CraftItemStack extends ItemStack {
|
||||
|
||||
@ -6565,7 +6565,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..ff422d4d4f2b764370f0ee2af1303485
|
||||
ANIMAL,
|
||||
RAIDER,
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 08b0ca7b68bf238366f4d6904478852ecbe9394a..fbbc08c5a189b99f8047e0f0f5cd31101149dbec 100644
|
||||
index e42677a14ec8e1a42747603fb4112822e326fb70..518ff88b32d1b5653a617ec2eaa23813c53b6acc 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -118,7 +118,11 @@ public class SpigotConfig
|
||||
|
@ -2699,10 +2699,10 @@ index cef1761cdaf3e456695f2de61f4295fb99361914..e0b2d474e8d6f2d573d2c1f63e68ba93
|
||||
|
||||
public boolean logIPs() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1ceae760f3b3 100644
|
||||
index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf919c8601b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -171,6 +171,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
||||
@@ -172,6 +172,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
import net.minecraft.world.scores.Team;
|
||||
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
||||
@ -2710,7 +2710,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.WeatherType;
|
||||
@@ -236,6 +237,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -237,6 +238,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
private boolean disconnected;
|
||||
private int requestedViewDistance;
|
||||
public String language = "en_us"; // CraftBukkit - default
|
||||
@ -2718,7 +2718,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
@Nullable
|
||||
private Vec3 startingToFallPosition;
|
||||
@Nullable
|
||||
@@ -269,6 +271,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -270,6 +272,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
// CraftBukkit start
|
||||
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
||||
public String displayName;
|
||||
@ -2726,7 +2726,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
public Component listName;
|
||||
public org.bukkit.Location compassTarget;
|
||||
public int newExp = 0;
|
||||
@@ -352,6 +355,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -353,6 +356,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
// CraftBukkit start
|
||||
this.displayName = this.getScoreboardName();
|
||||
@ -2734,7 +2734,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
this.bukkitPickUpLoot = true;
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
}
|
||||
@@ -909,22 +913,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -910,22 +914,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
String deathmessage = defaultMessage.getString();
|
||||
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
||||
@ -2761,7 +2761,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
|
||||
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
|
||||
boolean flag1 = true;
|
||||
@@ -2024,8 +2023,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2025,8 +2024,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
|
||||
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
|
||||
@ -2776,7 +2776,7 @@ index 8d535d96252068fd2a1608600ce29d5d16690fec..a2833b879b7613856706223f6b6e1cea
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2052,6 +2056,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2053,6 +2057,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.language = clientOptions.language();
|
||||
@ -3326,10 +3326,10 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62eecbdfd946 100644
|
||||
index 7f8864da8a6f9c2410191851add1ba566b8c171c..bec1fdabbc3727c1f7297b2d23914a5179f4adcb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -636,8 +636,10 @@ public final class CraftServer implements Server {
|
||||
@@ -644,8 +644,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3340,7 +3340,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1613,7 +1615,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1621,7 +1623,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -3356,7 +3356,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1787,7 +1797,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1795,7 +1805,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3377,7 +3377,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1795,14 +1818,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1803,14 +1826,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3394,7 +3394,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -2064,6 +2087,14 @@ public final class CraftServer implements Server {
|
||||
@@ -2072,6 +2095,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -3409,7 +3409,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
||||
@@ -2078,13 +2109,28 @@ public final class CraftServer implements Server {
|
||||
@@ -2086,13 +2117,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -3438,7 +3438,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -2149,6 +2195,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2157,6 +2203,17 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -3456,7 +3456,7 @@ index 9babfd8e6c847ea26863be6243f17fc252dc9e1d..0e3ff653211b0210f8679b475d5f62ee
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2598,4 +2655,57 @@ public final class CraftServer implements Server {
|
||||
@@ -2606,4 +2663,57 @@ public final class CraftServer implements Server {
|
||||
public double[] getTPS() {
|
||||
return new double[]{0, 0, 0}; // TODO
|
||||
}
|
||||
@ -3627,7 +3627,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 7e3c4c8a4d87e0c616a9fb98f09d89c93597bb23..0736cf0b5ea327e73a457b55c9c0c4bb82d4c6e9 100644
|
||||
index 2122d7316f55ab5bec7058fe1b8ee3ceb42deea7..43790f555743e9945c1b82cf8f2f4719feedc165 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
@ -4147,7 +4147,7 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917
|
||||
public boolean isOp() {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 834b2a3ab2cccbd50686a1a0ca999685638b2a95..2b6912514ab39c26338c6ac580a8d1f33f3df61f 100644
|
||||
index 9ca244b69995552df63fb5d4e3d6961b585bcc47..807184636a99c17fe6ed8dd1cd07e1872d613657 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -388,14 +388,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -4676,10 +4676,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
|
||||
@Override
|
||||
public int getLineWidth() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ae357fc3cabd9235488665ef74a3f7c703d64980..3595ff3db5eb0b1da100692702e514cb870220ee 100644
|
||||
index 39aad2d00227d94aa1d24c27a10d916b7d64888d..63e20db8ad84b332a4962d5cea83f1064b7c1a3d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -908,7 +908,7 @@ public class CraftEventFactory {
|
||||
@@ -911,7 +911,7 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
@ -4688,7 +4688,7 @@ index ae357fc3cabd9235488665ef74a3f7c703d64980..3595ff3db5eb0b1da100692702e514cb
|
||||
CraftPlayer entity = victim.getBukkitEntity();
|
||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
||||
@@ -935,7 +935,7 @@ public class CraftEventFactory {
|
||||
@@ -944,7 +944,7 @@ public class CraftEventFactory {
|
||||
* Server methods
|
||||
*/
|
||||
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||
|
@ -396,7 +396,7 @@ index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445
|
||||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0e3ff653211b0210f8679b475d5f62eecbdfd946..7eb94216cc556ad4c6c76ffab0ca81861d2c1883 100644
|
||||
index bec1fdabbc3727c1f7297b2d23914a5179f4adcb..17df1085e29429b202a6f9003343b15b15e2f8f7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
||||
@ -408,7 +408,7 @@ index 0e3ff653211b0210f8679b475d5f62eecbdfd946..7eb94216cc556ad4c6c76ffab0ca8186
|
||||
import net.minecraft.advancements.AdvancementHolder;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1346,9 +1346,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1354,9 +1354,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ index 0e3ff653211b0210f8679b475d5f62eecbdfd946..7eb94216cc556ad4c6c76ffab0ca8186
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 0736cf0b5ea327e73a457b55c9c0c4bb82d4c6e9..3a198718cd4b0d87398f0a54275aad1f419be8b3 100644
|
||||
index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d55d9d032 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||
|
@ -617,10 +617,10 @@ index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7eb94216cc556ad4c6c76ffab0ca81861d2c1883..e7301f38be4fae26404fd8dd33798ef0764565ac 100644
|
||||
index 17df1085e29429b202a6f9003343b15b15e2f8f7..29f94e574e39714caec95af5c176c9dba481728e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -978,6 +978,7 @@ public final class CraftServer implements Server {
|
||||
@@ -986,6 +986,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.clearCommands();
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
@ -628,7 +628,7 @@ index 7eb94216cc556ad4c6c76ffab0ca81861d2c1883..e7301f38be4fae26404fd8dd33798ef0
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2703,6 +2704,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2711,6 +2712,34 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
|
@ -7257,7 +7257,7 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
|
||||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e7301f38be4fae26404fd8dd33798ef0764565ac..3f748a8f067d8ce8c39272cb3decaf4ec4879da5 100644
|
||||
index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9f9932416 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -277,7 +277,8 @@ public final class CraftServer implements Server {
|
||||
@ -7270,7 +7270,7 @@ index e7301f38be4fae26404fd8dd33798ef0764565ac..3f748a8f067d8ce8c39272cb3decaf4e
|
||||
private final StructureManager structureManager;
|
||||
protected final DedicatedServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
@@ -446,24 +447,7 @@ public final class CraftServer implements Server {
|
||||
@@ -454,24 +455,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
@ -7296,7 +7296,7 @@ index e7301f38be4fae26404fd8dd33798ef0764565ac..3f748a8f067d8ce8c39272cb3decaf4e
|
||||
}
|
||||
|
||||
public void enablePlugins(PluginLoadOrder type) {
|
||||
@@ -552,15 +536,17 @@ public final class CraftServer implements Server {
|
||||
@@ -560,15 +544,17 @@ public final class CraftServer implements Server {
|
||||
private void enablePlugin(Plugin plugin) {
|
||||
try {
|
||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||
@ -7320,7 +7320,7 @@ index e7301f38be4fae26404fd8dd33798ef0764565ac..3f748a8f067d8ce8c39272cb3decaf4e
|
||||
|
||||
this.pluginManager.enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -1002,6 +988,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1010,6 +996,7 @@ public final class CraftServer implements Server {
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
}
|
||||
|
@ -1553,7 +1553,7 @@ index 0000000000000000000000000000000000000000..badff5d6ae6dd8d209c82bc7e8afe370
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b67cb9b027c33494f0ed3c6c6ac354a5c79fbf47..cde2e181bf1aaf92f1e96b00e03b7b001a06e6b3 100644
|
||||
index 91800791427e9362baf68ca3cffda5bfa58de2b8..5a4cdbc4b92a48c614564e4e421f05a9eb5b072b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -643,6 +643,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3f748a8f067d8ce8c39272cb3decaf4ec4879da5..d1699fcca66bcfbbe8fcc426802cb766cf1e580b 100644
|
||||
index b532c72ec2c048554e496b4b63afa0e9f9932416..7839e34cbd42e1b77c533b0dede42e0a19daf2a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -992,6 +992,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1000,6 +1000,7 @@ public final class CraftServer implements Server {
|
||||
this.loadPlugins();
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
|
@ -8,18 +8,18 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
||||
debugging in an IDE pre-relocate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802aacae4588 100644
|
||||
index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb9d90aa92 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -8,6 +8,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -11,6 +11,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
+import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -17,6 +18,7 @@ import java.util.jar.JarEntry;
|
||||
@@ -20,6 +21,7 @@ import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
@ -27,9 +27,9 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
@@ -83,6 +85,40 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
|
||||
@@ -99,6 +101,40 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
|
||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||
|
||||
+ // Paper start - Plugin rewrites
|
||||
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -68,9 +68,9 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
public static void main(String[] args) {
|
||||
OptionParser parser = new OptionParser();
|
||||
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
||||
@@ -213,9 +249,49 @@ public class Commodore {
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
@@ -252,9 +288,49 @@ public class Commodore {
|
||||
}
|
||||
|
||||
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
||||
+ // Paper start - Plugin rewrites
|
||||
+ @Override
|
||||
@ -118,7 +118,7 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
name = FieldRename.rename(pluginVersion, owner, name);
|
||||
|
||||
if (modern) {
|
||||
@@ -331,6 +407,13 @@ public class Commodore {
|
||||
@@ -374,6 +450,13 @@ public class Commodore {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
if (modern) {
|
||||
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
||||
switch (name) {
|
||||
@@ -427,6 +510,13 @@ public class Commodore {
|
||||
@@ -470,6 +553,13 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitLdcInsn(Object value) {
|
||||
@ -146,7 +146,7 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
||||
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
||||
return;
|
||||
@@ -437,6 +527,14 @@ public class Commodore {
|
||||
@@ -480,6 +570,14 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
||||
@ -161,7 +161,7 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
||||
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
||||
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
||||
@@ -453,7 +551,7 @@ public class Commodore {
|
||||
@@ -496,7 +594,7 @@ public class Commodore {
|
||||
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
||||
methodArgs.add(newInstantiated);
|
||||
|
||||
@ -170,7 +170,7 @@ index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802a
|
||||
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
||||
return;
|
||||
}
|
||||
@@ -504,6 +602,12 @@ public class Commodore {
|
||||
@@ -547,6 +645,12 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
||||
|
@ -649,11 +649,11 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
|
||||
return traceElements;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 8e29fae1be2b4d0b04e7788de7a3802aacae4588..0bde8fc63d892cb615638769ca84beba9da80ff2 100644
|
||||
index 421ddf6ca955215dff77655a7eda62eb9d90aa92..1cef3614e81e751c98b504c26da4718dc88746df 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -86,36 +86,26 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
|
||||
@@ -102,36 +102,26 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||
|
||||
// Paper start - Plugin rewrites
|
||||
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -700,12 +700,12 @@ index 8e29fae1be2b4d0b04e7788de7a3802aacae4588..0bde8fc63d892cb615638769ca84beba
|
||||
}
|
||||
// Paper end - Plugin rewrites
|
||||
|
||||
@@ -186,7 +176,7 @@ public class Commodore {
|
||||
ClassReader cr = new ClassReader(b);
|
||||
ClassWriter cw = new ClassWriter(cr, 0);
|
||||
@@ -214,7 +204,7 @@ public class Commodore {
|
||||
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
|
||||
}
|
||||
|
||||
- cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, cw) {
|
||||
+ cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(cw)) { // Paper
|
||||
- cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
|
||||
+ cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor)) { // Paper
|
||||
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
|
||||
String className;
|
||||
boolean isInterface;
|
||||
|
@ -1300,7 +1300,7 @@ index 9dcfcea63f57f45a5584bb80c34fe445d65849e8..765c412cd0c5cd410c224b4bc55dbf43
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b0843917caedc32f800c50cc54706ace9523f64f..63f45a77c8511e05954030cf117c5e4cda0a518f 100644
|
||||
index 06cbe7a7ea131a8bead857cbfbd27810a9093320..0a3ed94165430774c7037e78fd7bffc205c6f72f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -140,7 +140,6 @@ import org.bukkit.command.CommandSender;
|
||||
@ -1590,7 +1590,7 @@ index 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7f
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d1699fcca66bcfbbe8fcc426802cb766cf1e580b..de55611daeb6d55f69c4cb72137eb7b050e727f7 100644
|
||||
index 7839e34cbd42e1b77c533b0dede42e0a19daf2a4..f2355612b497079f1de84e953c36720794da51d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
|
||||
@ -1602,7 +1602,7 @@ index d1699fcca66bcfbbe8fcc426802cb766cf1e580b..de55611daeb6d55f69c4cb72137eb7b0
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@@ -2612,12 +2612,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2620,12 +2620,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
|
@ -146,10 +146,10 @@ index d76dae9ce9022308b316080ac48b7030d674cc6b..e9d56d75b7c648f04d3a56942b286609
|
||||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index de55611daeb6d55f69c4cb72137eb7b050e727f7..1cb6c21741408ff4628864b52341965dfbfa5711 100644
|
||||
index f2355612b497079f1de84e953c36720794da51d8..1056badff06575ef13907afac60af734ffa2b863 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2665,7 +2665,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2673,7 +2673,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1cb6c21741408ff4628864b52341965dfbfa5711..a2f784b28c0d974ee45d61d6a3a0096dd7161d3e 100644
|
||||
index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c99ab3d83 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -450,6 +450,35 @@ public final class CraftServer implements Server {
|
||||
@@ -458,6 +458,35 @@ public final class CraftServer implements Server {
|
||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 1cb6c21741408ff4628864b52341965dfbfa5711..a2f784b28c0d974ee45d61d6a3a0096d
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 3a198718cd4b0d87398f0a54275aad1f419be8b3..bd21da04390e486731a260f8fb0c70921320198e 100644
|
||||
index 26dfb02286e836cad0242c71f743265d55d9d032..1c8049bbc08be77673d375205bd42a346ff951b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -160,6 +160,12 @@ public class Main {
|
||||
|
@ -529,7 +529,7 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be
|
||||
value.append("\n Plugins: {");
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a2f784b28c0d974ee45d61d6a3a0096dd7161d3e..7c97ec4aa57562a8383a40e493eaa8a3697208bb 100644
|
||||
index acab477a4a026799319054c2eb4d0f2c99ab3d83..2a36e562967ec6174efe456e489c50ca10ba47e5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker;
|
||||
@ -583,7 +583,7 @@ index a2f784b28c0d974ee45d61d6a3a0096dd7161d3e..7c97ec4aa57562a8383a40e493eaa8a3
|
||||
this.structureManager = new CraftStructureManager(console.getStructureManager(), console.registryAccess());
|
||||
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
|
||||
this.serverTickManager = new CraftServerTickManager(console.tickRateManager());
|
||||
@@ -598,6 +593,13 @@ public final class CraftServer implements Server {
|
||||
@@ -606,6 +601,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ index a2f784b28c0d974ee45d61d6a3a0096dd7161d3e..7c97ec4aa57562a8383a40e493eaa8a3
|
||||
public List<CraftPlayer> getOnlinePlayers() {
|
||||
return this.playerView;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index bd21da04390e486731a260f8fb0c70921320198e..14f63c179428bee61d3b931ea309f4c94b89a6cc 100644
|
||||
index 1c8049bbc08be77673d375205bd42a346ff951b8..e37a7aceae6c69083ecf81af4f750c01a5e0eded 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
|
||||
@ -610,7 +610,7 @@ index bd21da04390e486731a260f8fb0c70921320198e..14f63c179428bee61d3b931ea309f4c9
|
||||
public static boolean useConsole = true;
|
||||
|
||||
@@ -252,13 +253,26 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index a2833b879b7613856706223f6b6e1ceae760f3b3..6ecb91a21059f3821f6ac5b1be04c933ceee260e 100644
|
||||
index ee5188f3aa2ff71306f5af8046e8ddf919c8601b..decd0dd48d8b77126b184ee21ceaf6c387085946 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1161,6 +1161,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1162,6 +1162,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.unRide();
|
||||
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
|
||||
if (!this.wonGame) {
|
||||
|
@ -22,7 +22,7 @@ index 57ec168bac3727feb734e28cebc680328c1c4aec..4f1204661e345462c08cc66e3a885103
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 458020575050284544761ec61c52abac7bfd15be..55d66aa8264d5b444a23e2132206bcc9835cfe00 100644
|
||||
index 35d541c549cb07508e68388b18f38a4ffd788176..23a0a8d9beb7ca400134fb6a65b3133baceeed83 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -279,7 +279,7 @@ public class Explosion {
|
||||
@ -34,7 +34,7 @@ index 458020575050284544761ec61c52abac7bfd15be..55d66aa8264d5b444a23e2132206bcc9
|
||||
double d13;
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -539,4 +539,84 @@ public class Explosion {
|
||||
@@ -536,4 +536,84 @@ public class Explosion {
|
||||
|
||||
private BlockInteraction() {}
|
||||
}
|
||||
@ -120,7 +120,7 @@ index 458020575050284544761ec61c52abac7bfd15be..55d66aa8264d5b444a23e2132206bcc9
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e19ee11905417918c7ec142fd2016ab3f000e4e2..da7b1b705da9f17de858f72a20d3a932cd8f7fad 100644
|
||||
index e8b8475dd6fd7b89651f744da2cb9696c73ddc3e..a272aaff11ac077853c06f729a5d8b09f866e0f8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use null Locale by default
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6ecb91a21059f3821f6ac5b1be04c933ceee260e..eb1027c6bb90b5fe249cc4cd11c735a0d217ac0e 100644
|
||||
index decd0dd48d8b77126b184ee21ceaf6c387085946..e61460a06708429738e0ed5f903a4226158aa334 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -236,7 +236,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -237,7 +237,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
private int levitationStartTime;
|
||||
private boolean disconnected;
|
||||
private int requestedViewDistance;
|
||||
@ -17,7 +17,7 @@ index 6ecb91a21059f3821f6ac5b1be04c933ceee260e..eb1027c6bb90b5fe249cc4cd11c735a0
|
||||
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
|
||||
@Nullable
|
||||
private Vec3 startingToFallPosition;
|
||||
@@ -292,7 +292,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -293,7 +293,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.lastActionTime = Util.getMillis();
|
||||
this.recipeBook = new ServerRecipeBook();
|
||||
this.requestedViewDistance = 2;
|
||||
@ -26,7 +26,7 @@ index 6ecb91a21059f3821f6ac5b1be04c933ceee260e..eb1027c6bb90b5fe249cc4cd11c735a0
|
||||
this.lastSectionPos = SectionPos.of(0, 0, 0);
|
||||
this.chunkTrackingView = ChunkTrackingView.EMPTY;
|
||||
this.respawnDimension = Level.OVERWORLD;
|
||||
@@ -2051,7 +2051,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2052,7 +2052,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
@ -36,7 +36,7 @@ index 6ecb91a21059f3821f6ac5b1be04c933ceee260e..eb1027c6bb90b5fe249cc4cd11c735a0
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c2be21491183f5f113dbfc71a7e0ccd195679296..8a674fe0ceadf278d7b9a525e71b519f8be72289 100644
|
||||
index 1a003335a4f3cc2fdeadca9c0c6cdafa61a6a1ac..fb5548b92a0fe7866cf98e25293c4b0702344c9b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2423,7 +2423,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable container update tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index eb1027c6bb90b5fe249cc4cd11c735a0d217ac0e..e9fe09f77aacc0b7b13e95d4d04d94fdfa2181c3 100644
|
||||
index e61460a06708429738e0ed5f903a4226158aa334..ed920ed90569b7b8886a09a1c3772fd7147d44f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -267,6 +267,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -268,6 +268,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public final Object object;
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
@ -16,7 +16,7 @@ index eb1027c6bb90b5fe249cc4cd11c735a0d217ac0e..e9fe09f77aacc0b7b13e95d4d04d94fd
|
||||
|
||||
// CraftBukkit start
|
||||
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
||||
@@ -695,7 +696,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -696,7 +697,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
--this.invulnerableTime;
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,10 @@ index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7c97ec4aa57562a8383a40e493eaa8a3697208bb..78193f0d66c2755ed238824bcd24ced9f9052188 100644
|
||||
index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae6191560f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -925,7 +925,7 @@ public final class CraftServer implements Server {
|
||||
@@ -933,7 +933,7 @@ public final class CraftServer implements Server {
|
||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||
Preconditions.checkArgument(sender != null, "sender cannot be null");
|
||||
Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
|
||||
@ -53,7 +53,7 @@ index 7c97ec4aa57562a8383a40e493eaa8a3697208bb..78193f0d66c2755ed238824bcd24ced9
|
||||
if (this.commandMap.dispatch(sender, commandLine)) {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8a674fe0ceadf278d7b9a525e71b519f8be72289..68df6270f7d08cde78235749950e05bf60c1641c 100644
|
||||
index fb5548b92a0fe7866cf98e25293c4b0702344c9b..52d48ad341c564f0f847e3aad09babee826ebf87 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -546,7 +546,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 78193f0d66c2755ed238824bcd24ced9f9052188..4bfb836513d5194be271f4a82990ace98de69640 100644
|
||||
index b0371c51645da361b63dea02bf7633ae6191560f..527b3a7ae93ab288b119fe6bfa76cb0ea3ab2561 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2169,6 +2169,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2177,6 +2177,7 @@ public final class CraftServer implements Server {
|
||||
return this.helpMap;
|
||||
}
|
||||
|
||||
|
@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
||||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd31d0e76d1a953b128e777b1bc27e24b1e03ed7..bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267 100644
|
||||
index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166abc79d399 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -479,6 +479,7 @@ public final class CraftServer implements Server {
|
||||
@@ -487,6 +487,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
this.helpMap.initializeGeneralTopics();
|
||||
@ -27,7 +27,7 @@ index fd31d0e76d1a953b128e777b1bc27e24b1e03ed7..bce780f491ee12dcd23a4ea5dd3ce6e8
|
||||
}
|
||||
|
||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||
@@ -498,7 +499,7 @@ public final class CraftServer implements Server {
|
||||
@@ -506,7 +507,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.registerServerAliases();
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267..f8d2850c35e1b41c1844773c4b0452c17bd72f19 100644
|
||||
index da2e0bb591468e7940f057a583ce166abc79d399..99571e69aabbbfb0e439a42d113c206decb1377b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2785,5 +2785,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2793,5 +2793,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f8d2850c35e1b41c1844773c4b0452c17bd72f19..502e7f4e168b7f9c6a0f68695f36b8d44cce218e 100644
|
||||
index 99571e69aabbbfb0e439a42d113c206decb1377b..5461e0a1ef7f342cbd9fb6f291e33e645b414058 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -993,8 +993,16 @@ public final class CraftServer implements Server {
|
||||
@@ -1001,8 +1001,16 @@ public final class CraftServer implements Server {
|
||||
world.spigotConfig.init(); // Spigot
|
||||
}
|
||||
|
||||
|
@ -80,10 +80,10 @@ index a4f8cb2c9dc464e94483f5574cddab85ef407048..8ac485d82c2d2b32f4d54e02c18c2cb2
|
||||
|
||||
public Mutable(ItemEnchantments enchantmentsComponent) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 21ed720118073b14bc8b5d1d665b0e17a8bbc1d2..9fa993ac05092170794911394c994fcad33d648f 100644
|
||||
index 17fa2d3db112762bcb8b941b69b8ddcc53f47224..6c76aeddb34239a5acc204a17b2aa2d80e6b2c88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -191,16 +191,13 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -214,16 +214,13 @@ public final class CraftItemStack extends ItemStack {
|
||||
public void addUnsafeEnchantment(Enchantment ench, int level) {
|
||||
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
||||
|
||||
@ -106,7 +106,7 @@ index 21ed720118073b14bc8b5d1d665b0e17a8bbc1d2..9fa993ac05092170794911394c994fca
|
||||
}
|
||||
|
||||
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
||||
@@ -229,24 +226,15 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -252,24 +249,15 @@ public final class CraftItemStack extends ItemStack {
|
||||
public int removeEnchantment(Enchantment ench) {
|
||||
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
||||
|
||||
@ -139,7 +139,7 @@ index 21ed720118073b14bc8b5d1d665b0e17a8bbc1d2..9fa993ac05092170794911394c994fca
|
||||
|
||||
return level;
|
||||
}
|
||||
@@ -258,7 +246,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -281,7 +269,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchantments() {
|
||||
|
@ -59,10 +59,10 @@ index 64db7e017b41bffcaac202ee4ecfd7df46d69331..14a821bfc6b20475889d3138b8da9e6b
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 3595ff3db5eb0b1da100692702e514cb870220ee..9c0e38453e164ef394c8e1860fb92605cda71be5 100644
|
||||
index 63e20db8ad84b332a4962d5cea83f1064b7c1a3d..bb296f649afd143adad47595479532cfdd778b71 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1880,4 +1880,13 @@ public class CraftEventFactory {
|
||||
@@ -1901,4 +1901,13 @@ public class CraftEventFactory {
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
||||
}
|
||||
|
@ -24,10 +24,10 @@ index 223f8d9be5d73e296f5815db7123b95c3b345162..d728afbe1d6882f1ace4ead9d87f4b7d
|
||||
|
||||
public int getLogicalHeight() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 7432becf1c9a378a62e116153aebad4960c0c7bd..dba973ba5088d253aa67f5577663cccda7f4edd1 100644
|
||||
index 0be5ae83d2fa86142e3404393729039c51ae0639..25a429a2d1725d562a28b9d07dba630cfe49d32a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -696,11 +696,12 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -695,11 +695,12 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
|
||||
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
||||
@ -81,7 +81,7 @@ index 0224a0e901f9430ef06c30432a7988149a67037d..391579b515c5a07066f82b33c4f9ef8e
|
||||
double deltaLength = Math.sqrt(distanceSquared);
|
||||
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 4abb586f964e342425c7cf0384ab8bf8cdedaea3..008be3aad044d20be14da3a9e96933d265104587 100644
|
||||
index 240db0aae0b0e306c90bcc4a537c9afcb290acb3..59992bea10218e48397fa781f895d36e0e1df46e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1277,4 +1277,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 502e7f4e168b7f9c6a0f68695f36b8d44cce218e..451f2861d601c551845a0676bddcfb60e0a84cf3 100644
|
||||
index 5461e0a1ef7f342cbd9fb6f291e33e645b414058..ff807bfe89708d9c680b84eda902b49f3167f3a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1878,7 +1878,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1886,7 +1886,7 @@ public final class CraftServer implements Server {
|
||||
if (result == null) {
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
||||
|
@ -28,10 +28,10 @@ index 63c10be6eacd7108b8b4795d76bf624e0614440a..243eb1e54293c763a06febff551c0513
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 9c0e38453e164ef394c8e1860fb92605cda71be5..ba8dfea4a88cb9ba881cd90dfb5d41087498ae54 100644
|
||||
index bb296f649afd143adad47595479532cfdd778b71..5cf1b15160647b6e8e42a167502643882a231c55 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1202,6 +1202,14 @@ public class CraftEventFactory {
|
||||
@@ -1211,6 +1211,14 @@ public class CraftEventFactory {
|
||||
return !event.isCancelled();
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 451f2861d601c551845a0676bddcfb60e0a84cf3..a387fa6ce162531497788e0bbcec3c5ffdfa4c68 100644
|
||||
index ff807bfe89708d9c680b84eda902b49f3167f3a4..eb12f17b58256489717a0462964b1cef5bc3624b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2811,5 +2811,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2819,5 +2819,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index 56402312e44d12c859e2c4b39902d31b7cfd1573..25a45e680f9fdea90f43d59de87a3a50
|
||||
|
||||
--this.count;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ba8dfea4a88cb9ba881cd90dfb5d41087498ae54..a3a63c5988eaa987a3718dfa79876e81d05e7fa6 100644
|
||||
index 5cf1b15160647b6e8e42a167502643882a231c55..6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1155,6 +1155,17 @@ public class CraftEventFactory {
|
||||
@@ -1164,6 +1164,17 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
||||
Deprecated now and replaced with ProjectileHitEvent
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index a3a63c5988eaa987a3718dfa79876e81d05e7fa6..0aa10b1709c195d766eb49e21d9bc19d7cecf760 100644
|
||||
index 6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb..50a4e657508e21717a61900660d85203d9373e19 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1299,6 +1299,17 @@ public class CraftEventFactory {
|
||||
@@ -1308,6 +1308,17 @@ public class CraftEventFactory {
|
||||
return CraftItemStack.asNMSCopy(bitem);
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index a3a63c5988eaa987a3718dfa79876e81d05e7fa6..0aa10b1709c195d766eb49e21d9bc19d
|
||||
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
|
||||
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
|
||||
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
|
||||
@@ -1323,8 +1334,15 @@ public class CraftEventFactory {
|
||||
@@ -1332,8 +1343,15 @@ public class CraftEventFactory {
|
||||
if (position.getType() == HitResult.Type.ENTITY) {
|
||||
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index e9fe09f77aacc0b7b13e95d4d04d94fdfa2181c3..269cfe7aa87cf4a73ee2faca142c83e4d10a98c7 100644
|
||||
index ed920ed90569b7b8886a09a1c3772fd7147d44f9..9b2861b7894a634ce60a2675ee25c949d6e63ea0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2627,7 +2627,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2628,7 +2628,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
@Override
|
||||
public boolean isImmobile() {
|
||||
|
@ -7,10 +7,10 @@ Allows you to access the Gateway being used in a teleport event
|
||||
Fix the offset used for player teleportation
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 269cfe7aa87cf4a73ee2faca142c83e4d10a98c7..dd2a359eda0ab3aaf5a94e00a1675bae424bd860 100644
|
||||
index 9b2861b7894a634ce60a2675ee25c949d6e63ea0..a049a54ee70839706787f8de661ca6e6b1f54071 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1192,11 +1192,22 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1193,11 +1193,22 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
ResourceKey<LevelStem> resourcekey = worldserver1.getTypeKey();
|
||||
|
||||
if (worldserver != null && worldserver.dimension() == worldserver1.dimension()) { // CraftBukkit
|
||||
|
@ -198,10 +198,10 @@ index d4659ce017692c6f8cabb56137a231bc566614b0..6f90ee749aed98b97868aa40fc233d16
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index dba973ba5088d253aa67f5577663cccda7f4edd1..5e83ca6fa874227b5d63148502405bb77f5345ba 100644
|
||||
index 25a429a2d1725d562a28b9d07dba630cfe49d32a..f8283405b3c5bd43746a5738be55f600beea40e3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -689,7 +689,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -688,7 +688,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||
@ -210,7 +210,7 @@ index dba973ba5088d253aa67f5577663cccda7f4edd1..5e83ca6fa874227b5d63148502405bb7
|
||||
}
|
||||
|
||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||
@@ -718,7 +718,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -717,7 +717,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
||||
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
||||
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a387fa6ce162531497788e0bbcec3c5ffdfa4c68..859719521b07f061103a5e27a2c134849ecb9b08 100644
|
||||
index eb12f17b58256489717a0462964b1cef5bc3624b..1fd2f6053e660674baa239f142a720d59e64c776 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2830,5 +2830,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2838,5 +2838,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d
|
||||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 859719521b07f061103a5e27a2c134849ecb9b08..dc20e2a838d19b378f76592d8eeeb1eaf150393d 100644
|
||||
index 1fd2f6053e660674baa239f142a720d59e64c776..5ab2836f14e1a7482e7136004507d66c4abb4bdd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@ -646,7 +646,7 @@ index 859719521b07f061103a5e27a2c134849ecb9b08..dc20e2a838d19b378f76592d8eeeb1ea
|
||||
CraftItemFactory.instance();
|
||||
CraftEntityFactory.instance();
|
||||
}
|
||||
@@ -2835,5 +2839,39 @@ public final class CraftServer implements Server {
|
||||
@@ -2843,5 +2847,39 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -78,10 +78,10 @@ index f94c0106b44d614483184e372c01c1504cb886b0..72756ef14b8ec8afd80313b9f6aaf767
|
||||
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dc20e2a838d19b378f76592d8eeeb1eaf150393d..e782c6d776f467d29540851eef9428f4d7f80acb 100644
|
||||
index 5ab2836f14e1a7482e7136004507d66c4abb4bdd..4280bd6288ce9522d041ec2dc2105d3908514a2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -939,7 +939,13 @@ public final class CraftServer implements Server {
|
||||
@@ -947,7 +947,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
|
@ -31,12 +31,12 @@ index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9f
|
||||
Bootstrap.isBootstrapped = true;
|
||||
Instant instant = Instant.now();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 75a3c7ed5500f0451c9c1efdfc3cb809445c8acf..8245b38d37b4cee6f4e7b61d7af40a18e54a3f43 100644
|
||||
index fcc7cdd0adfcaa135d08ea36746dca980590d6eb..4c8d98598b5cdcdbe4a778f1ec142e3a7ab33196 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -260,10 +260,12 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
||||
|
@ -80,10 +80,10 @@ index 7906e163f8d03ba39480526d0293ad48534f11bf..ec80a9138260497d0deccf3ade3f44fc
|
||||
|
||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e782c6d776f467d29540851eef9428f4d7f80acb..3b3fe9282251774516c8eae5890bd56645dd38e4 100644
|
||||
index 4280bd6288ce9522d041ec2dc2105d3908514a2f..5d8eb3b728359be5f92a255c9637d71713403cc8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2284,7 +2284,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2292,7 +2292,7 @@ public final class CraftServer implements Server {
|
||||
offers = this.tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
|
@ -60,10 +60,10 @@ index e0c8b89767087cba34fc3c3809db4c386dacb193..a939bad7da9c852827a2d67d9ace5d0d
|
||||
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||
Iterator iterator1 = list.iterator();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index dd2a359eda0ab3aaf5a94e00a1675bae424bd860..db3f5a774daa0750cdcc0c2c47d1bd4fd2900dd9 100644
|
||||
index a049a54ee70839706787f8de661ca6e6b1f54071..db72318d822b876eb937f0f0f7f2b2139fb77df7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -285,6 +285,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -286,6 +286,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
|
@ -77,7 +77,7 @@ index 818df09e9245b5d89b4180b1eaa51470b7539341..461656e1cb095243bfe7a9ee2906e5b0
|
||||
|
||||
public Server getServer() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 93550342c6f181b7622f5d649cd3e5075a464e55..19f644442eb7ae352d655d5e62f47f261b7b1b0a 100644
|
||||
index 4602c3d0be94f0146a2b205268f70aaf85410f20..422c25577a0d95b31b5528fad8fc9b3ae97fa7f0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -249,11 +249,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -220,10 +220,10 @@ index 93550342c6f181b7622f5d649cd3e5075a464e55..19f644442eb7ae352d655d5e62f47f26
|
||||
public void onEntityRemove(Entity entity) {
|
||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 0bde8fc63d892cb615638769ca84beba9da80ff2..a2b1197a26eed4df77d7f770e016f522832d8aa2 100644
|
||||
index 1cef3614e81e751c98b504c26da4718dc88746df..eeaa9787c7e04e7155b93aa8d83bd073e8dc209e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -404,6 +404,13 @@ public class Commodore {
|
||||
@@ -447,6 +447,13 @@ public class Commodore {
|
||||
}
|
||||
// Paper end - Rewrite plugins
|
||||
|
||||
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3b3fe9282251774516c8eae5890bd56645dd38e4..dd1a6b7a65fe019ee71c659a165283ee9c0e7a4f 100644
|
||||
index 5d8eb3b728359be5f92a255c9637d71713403cc8..745970d9f07ed7ca98a653bfff1b861dc4aaa177 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1878,6 +1878,25 @@ public final class CraftServer implements Server {
|
||||
@@ -1886,6 +1886,25 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,10 @@ index a14e00d55930628333cc63b18727ea56dbdc4ee3..f6d01d21745391595d61b191832be4c2
|
||||
this.setUsingItem(true);
|
||||
if (!this.isSilent()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 0aa10b1709c195d766eb49e21d9bc19d7cecf760..9c463d551fc402dbcbc81aad5251a9183596830a 100644
|
||||
index 50a4e657508e21717a61900660d85203d9373e19..1c53b872b30bcd8535b8686015935025a4c9837f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1926,4 +1926,14 @@ public class CraftEventFactory {
|
||||
@@ -1947,4 +1947,14 @@ public class CraftEventFactory {
|
||||
).callEvent();
|
||||
}
|
||||
// Paper end - PlayerUseUnknownEntityEvent
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 9fa993ac05092170794911394c994fcad33d648f..75f9405ee3453620e1561857575cc8700971a865 100644
|
||||
index 6c76aeddb34239a5acc204a17b2aa2d80e6b2c88..e8a455eb5e17bcfcae3f03664f2b47773fbdf37e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -7,14 +7,17 @@ import net.minecraft.core.Holder;
|
||||
@ -27,7 +27,7 @@ index 9fa993ac05092170794911394c994fcad33d648f..75f9405ee3453620e1561857575cc870
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.material.MaterialData;
|
||||
@@ -187,6 +190,21 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -210,6 +213,21 @@ public final class CraftItemStack extends ItemStack {
|
||||
return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getMaxStackSize();
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ Co-authored-by: aerulion <aerulion@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..629942afb41f73ca7a7855cba58c81fd0e734a7a 100644
|
||||
index fd49b9d739b1bbab8cf110659cb83bad03b56102..a2b727dea997ed0d7b1ef677a94b5957f12d5abb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1962,7 +1962,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@ -132,10 +132,10 @@ index aa8909498c26f095060a1df364b9e20d964a6cc3..30502849f79ce0f472e4289043c7d8ec
|
||||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 5e83ca6fa874227b5d63148502405bb77f5345ba..96eccd5f4675019a369a5f8171fb18e7b05b3e48 100644
|
||||
index f8283405b3c5bd43746a5738be55f600beea40e3..b02a77b486f8d5eee31850de4a1b033fe6a107c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -464,7 +464,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -465,7 +465,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
double d3 = entity.getZ() - d1;
|
||||
double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D);
|
||||
|
||||
@ -251,7 +251,7 @@ index de2bc78415ab4efb651030be6560d9c9778a1d17..1e00df3fa3c3b61daa3d59ee1173269a
|
||||
public abstract void explode(Vec3 pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index d93ed33d5ae72e9dd3e6cf044ef79e4b9689dc1c..512d79b66fed3d1bef645c3ecb59bda032c81d15 100644
|
||||
index 6476c644d3da824c5ee4190cb45cde678ff1188f..a5f4ecb96c508b94a92a43c864c075f6c61e296e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -297,13 +297,10 @@ public class Explosion {
|
||||
@ -273,10 +273,10 @@ index d93ed33d5ae72e9dd3e6cf044ef79e4b9689dc1c..512d79b66fed3d1bef645c3ecb59bda0
|
||||
// CraftBukkit end
|
||||
entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d1));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 9c463d551fc402dbcbc81aad5251a9183596830a..cf045e3ebe75046212755f18058bf4381bacacc1 100644
|
||||
index 1c53b872b30bcd8535b8686015935025a4c9837f..0888692736ef62e741aa41d3a72b9b8c3075dfcd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1888,19 +1888,33 @@ public class CraftEventFactory {
|
||||
@@ -1909,19 +1909,33 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -29,10 +29,10 @@ index 1fac100819e59d00f50e530d3a4157b56d966dba..4f777c9d8c3052f68bc0465c8a7386b8
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index db3f5a774daa0750cdcc0c2c47d1bd4fd2900dd9..00a1a570e9f7abf97a25b4bab2b7532d3dad7912 100644
|
||||
index db72318d822b876eb937f0f0f7f2b2139fb77df7..a3a1450949703851625bbb257e92b3be4d79a06a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -704,7 +704,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -705,7 +705,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
// Paper end - Configurable container update tick rate
|
||||
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
@ -41,7 +41,7 @@ index db3f5a774daa0750cdcc0c2c47d1bd4fd2900dd9..00a1a570e9f7abf97a25b4bab2b7532d
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -924,7 +924,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -925,7 +925,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -50,7 +50,7 @@ index db3f5a774daa0750cdcc0c2c47d1bd4fd2900dd9..00a1a570e9f7abf97a25b4bab2b7532d
|
||||
}
|
||||
|
||||
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
|
||||
@@ -1591,7 +1591,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1592,7 +1592,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -59,7 +59,7 @@ index db3f5a774daa0750cdcc0c2c47d1bd4fd2900dd9..00a1a570e9f7abf97a25b4bab2b7532d
|
||||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1621,7 +1621,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1622,7 +1622,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
@Override
|
||||
public void closeContainer() {
|
||||
@ -165,7 +165,7 @@ index 2e02fc22a889c9c8010ae8bff1b59a13219ae014..703bb1bb42b1668c04824489fd2f3490
|
||||
@Override
|
||||
public boolean isBlocking() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index db79201906e231b13c6f237193c3e8597bce9106..7ad63581c7c78a7d8b78be2e95002550b3b2c222 100644
|
||||
index 326f36726c124385145c469566c2089439b5dd0f..0b4c5a2604f61a34b5666a9a83a2e644449997fd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1273,7 +1273,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -178,10 +178,10 @@ index db79201906e231b13c6f237193c3e8597bce9106..7ad63581c7c78a7d8b78be2e95002550
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index cf045e3ebe75046212755f18058bf4381bacacc1..836eba2f7b4260e5f882b202ef5923bb9bcfcd58 100644
|
||||
index 0888692736ef62e741aa41d3a72b9b8c3075dfcd..7fa68654c2e0c87dd779a1354fc103be4d7d7a46 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1268,7 +1268,7 @@ public class CraftEventFactory {
|
||||
@@ -1277,7 +1277,7 @@ public class CraftEventFactory {
|
||||
|
||||
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
|
||||
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
||||
@ -190,7 +190,7 @@ index cf045e3ebe75046212755f18058bf4381bacacc1..836eba2f7b4260e5f882b202ef5923bb
|
||||
}
|
||||
|
||||
CraftServer server = player.level().getCraftServer();
|
||||
@@ -1455,8 +1455,18 @@ public class CraftEventFactory {
|
||||
@@ -1464,8 +1464,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ index 6ca74a5cf691ee92c84bd031e875f72440df6b32..cee3f1200af602b5dfd0b27d05eb0182
|
||||
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 16c244f56813479b2e51f1d883ff739949fc86e3..c0b0a9328faf93b85ceaf6cc9989f1a59520c7f4 100644
|
||||
index a9227581ec78a56e96dc3a342006e4a649906326..5929b450a26e7c3cf63de3dc1d0e67cb781b24c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -265,6 +265,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -89,10 +89,10 @@ index 16c244f56813479b2e51f1d883ff739949fc86e3..c0b0a9328faf93b85ceaf6cc9989f1a5
|
||||
public boolean isClientSide() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 836eba2f7b4260e5f882b202ef5923bb9bcfcd58..1d2e9f3e5e232faca8de4760d3574fae6200b2b2 100644
|
||||
index 7fa68654c2e0c87dd779a1354fc103be4d7d7a46..a221ae7ec1a7db9c38037fa71ea35b5309b99973 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1305,6 +1305,14 @@ public class CraftEventFactory {
|
||||
@@ -1314,6 +1314,14 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add TNTPrimeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 96eccd5f4675019a369a5f8171fb18e7b05b3e48..201ef4a3f5bc8633f7a51e151e9e87efc4004cad 100644
|
||||
index b02a77b486f8d5eee31850de4a1b033fe6a107c7..a2cde7b1b316e43382cb1639ffccf29d89f5ebfc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -574,6 +574,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -573,6 +573,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
});
|
||||
craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false);
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ index c466ec011d059b9960606ef2ee51ea3a3a65f8d0..baf93b5d5883d0a5c360f1a475949804
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dd1a6b7a65fe019ee71c659a165283ee9c0e7a4f..2924bf755df7cc2b8d48e4383b56b2777981231d 100644
|
||||
index 745970d9f07ed7ca98a653bfff1b861dc4aaa177..274d7d7f36ce2eb38d2f630ca48b6aa4f791b0e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -954,6 +954,7 @@ public final class CraftServer implements Server {
|
||||
@@ -962,6 +962,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
@ -44,7 +44,7 @@ index dd1a6b7a65fe019ee71c659a165283ee9c0e7a4f..2924bf755df7cc2b8d48e4383b56b277
|
||||
this.reloadCount++;
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
@@ -1045,6 +1046,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1053,6 +1054,7 @@ public final class CraftServer implements Server {
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
||||
@ -53,7 +53,7 @@ index dd1a6b7a65fe019ee71c659a165283ee9c0e7a4f..2924bf755df7cc2b8d48e4383b56b277
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index d063d356388810fb6f0dddfbc8b5885b3e6442aa..ba4fcfc86b385c8f50f414d5448edc5e99d2433a 100644
|
||||
index a31953bd4dd9408f83c2ee9816d051a4a842cf6d..df3eb02bc2b5b8fc20496823055c6adf4512b4f9 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -229,7 +229,7 @@ public class SpigotConfig
|
||||
|
@ -19,10 +19,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
|
||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 00a1a570e9f7abf97a25b4bab2b7532d3dad7912..0706dd82cfdb6808ef61149b2a8d8be971f19be9 100644
|
||||
index a3a1450949703851625bbb257e92b3be4d79a06a..ff3f70b8c266dc3b2ab374ffd6905ecbfe8510be 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -268,6 +268,10 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -269,6 +269,10 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
@ -33,7 +33,7 @@ index 00a1a570e9f7abf97a25b4bab2b7532d3dad7912..0706dd82cfdb6808ef61149b2a8d8be9
|
||||
|
||||
// CraftBukkit start
|
||||
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
||||
@@ -893,7 +897,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -894,7 +898,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
@Override
|
||||
public void die(DamageSource damageSource) {
|
||||
@ -42,7 +42,7 @@ index 00a1a570e9f7abf97a25b4bab2b7532d3dad7912..0706dd82cfdb6808ef61149b2a8d8be9
|
||||
boolean flag = this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES);
|
||||
// CraftBukkit start - fire PlayerDeathEvent
|
||||
if (this.isRemoved()) {
|
||||
@@ -921,6 +925,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -922,6 +926,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
String deathmessage = defaultMessage.getString();
|
||||
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damageSource, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure
|
||||
@ -59,7 +59,7 @@ index 00a1a570e9f7abf97a25b4bab2b7532d3dad7912..0706dd82cfdb6808ef61149b2a8d8be9
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@@ -1069,8 +1083,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1070,8 +1084,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -423,7 +423,7 @@ index ee3902cbada46ffb78c42dbf6f00c859546c76e1..92bb0c63330ad3a4cb13b2dc65502071
|
||||
// CraftBukkit end
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 597594409b4d1fadf4ae1c3a7156421e70989d97..2d1e0e92e6d98a9cf597c3717c36ea5a337577c3 100644
|
||||
index 92f9502a2d5721ebb1757a069a0f138db66628d7..6c5bd88777ff79c7408cf5ffed0f099a79e5429a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2517,7 +2517,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -443,10 +443,10 @@ index 597594409b4d1fadf4ae1c3a7156421e70989d97..2d1e0e92e6d98a9cf597c3717c36ea5a
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 1d2e9f3e5e232faca8de4760d3574fae6200b2b2..e7ba5b503e821d18467c2300f780ef37f996b34d 100644
|
||||
index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e3ac117d3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -894,9 +894,16 @@ public class CraftEventFactory {
|
||||
@@ -897,9 +897,16 @@ public class CraftEventFactory {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
||||
@ -463,7 +463,7 @@ index 1d2e9f3e5e232faca8de4760d3574fae6200b2b2..e7ba5b503e821d18467c2300f780ef37
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
@@ -914,7 +921,14 @@ public class CraftEventFactory {
|
||||
@@ -917,7 +924,14 @@ public class CraftEventFactory {
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
||||
event.setKeepInventory(keepInventory);
|
||||
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
||||
@ -478,7 +478,7 @@ index 1d2e9f3e5e232faca8de4760d3574fae6200b2b2..e7ba5b503e821d18467c2300f780ef37
|
||||
|
||||
victim.keepLevel = event.getKeepLevel();
|
||||
victim.newLevel = event.getNewLevel();
|
||||
@@ -931,6 +945,31 @@ public class CraftEventFactory {
|
||||
@@ -940,6 +954,31 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,10 @@ spectate the target entity.
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0706dd82cfdb6808ef61149b2a8d8be971f19be9..ae9d058e9450f59bb6a03ebc6fffed8a0b3ebee8 100644
|
||||
index ff3f70b8c266dc3b2ab374ffd6905ecbfe8510be..29dc317d43532399651719d45ca05b086043ae6b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2182,6 +2182,21 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2183,6 +2183,21 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
this.camera = (Entity) (entity == null ? this : entity);
|
||||
if (entity1 != this.camera) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index ae9d058e9450f59bb6a03ebc6fffed8a0b3ebee8..dad9d89d77001d2c84fbae7a8a4a4312cc5953dc 100644
|
||||
index 29dc317d43532399651719d45ca05b086043ae6b..1108fa6c7ac28304d104d4e5df2bdf4e9a6bd929 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2703,6 +2703,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2704,6 +2704,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
|
||||
|
@ -18,10 +18,10 @@ index 5b070d158760789bbcaa984426a55d20767abe4a..e1820a339452cd3388dd7cbb928c5f58
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2924bf755df7cc2b8d48e4383b56b2777981231d..006cc9b7817e0413a332c21839549b127ad67cb4 100644
|
||||
index 274d7d7f36ce2eb38d2f630ca48b6aa4f791b0e3..c4b1e3064f3778909a2f152a69ca229f4c86b71b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2867,6 +2867,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2875,6 +2875,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
|
||||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index dad9d89d77001d2c84fbae7a8a4a4312cc5953dc..ae7a5e65b9183338ce5ed44807a493ce1f3e8c93 100644
|
||||
index 1108fa6c7ac28304d104d4e5df2bdf4e9a6bd929..b4947ee9615b1b2108046b9ab87b65b53dbb23f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2522,9 +2522,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2523,9 +2523,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
@Override
|
||||
public void stopRiding() {
|
||||
@ -41,7 +41,7 @@ index dad9d89d77001d2c84fbae7a8a4a4312cc5953dc..ae7a5e65b9183338ce5ed44807a493ce
|
||||
Iterator iterator = entityliving.getActiveEffects().iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 131eda47e7a9f90a4057607870acbcb8fecfbf0b..2e376b0b2bf2d49ad0669b6e6fd287628a72ea64 100644
|
||||
index d4b1122fcf9c35f492764d0a7b8b4c41e46aa90a..026af10f7de0267c7335385fea53a823f3898e8b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2705,17 +2705,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
|
||||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index ae7a5e65b9183338ce5ed44807a493ce1f3e8c93..cc57c09a38c265040505f17dd0113ab648522490 100644
|
||||
index b4947ee9615b1b2108046b9ab87b65b53dbb23f6..dbdc6b4065acc363c128580fdffe9049259386c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -268,6 +268,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -269,6 +269,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
@ -106,7 +106,7 @@ index 461656e1cb095243bfe7a9ee2906e5b00574ae78..411b280ac3e27e72091db813c0c9b69b
|
||||
public Location getLastDeathLocation() {
|
||||
if (this.getData().contains("LastDeathLocation", 10)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2d1e0e92e6d98a9cf597c3717c36ea5a337577c3..2974f806ef677376ee2b53fccb6ca83151bb8451 100644
|
||||
index 6c5bd88777ff79c7408cf5ffed0f099a79e5429a..c3c1dff8afb9d9e27ead7c037626c97696663930 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -210,6 +210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index cc57c09a38c265040505f17dd0113ab648522490..647cec024d90014a6928d3889f6d1b24d5a4a4de 100644
|
||||
index dbdc6b4065acc363c128580fdffe9049259386c2..afed961e6714abc1a1709d12973cbfae40b950fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1833,6 +1833,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1834,6 +1834,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public void disconnect() {
|
||||
this.disconnected = true;
|
||||
this.ejectPassengers();
|
||||
|
@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
|
||||
public net.minecraft.world.entity.player.Inventory compartments
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 647cec024d90014a6928d3889f6d1b24d5a4a4de..2bc6228057e01bf197e8b6e58ae6389f2d19ffe5 100644
|
||||
index afed961e6714abc1a1709d12973cbfae40b950fa..bac135546695ff575fc32be3ababea5fb9f31d01 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -896,6 +896,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -897,6 +897,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
});
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index 647cec024d90014a6928d3889f6d1b24d5a4a4de..2bc6228057e01bf197e8b6e58ae6389f
|
||||
@Override
|
||||
public void die(DamageSource damageSource) {
|
||||
// this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check
|
||||
@@ -980,7 +1020,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -981,7 +1021,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.dropExperience(damageSource.getEntity());
|
||||
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
if (!event.getKeepInventory()) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 006cc9b7817e0413a332c21839549b127ad67cb4..264b5781a472f706f525cb07d4ccebac17d4a5d3 100644
|
||||
index c4b1e3064f3778909a2f152a69ca229f4c86b71b..510013c4e15595d24cf5d3053cbb7558c2f26569 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2910,5 +2910,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2918,5 +2918,10 @@ public final class CraftServer implements Server {
|
||||
profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
|
||||
return profile;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2bc6228057e01bf197e8b6e58ae6389f2d19ffe5..46b82351b61e82cd301843bd6a05846181eac6d8 100644
|
||||
index bac135546695ff575fc32be3ababea5fb9f31d01..45af5a361e939c07eb3f9316b3fd686d5c2584ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1017,7 +1017,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1018,7 +1018,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.tellNeutralMobsThatIDied();
|
||||
}
|
||||
// SPIGOT-5478 must be called manually now
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e7ba5b503e821d18467c2300f780ef37f996b34d..f670ddd3633bf36b653bdf994f459e84e09bfbff 100644
|
||||
index d3baf38cf45d13eeffedcc697468842e3ac117d3..3ba695a29dcf9e7137dae16835e6f7a375d560f7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -403,13 +403,18 @@ public class CraftEventFactory {
|
||||
@@ -406,13 +406,18 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
org.bukkit.inventory.ItemStack item;
|
||||
|
@ -184,10 +184,10 @@ index 3ffb330a16797c04694f73b0cd9f5b38a07641b4..ff73167bfe210305491e35f18adc2755
|
||||
+ // Paper end - Add tick times API and /mspt command
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 264b5781a472f706f525cb07d4ccebac17d4a5d3..edf6921ed70ea3281cf870dfb779e908ea3d1905 100644
|
||||
index 510013c4e15595d24cf5d3053cbb7558c2f26569..a6564ddf47d50b618627680a55b6546bf6d9eab9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2681,6 +2681,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2689,6 +2689,16 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index edf6921ed70ea3281cf870dfb779e908ea3d1905..cb6f6762b41ca78ff7c13a65690ce0be1bdac292 100644
|
||||
index a6564ddf47d50b618627680a55b6546bf6d9eab9..6707e213d9bd2b173928b1e9dae87c403342953b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2925,5 +2925,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2933,5 +2933,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
|
||||
world and the world age for the start day.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 46b82351b61e82cd301843bd6a05846181eac6d8..7e60da3249e44b333ea3d22ddee706b270dd9c61 100644
|
||||
index 45af5a361e939c07eb3f9316b3fd686d5c2584ba..e754500547df4ae4601e7c6f3a77eb52fda21059 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -269,6 +269,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -270,6 +270,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
|
@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
|
||||
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7e60da3249e44b333ea3d22ddee706b270dd9c61..6075e536f09875e577cea7caff70d6a417470254 100644
|
||||
index e754500547df4ae4601e7c6f3a77eb52fda21059..613eefeb44beb35181243b570bad631f15802918 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -764,7 +764,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -765,7 +765,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
public void doTick() {
|
||||
try {
|
||||
|
@ -13,10 +13,10 @@ By skipping this, we avoid potential for a large spike on server start.
|
||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6075e536f09875e577cea7caff70d6a417470254..a9c1aa9e382b0864386030a66158b53d12026a00 100644
|
||||
index 613eefeb44beb35181243b570bad631f15802918..9b6887f40dea57d4b5e2f08d7645b1edfaa5b189 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -357,7 +357,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -358,7 +358,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.server = server;
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
@ -25,7 +25,7 @@ index 6075e536f09875e577cea7caff70d6a417470254..a9c1aa9e382b0864386030a66158b53d
|
||||
this.updateOptions(clientOptions);
|
||||
this.object = null;
|
||||
|
||||
@@ -627,7 +627,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -628,7 +628,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
position = Vec3.atCenterOf(world.getSharedSpawnPos());
|
||||
}
|
||||
this.setLevel(world);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index a9c1aa9e382b0864386030a66158b53d12026a00..2d31cd0924ad44534418ec084507c19f49d95f24 100644
|
||||
index 9b6887f40dea57d4b5e2f08d7645b1edfaa5b189..d164ae1b965310a260f79240b6e2fd4ddd7249f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -709,7 +709,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -710,7 +710,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end - Configurable container update tick rate
|
||||
@ -17,7 +17,7 @@ index a9c1aa9e382b0864386030a66158b53d12026a00..2d31cd0924ad44534418ec084507c19f
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
@@ -1634,7 +1634,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -1635,7 +1635,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
||||
|
@ -87,10 +87,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2d31cd0924ad44534418ec084507c19f49d95f24..15df50a36138f29ae278cf1f1f531ad949f4a93e 100644
|
||||
index d164ae1b965310a260f79240b6e2fd4ddd7249f3..a794131746c6cfdcbeeb64b31fb122a38be085c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -358,7 +358,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -359,7 +359,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
// this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
|
||||
@ -99,7 +99,7 @@ index 2d31cd0924ad44534418ec084507c19f49d95f24..15df50a36138f29ae278cf1f1f531ad9
|
||||
this.object = null;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -2146,7 +2146,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2147,7 +2147,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ index 2d31cd0924ad44534418ec084507c19f49d95f24..15df50a36138f29ae278cf1f1f531ad9
|
||||
// CraftBukkit start
|
||||
if (this.getMainArm() != clientOptions.mainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
@@ -2157,6 +2173,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -2158,6 +2174,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -136,7 +136,7 @@ index 2d31cd0924ad44534418ec084507c19f49d95f24..15df50a36138f29ae278cf1f1f531ad9
|
||||
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper
|
||||
this.requestedViewDistance = clientOptions.viewDistance();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 80a9a4df9b1114f932badd847238c7a0a1a00941..a0835efca3bef35c434b716ceccd05c801d2f240 100644
|
||||
index d29107105b7bc56b50864777f32420d0c7f379dc..8c61e7a1681cbf4c2fd153d9cba5929bc853235a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -653,6 +653,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -43,10 +43,10 @@ index ee3a5b2f2f1591f68bbacea01b8eafed65c29356..bac8e53cab360142f224965e68d8f9e6
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 15df50a36138f29ae278cf1f1f531ad949f4a93e..b43a32989bd9c05f26da97634149350b311ad820 100644
|
||||
index a794131746c6cfdcbeeb64b31fb122a38be085c1..f0103bcfb29b9fed41c7642620d78fe75b978b60 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -288,6 +288,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -289,6 +289,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
public double maxHealthCache;
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
|
@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 61ae5553a22adc84acbe2962632b8f564ed80d88..2c21ef3f9096d1282091a7ec34e57fd74d815353 100644
|
||||
index e61c92d4d510eeb93ad0d72f779f6ac9c3a722f1..4134c858dcca7192ad21d325d67e64bba90bb8b8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2516,11 +2516,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@ -124,10 +124,10 @@ index 92bb0c63330ad3a4cb13b2dc655020714e9b1ffd..cc1189c2d7dc57ba8f29aad4ba5d2a07
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index f670ddd3633bf36b653bdf994f459e84e09bfbff..01c16286cf210a366decf7046a6a6b94284f9934 100644
|
||||
index 3ba695a29dcf9e7137dae16835e6f7a375d560f7..e0cbef395c479da40dc7079835f0eae1ee122da1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -896,6 +896,11 @@ public class CraftEventFactory {
|
||||
@@ -899,6 +899,11 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
@ -139,7 +139,7 @@ index f670ddd3633bf36b653bdf994f459e84e09bfbff..01c16286cf210a366decf7046a6a6b94
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
||||
@@ -910,11 +915,13 @@ public class CraftEventFactory {
|
||||
@@ -913,11 +918,13 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event);
|
||||
// Paper end
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Villager Restocks API
|
||||
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index 3b765b9f3b449ef8ff9c82967e4e730a090d4e5d..423f6fcaf49252553d2285308633f13e2427b607 100644
|
||||
index 1b97755b42aaa6cc27b79f0b6369955e9a17c4d4..957c9ec21c7a9888b3038402b0111c68f816f968 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -87,6 +87,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
@@ -89,6 +89,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
this.getHandle().setVillagerXp(experience);
|
||||
}
|
||||
|
||||
|
@ -105,10 +105,10 @@ index 5457358bc76889153036818fdfd70a043ec4e40f..880e5c52746e9e3a9a1f42ec6461be54
|
||||
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cb6f6762b41ca78ff7c13a65690ce0be1bdac292..093c2159eb9d9603b5e3f0d420769d6b9d872be8 100644
|
||||
index 6707e213d9bd2b173928b1e9dae87c403342953b..b36d62380a939a0b777fecf1472645f148289a6c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1039,6 +1039,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1047,6 +1047,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
|
@ -780,10 +780,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 093c2159eb9d9603b5e3f0d420769d6b9d872be8..7eaf0f56cbf0695132a029b0a208f283f43e47b5 100644
|
||||
index b36d62380a939a0b777fecf1472645f148289a6c..d3cdb5feb1656249fee14885b1f01c1c0b40ab8e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2931,5 +2931,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2939,5 +2939,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
|
@ -57,10 +57,10 @@ index f06a5f0d9c5c877ddf963254d3124f5fe2d67282..aa32804bc9affe9a615d3ffaa513f6f0
|
||||
|
||||
static record GossipEntry(UUID target, GossipType type, int value) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index 423f6fcaf49252553d2285308633f13e2427b607..00fb708bce2c79817cd9fccadec72f07f0d26317 100644
|
||||
index 957c9ec21c7a9888b3038402b0111c68f816f968..52312bec840322d32ea845f0bd64eb3ca1380854 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -18,6 +18,13 @@ import org.bukkit.entity.Villager;
|
||||
@@ -20,6 +20,13 @@ import org.bukkit.entity.Villager;
|
||||
import org.bukkit.entity.ZombieVillager;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
|
||||
@ -74,8 +74,8 @@ index 423f6fcaf49252553d2285308633f13e2427b607..00fb708bce2c79817cd9fccadec72f07
|
||||
public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
|
||||
public CraftVillager(CraftServer server, net.minecraft.world.entity.npc.Villager entity) {
|
||||
@@ -176,4 +183,45 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
.getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow();
|
||||
@@ -298,4 +305,45 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
return this.getKey().hashCode();
|
||||
}
|
||||
}
|
||||
+
|
||||
|
@ -77,10 +77,10 @@ index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c3670
|
||||
public java.util.UUID getTriggerEntityId() {
|
||||
return getHandle().triggerEntityId;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 01c16286cf210a366decf7046a6a6b94284f9934..baf282b200a14733cf2148f237d972224d60a266 100644
|
||||
index e0cbef395c479da40dc7079835f0eae1ee122da1..ec364ab90df6276c1976e876337636f4bb06d097 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -705,15 +705,29 @@ public class CraftEventFactory {
|
||||
@@ -708,15 +708,29 @@ public class CraftEventFactory {
|
||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
|
@ -22,10 +22,10 @@ index 1088a91ee131d1c303961557d8fb90101c2d8d3b..2d25ba18d3db4b3eea8bd30812656f1a
|
||||
// CraftBukkit end
|
||||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7eaf0f56cbf0695132a029b0a208f283f43e47b5..118708bd917518333359ce1407e1e26e4ec6a180 100644
|
||||
index d3cdb5feb1656249fee14885b1f01c1c0b40ab8e..c2ccd10efd5096b2683fe235de1e8176ee7d2083 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1050,6 +1050,32 @@ public final class CraftServer implements Server {
|
||||
@@ -1058,6 +1058,32 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,10 @@ index 01def06cf90faaf67421b6e5a87f4c47dd4c1142..9f28c9f2e8f8323aa374c2ac5e7610b8
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 118708bd917518333359ce1407e1e26e4ec6a180..9e8de1efa2fc42a8ffb3c29579be48a4b5b97fca 100644
|
||||
index c2ccd10efd5096b2683fe235de1e8176ee7d2083..ebe69ce183b8bba43ed4d6fdbac09fdc1eaaa988 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -988,8 +988,8 @@ public final class CraftServer implements Server {
|
||||
@@ -996,8 +996,8 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9e8de1efa2fc42a8ffb3c29579be48a4b5b97fca..010ab9cdf3dbe9b89b58744f37b33a232167f445 100644
|
||||
index ebe69ce183b8bba43ed4d6fdbac09fdc1eaaa988..8efa537503ec52de17918e2e99d01015df8bf62a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -380,7 +380,7 @@ public final class CraftServer implements Server {
|
||||
@ -34,7 +34,7 @@ index 9e8de1efa2fc42a8ffb3c29579be48a4b5b97fca..010ab9cdf3dbe9b89b58744f37b33a23
|
||||
this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
|
||||
this.loadIcon();
|
||||
this.loadCompatibilities();
|
||||
@@ -967,7 +967,7 @@ public final class CraftServer implements Server {
|
||||
@@ -975,7 +975,7 @@ public final class CraftServer implements Server {
|
||||
this.console.setMotd(config.motd);
|
||||
this.overrideSpawnLimits();
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
|
@ -94,10 +94,10 @@ index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4
|
||||
|
||||
private static SingleRecipeInput createRecipeInput(Container inventory) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index baf282b200a14733cf2148f237d972224d60a266..cd3c0f9672aca19e28aa3e04e0060bf250f122ce 100644
|
||||
index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb0987222e4894a5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1657,6 +1657,12 @@ public class CraftEventFactory {
|
||||
@@ -1666,6 +1666,12 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) {
|
||||
@ -110,7 +110,7 @@ index baf282b200a14733cf2148f237d972224d60a266..cd3c0f9672aca19e28aa3e04e0060bf2
|
||||
PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
||||
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
event.getInventory().setItem(2, event.getResult());
|
||||
@@ -1664,6 +1670,12 @@ public class CraftEventFactory {
|
||||
@@ -1673,6 +1679,12 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) {
|
||||
@ -123,7 +123,7 @@ index baf282b200a14733cf2148f237d972224d60a266..cd3c0f9672aca19e28aa3e04e0060bf2
|
||||
PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
||||
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
event.getInventory().setItem(2, event.getResult());
|
||||
@@ -1671,12 +1683,39 @@ public class CraftEventFactory {
|
||||
@@ -1680,12 +1692,39 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b43a32989bd9c05f26da97634149350b311ad820..16dca5bcb7b1cbecec9be88c60240f3abe43ffdb 100644
|
||||
index f0103bcfb29b9fed41c7642620d78fe75b978b60..3a1d0ab6a7513fad7a3e4530e2fbccd9b20f9702 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -293,6 +293,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
@@ -294,6 +294,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
@ -57,7 +57,7 @@ index 2d1fad00ee084841618f0da8113c7aac8c0e2b0d..a3c67bdc2c08b3550534f37d15b0db90
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a0835efca3bef35c434b716ceccd05c801d2f240..99799563942693ae36188092d76054fdff97d4ca 100644
|
||||
index 8c61e7a1681cbf4c2fd153d9cba5929bc853235a..1292e7b9889777448b728ef3bb3ae4cb25d42d61 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3139,6 +3139,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
|
||||
village bell. Passes along the bell block and the player who rang it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index cd3c0f9672aca19e28aa3e04e0060bf250f122ce..dc7c73f36b7df05ee34e9686c99c44a24acecdcb 100644
|
||||
index 3159e52006ad348bfce4905dcb0987222e4894a5..c803948c713fa898430f478dddfb2a75f6d355ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -369,10 +369,11 @@ public class CraftEventFactory {
|
||||
@@ -372,10 +372,11 @@ public class CraftEventFactory {
|
||||
return tradeSelectEvent;
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,10 @@ index f041b5d80bff9c022b007e04ef1558e9116acc6b..a586442422a2b2c06b785af0d261d3e1
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
|
||||
index f6ffb81b68e0cf3afebe901a5ba8e305bb94b77a..f2f62667ddf082796011ad7dd025e8855b765c1f 100644
|
||||
index 338a8f4acf413ef24fedab60c19c7a51a0ea19a6..2d8a509446c0ed0d7358f10f67ef29c4df683696 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
|
||||
@@ -225,4 +225,11 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
|
||||
@@ -234,4 +234,11 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
|
||||
public Material asMaterial() {
|
||||
return Registry.MATERIAL.get(this.key);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 010ab9cdf3dbe9b89b58744f37b33a232167f445..92e0f1a948962d4c71f1288dfb8b482d3207cf4c 100644
|
||||
index 8efa537503ec52de17918e2e99d01015df8bf62a..856de462a5a92d00896b5454244014eae2cdbf24 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1955,6 +1955,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1963,6 +1963,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user