PaperMC/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch
Zach Brown c777f40058 Update from upstream SpigotMC
Add unbreakable API to item meta SpigotMC/Spigot@b1af008222
Configure how often EntityHangings calculate if they should die. SpigotMC/Spigot@ac6e1fc32d
Copy ItemStacks in DataWatcher to prevent ConcurrentModificationExcep… SpigotMC/Spigot@2af28ffbd1
Add the spigot.yml into the timings paste SpigotMC/Spigot@d61f38bd58

Note: This commit moves the entity-hanging tick into Spigot's spigot.yml and out of our paper.yml
2014-08-25 16:33:18 -05:00

129 lines
4.4 KiB
Diff

From c62ed982d5f63622bbb66073f7cd9ef1e06db535 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
This contains the basic, empty implementations for some Spigot-API extensions. They are included early in the patching progress so that compilation will still succeed midway despite the APIs only being provided by subsequent patches.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb0b342..1fb4eeb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1768,4 +1768,14 @@ public final class CraftServer implements Server {
public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE;
}
+
+ private final Spigot spigot = new Spigot()
+ {
+
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f4dec5b..7112c77 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1313,4 +1313,14 @@ public class CraftWorld implements World {
cps.queueUnload(chunk.locX, chunk.locZ);
}
}
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index 4f8d47d..09e7223 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -71,4 +71,15 @@ public class CraftArrow extends AbstractProjectile implements Arrow {
public void _INVALID_setShooter(LivingEntity shooter) {
getHandle().shooter = ((CraftLivingEntity) shooter).getHandle();
}
+
+ // Spigot start
+ private final Arrow.Spigot spigot = new Arrow.Spigot()
+ {
+ };
+
+ public Arrow.Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index b8a9a14..4198dae 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -402,4 +402,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().vehicle.getBukkitEntity();
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bbf310b..da0c78e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1287,4 +1287,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
}
+
+ // Spigot start
+ private final Player.Spigot spigot = new Player.Spigot()
+ {
+ };
+
+ public Player.Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index c9738c4..32d4a67 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -665,4 +665,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
public final String toString() {
return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ @Override
+ public Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
--
1.9.1