mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 21:17:00 +01:00
5b4bc3081a
Upstream merge (we must go deeper) SpigotMC/Spigot@1e7bc383c3
89 lines
3.1 KiB
Diff
89 lines
3.1 KiB
Diff
From be8a0e8c5faf4bfda4034f4b9994e496d08cd159 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/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
|
|
}
|
|
--
|
|
1.9.1
|
|
|