2015-10-03 01:51:46 +00:00
From 3d3e6d4cc0b9781591c399fdd5a187fb21f06348 Mon Sep 17 00:00:00 2001
2014-07-21 20:46:54 +00:00
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.
2014-08-25 21:30:52 +00:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2015-08-07 05:34:06 +00:00
index 82a41b0..5377181 100644
2014-08-25 21:30:52 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2015-08-07 05:34:06 +00:00
@@ -1642,4 +1642,14 @@ public final class CraftServer implements Server {
2014-08-25 21:30:52 +00:00
public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE;
}
+
+ private final Spigot spigot = new Spigot()
+ {
+
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
}
2014-07-21 20:46:54 +00:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
2015-10-03 01:51:46 +00:00
index 2bbbdd3..ff01a2d 100644
2014-07-21 20:46:54 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
2015-07-10 12:33:16 +00:00
@@ -1380,4 +1380,14 @@ public class CraftWorld implements World {
2014-07-21 20:46:54 +00:00
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
2014-11-28 01:17:45 +00:00
index dca8520..bf48e6e 100644
2014-07-21 20:46:54 +00:00
--- 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
2015-10-03 01:51:46 +00:00
index 5693e3a..4c0ac67 100644
2014-07-21 20:46:54 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
2015-10-03 01:51:46 +00:00
@@ -538,4 +538,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2015-01-05 02:01:24 +00:00
public void setOp(boolean value) {
perm.setOp(value);
2014-07-21 20:46:54 +00:00
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
2014-11-28 01:17:45 +00:00
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
index 64e346d..243e8e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
@@ -27,4 +27,15 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike
public EntityType getType() {
return EntityType.LIGHTNING;
}
+
+ // Spigot start
+ private final LightningStrike.Spigot spigot = new LightningStrike.Spigot() {
+
+ };
+
+ @Override
+ public LightningStrike.Spigot spigot() {
+ return spigot;
+ }
2014-07-21 20:46:54 +00:00
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2015-07-23 20:43:27 +00:00
index 40f52f1..e823f72 100644
2014-07-21 20:46:54 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2015-07-23 20:43:27 +00:00
@@ -1340,4 +1340,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
2015-07-10 12:33:16 +00:00
PacketPlayOutTitle packetReset = new PacketPlayOutTitle(EnumTitleAction.RESET, null);
getHandle().playerConnection.sendPacket(packetReset);
2014-07-21 20:46:54 +00:00
}
+
+ // Spigot start
+ private final Player.Spigot spigot = new Player.Spigot()
+ {
+ };
+
+ public Player.Spigot spigot()
+ {
+ return spigot;
+ }
2014-08-25 21:30:52 +00:00
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
2015-07-23 20:43:27 +00:00
index 7c3adbb..e487d52 100644
2014-08-25 21:30:52 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
2015-07-23 20:43:27 +00:00
@@ -819,4 +819,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
2015-01-18 18:17:11 +00:00
return HANDLED_TAGS;
2014-12-18 23:33:08 +00:00
}
2014-08-25 21:30:52 +00:00
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ @Override
+ public Spigot spigot()
+ {
+ return spigot;
+ }
2014-11-28 01:17:45 +00:00
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
2015-01-16 23:12:14 +00:00
index d3ae91b..0b71b53 100644
2014-11-28 01:17:45 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
2015-01-16 23:12:14 +00:00
@@ -59,4 +59,11 @@ final class CraftScore implements Score {
2014-11-28 01:17:45 +00:00
public CraftScoreboard getScoreboard() {
return objective.getScoreboard();
}
+
+ // Spigot start
+ @Override
+ public boolean isScoreSet() throws IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Spigot end
2014-07-21 20:46:54 +00:00
}
--
2015-05-25 12:05:40 +00:00
2.1.4
2014-07-21 20:46:54 +00:00