13
0
geforkt von Mirrors/Paper

Updated Upstream (CraftBukkit/Spigot) (#9598)

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

CraftBukkit Changes:
b76ceb4f5 PR-1235: Move EntityType return to base Entity class
e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command
46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit
d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout
921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade"

Spigot Changes:
94e187b5 Rebuild patches
3bce7935 SPIGOT-7091: Update bungeecord-chat
Dieser Commit ist enthalten in:
Jake Potrebic 2023-08-13 16:32:51 -07:00
Ursprung 224e38a0f6
Commit 975444e5d2
23 geänderte Dateien mit 74 neuen und 109 gelöschten Zeilen

Datei anzeigen

@ -11,9 +11,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -0,0 +0,0 @@ java {
withJavadocJar()
}
val annotationsVersion = "24.0.1"
val bungeeCordChatVersion = "1.20-R0.1"
+val adventureVersion = "4.14.0"
+val apiAndDocs: Configuration by configurations.creating {
+ attributes {
@ -26,15 +26,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+configurations.api {
+ extendsFrom(apiAndDocs)
+}
+
val annotationsVersion = "24.0.1"
dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:31.1-jre")
api("com.google.code.gson:gson:2.10")
- api("net.md-5:bungeecord-chat:1.16-R0.4")
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
api("org.yaml:snakeyaml:2.0")
api("org.joml:joml:1.10.5")
// Paper start
@ -56,15 +54,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
"https://guava.dev/releases/31.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
+ // Paper start
+ //"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
+ // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // don't link to bungee chat
+ "https://jd.advntr.dev/api/$adventureVersion/",
+ "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
+ "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
+ "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
+ "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
+ "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/"
+ "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
+ // Paper end
)
options.tags("apiNote:a:API Note:")

Datei anzeigen

@ -18,8 +18,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -0,0 +0,0 @@ java {
}
val annotationsVersion = "24.0.1"
val bungeeCordChatVersion = "1.20-R0.1"
val adventureVersion = "4.14.0"
+val slf4jVersion = "1.8.0-beta4"
+val log4jVersion = "2.17.1"
@ -36,13 +36,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm:9.4")
implementation("org.ow2.asm:asm-commons:9.4")
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
"https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
- "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/"
+ "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/"
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
// Paper end
)
options.tags("apiNote:a:API Note:")

Datei anzeigen

@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -0,0 +0,0 @@ dependencies {
api("net.md-5:bungeecord-chat:1.16-R0.4")
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
api("org.yaml:snakeyaml:2.0")
api("org.joml:joml:1.10.5")
+ // Paper start
@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
"https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
)
options.tags("apiNote:a:API Note:")
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {

Datei anzeigen

@ -42,12 +42,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+}
+
+val annotationsVersion = "24.0.1"
+val bungeeCordChatVersion = "1.20-R0.1"
+
+dependencies {
+ // api dependencies are listed transitively to API consumers
+ api("com.google.guava:guava:31.1-jre")
+ api("com.google.code.gson:gson:2.10")
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
+ api("org.yaml:snakeyaml:2.0")
+ api("org.joml:joml:1.10.5")
+
@ -101,7 +102,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ "https://guava.dev/releases/31.1-jre/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
+ )
+ options.tags("apiNote:a:API Note:")
+
@ -179,7 +180,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency>
- <groupId>net.md-5</groupId>
- <artifactId>bungeecord-chat</artifactId>
- <version>1.16-R0.4</version>
- <version>1.20-R0.1</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
@ -320,7 +321,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/2.0/</link>
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.20-R0.1/</link>
- </links>
- <tags>
- <tag>

Datei anzeigen

@ -42,8 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
@@ -0,0 +0,0 @@ public class CraftCreeper extends CraftMonster implements Creeper {
public EntityType getType() {
return EntityType.CREEPER;
public String toString() {
return "CraftCreeper";
}
+
+ // Paper start

Datei anzeigen

@ -76,8 +76,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
@@ -0,0 +0,0 @@ public class CraftPhantom extends CraftFlying implements Phantom, CraftEnemy {
public EntityType getType() {
return EntityType.PHANTOM;
public String toString() {
return "CraftPhantom";
}
+
+ // Paper start

Datei anzeigen

@ -35,7 +35,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.MushroomCow;
import org.bukkit.entity.MushroomCow.Variant;
@ -48,8 +48,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/m
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Sheep;
-public class CraftSheep extends CraftAnimals implements Sheep {
@ -61,8 +61,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.animal.SnowGolem;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Snowman;
-public class CraftSnowman extends CraftGolem implements Snowman, com.destroystokyo.paper.entity.CraftRangedEntity<SnowGolem> { // Paper

Datei anzeigen

@ -75,8 +75,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
SignBlockEntity handle = ((CraftSign<?>) sign).getTileEntity();
Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
+ // Paper start
+ io.papermc.paper.event.player.PlayerOpenSignEvent event = new io.papermc.paper.event.player.PlayerOpenSignEvent((Player) player, sign, side, io.papermc.paper.event.player.PlayerOpenSignEvent.Cause.PLUGIN);
@ -88,5 +88,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ } // Paper
handle.setAllowedPlayerEditor(player.getUniqueId()); // Paper
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
SignBlockEntity handle = ((CraftSign<?>) sign).getTileEntity();
handle.setAllowedPlayerEditor(player.getUniqueId());

Datei anzeigen

@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import net.minecraft.world.entity.animal.Sheep;
import net.minecraft.world.entity.monster.SpellcasterIllager;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Evoker;
@@ -0,0 +0,0 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker {
public void setCurrentSpell(Evoker.Spell spell) {
this.getHandle().setIsCastingSpell(spell == null ? SpellcasterIllager.IllagerSpell.NONE : SpellcasterIllager.IllagerSpell.byId(spell.ordinal()));

Datei anzeigen

@ -64,8 +64,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Witch;
+// Paper start
+import com.destroystokyo.paper.entity.CraftRangedEntity;

Datei anzeigen

@ -4,18 +4,6 @@ Date: Sun, 1 Apr 2018 02:29:37 +0300
Subject: [PATCH] Add openSign method to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
return;
}
+ handle.setAllowedPlayerEditor(player.getUniqueId()); // Paper
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java

Datei anzeigen

@ -3562,7 +3562,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
protected Entity entity;
private final EntityType entityType;
private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
+ protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers

Datei anzeigen

@ -45,9 +45,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
@@ -0,0 +0,0 @@ import com.google.common.base.Preconditions;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Axolotl;
import org.bukkit.entity.EntityType;
-public class CraftAxolotl extends CraftAnimals implements Axolotl {
+public class CraftAxolotl extends CraftAnimals implements Axolotl, io.papermc.paper.entity.PaperBucketable { // Paper - Bucketable API

Datei anzeigen

@ -9,10 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
@@ -0,0 +0,0 @@ public class CraftDolphin extends CraftWaterMob implements Dolphin {
public EntityType getType() {
return EntityType.DOLPHIN;
public String toString() {
return "CraftDolphin";
}
+
+ // Paper start - Missing Dolphin API
+ @Override
+ public int getMoistness() {
+ return this.getHandle().getMoistnessLevel();
@ -42,4 +43,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void setTreasureLocation(org.bukkit.Location location) {
+ this.getHandle().setTreasurePos(io.papermc.paper.util.MCUtil.toBlockPosition(location));
+ }
+ // Paper end - Missing Dolphin API
}

Datei anzeigen

@ -1335,5 +1335,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
@Override
public void playEffect(EntityEffect type) {
Preconditions.checkArgument(type != null, "type");
public final EntityType getType() {
return this.entityType;

Datei anzeigen

@ -753,7 +753,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/s
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
import org.bukkit.inventory.Inventory;
import org.bukkit.loot.LootTable;
@ -789,7 +789,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.jav
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.entity.minecart.HopperMinecart;
import org.bukkit.inventory.Inventory;

Datei anzeigen

@ -563,9 +563,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
@@ -0,0 +0,0 @@ public class CraftChicken extends CraftAnimals implements Chicken {
public EntityType getType() {
return EntityType.CHICKEN;
public String toString() {
return "CraftChicken";
}
+
+ // Paper start
+ @Override
+ public boolean isChickenJockey() {
@ -592,9 +593,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java b/src/mai
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Cod;
import org.bukkit.entity.EntityType;
-public class CraftCod extends CraftFish implements Cod {
+public class CraftCod extends io.papermc.paper.entity.PaperSchoolableFish implements Cod { // Paper - School Fish API
@ -751,8 +752,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
@@ -0,0 +0,0 @@ public class CraftLlama extends CraftChestedHorse implements Llama, com.destroys
public EntityType getType() {
return EntityType.LLAMA;
public String toString() {
return "CraftLlama";
}
+
+ // Paper start
@ -947,8 +948,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
@@ -0,0 +0,0 @@ public class CraftPolarBear extends CraftAnimals implements PolarBear {
public EntityType getType() {
return EntityType.POLAR_BEAR;
public String toString() {
return "CraftPolarBear";
}
+
+ // Paper start
@ -1027,8 +1028,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java b/src/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Salmon;
-public class CraftSalmon extends CraftFish implements Salmon {
@ -1061,8 +1062,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
@@ -0,0 +0,0 @@ public class CraftTrident extends CraftArrow implements Trident {
public EntityType getType() {
return EntityType.TRIDENT;
public String toString() {
return "CraftTrident";
}
+
+ // Paper start
@ -1092,7 +1093,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.TropicalFish.Pattern;

Datei anzeigen

@ -327,7 +327,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
@@ -0,0 +0,0 @@ public class CraftLlamaSpit extends AbstractProjectile implements LlamaSpit {
return EntityType.LLAMA_SPIT;
return "CraftLlamaSpit";
}
- @Override

Datei anzeigen

@ -60,9 +60,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Drowned;
import org.bukkit.entity.EntityType;
-public class CraftDrowned extends CraftZombie implements Drowned {
+public class CraftDrowned extends CraftZombie implements Drowned, com.destroystokyo.paper.entity.CraftRangedEntity<net.minecraft.world.entity.monster.Drowned> { // Paper
@ -73,8 +73,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Illusioner;
-public class CraftIllusioner extends CraftSpellcaster implements Illusioner {
@ -99,7 +99,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java b/src/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.entity.Piglin;
import org.bukkit.inventory.Inventory;
@ -112,7 +112,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java b/sr
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.entity.Pillager;
import org.bukkit.inventory.Inventory;
@ -125,8 +125,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.animal.SnowGolem;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Snowman;
-public class CraftSnowman extends CraftGolem implements Snowman {
@ -138,8 +138,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/m
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Witch;
-public class CraftWitch extends CraftRaider implements Witch {
@ -151,7 +151,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.boss.CraftBossBar;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Wither;

Datei anzeigen

@ -149,8 +149,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -0,0 +0,0 @@ public class CraftSlime extends CraftMob implements Slime, CraftEnemy {
public EntityType getType() {
return EntityType.SLIME;
public String toString() {
return "CraftSlime";
}
+
+ // Paper start

Datei anzeigen

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Fri, 10 Sep 2021 15:49:12 -0700
Subject: [PATCH] VanillaCommandWrapper didnt account for entity senders
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -0,0 +0,0 @@ public final class VanillaCommandWrapper extends BukkitCommand {
}
public static CommandSourceStack getListener(CommandSender sender) {
- if (sender instanceof Player) {
- return ((CraftPlayer) sender).getHandle().createCommandSourceStack();
+ // Paper start - account for other entity command senders
+ if (sender instanceof org.bukkit.craftbukkit.entity.CraftEntity craftEntity) {
+ return craftEntity.getHandle().createCommandSourceStack();
+ // Paper end
}
if (sender instanceof BlockCommandSender) {
return ((CraftBlockCommandSender) sender).getWrapper();

@ -1 +1 @@
Subproject commit d548daac2f99b1b570f9d229464f55d10d9a58b8
Subproject commit b76ceb4f5dbeeedb6e0cff3b4545779b137bc125

@ -1 +1 @@
Subproject commit b41c46db51ec4aca746def5ac9080ec319c4abdb
Subproject commit 94e187b577b93759e4f46e85c892049a6baa3bcc