2015-01-05 04:32:01 +01:00
From c3d3581a7451652d1808b50ad92de7c8e03746e9 Mon Sep 17 00:00:00 2001
2014-07-21 22:46:54 +02: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 23:30:52 +02:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2014-12-13 05:47:57 +01:00
index b4ad7d1..4c33f5a 100644
2014-08-25 23:30:52 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2014-12-13 05:47:57 +01:00
@@ -1626,4 +1626,14 @@ public final class CraftServer implements Server {
2014-08-25 23:30:52 +02:00
public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE;
}
+
+ private final Spigot spigot = new Spigot()
+ {
+
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
}
2014-07-21 22:46:54 +02:00
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
2014-12-19 00:33:08 +01:00
index 4ff9c1a..486a828 100644
2014-07-21 22:46:54 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
2014-12-19 00:33:08 +01:00
@@ -1347,4 +1347,14 @@ public class CraftWorld implements World {
2014-07-21 22:46:54 +02: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 02:17:45 +01:00
index dca8520..bf48e6e 100644
2014-07-21 22:46:54 +02: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-01-05 03:01:24 +01:00
index dee0d4e..9d1e3c3 100644
2014-07-21 22:46:54 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
2015-01-05 03:01:24 +01:00
@@ -535,4 +535,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setOp(boolean value) {
perm.setOp(value);
2014-07-21 22:46:54 +02:00
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
2014-11-28 02:17:45 +01: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 22:46:54 +02: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
2014-12-19 00:33:08 +01:00
index 6361b44..fed7b4d 100644
2014-07-21 22:46:54 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2014-12-19 00:33:08 +01:00
@@ -1313,4 +1313,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
2014-07-21 22:46:54 +02:00
}
2014-11-28 02:17:45 +01:00
collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged(null, "generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
2014-07-21 22:46:54 +02:00
}
+
+ // Spigot start
+ private final Player.Spigot spigot = new Player.Spigot()
+ {
+ };
+
+ public Player.Spigot spigot()
+ {
+ return spigot;
+ }
2014-08-25 23:30:52 +02: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
2014-12-19 00:33:08 +01:00
index 7ebb70b..e80fce2 100644
2014-08-25 23:30:52 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
2014-12-19 00:33:08 +01:00
@@ -713,4 +713,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
return HANDLED_TAGS;
2014-08-25 23:30:52 +02:00
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ @Override
+ public Spigot spigot()
+ {
+ return spigot;
+ }
2014-11-28 02:17:45 +01: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
index 7095f6d..c7d3657 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
@@ -58,4 +58,11 @@ final class CraftScore implements Score {
public CraftScoreboard getScoreboard() {
return objective.getScoreboard();
}
+
+ // Spigot start
+ @Override
+ public boolean isScoreSet() throws IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
2014-12-19 00:33:08 +01:00
index e8d1c08..ecbf66b 100644
2014-11-28 02:17:45 +01:00
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
2014-12-19 00:33:08 +01:00
@@ -188,4 +188,26 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
throw new IllegalArgumentException("Unknown visibility level " + visibility);
}
2014-11-28 02:17:45 +01:00
}
+
+ // Spigot start
+ @Override
+ public Set<String> getEntries() throws IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void addEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
2014-07-21 22:46:54 +02:00
+ // Spigot end
}
--
2014-11-28 02:17:45 +01:00
2.1.0
2014-07-21 22:46:54 +02:00