mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
196 lines
7.1 KiB
Diff
196 lines
7.1 KiB
Diff
From eccaca086e9cc6a04bb6469e0f3ec167f9121fee 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 fa1fe20..fb21e5b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1625,4 +1625,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 f20a040..17d24ce 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1323,4 +1323,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 dca8520..bf48e6e 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 b7e9d8f..4b26bb0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -436,4 +436,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
public boolean isCustomNameVisible() {
|
|
return getHandle().getCustomNameVisible();
|
|
}
|
|
+
|
|
+ // 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/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;
|
|
+ }
|
|
+ // 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 0f0e160..acd6a34 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1309,4 +1309,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
}
|
|
collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged(null, "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
|
|
}
|
|
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
|
|
index 8a640d3..e38d109 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
|
@@ -142,4 +142,26 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
|
|
scoreboard.teams.remove(team.getName());
|
|
setUnregistered();
|
|
}
|
|
+
|
|
+ // 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.");
|
|
+ }
|
|
+ // Spigot end
|
|
}
|
|
--
|
|
2.1.0
|
|
|