mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
130 lines
4.4 KiB
Diff
130 lines
4.4 KiB
Diff
From c3f529b0c38959cca79017feac7bd3d312b647aa 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
|
|
|