From 8de3a6a15d65f05af9bd6020b7f2fd4c19758ef7 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 15 May 2017 15:16:15 +1000 Subject: [PATCH] Skeleton API Implementations By: md_5 --- paper-api/src/main/java/org/bukkit/Bukkit.java | 5 +++++ paper-api/src/main/java/org/bukkit/Server.java | 9 +++++++++ paper-api/src/main/java/org/bukkit/World.java | 9 +++++++++ .../main/java/org/bukkit/command/CommandSender.java | 9 +++++++++ paper-api/src/main/java/org/bukkit/entity/Entity.java | 10 ++++++++++ .../main/java/org/bukkit/entity/LightningStrike.java | 10 ++++++++++ paper-api/src/main/java/org/bukkit/entity/Player.java | 10 ++++++++++ .../main/java/org/bukkit/inventory/meta/BookMeta.java | 9 +++++++++ 8 files changed, 71 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index 8b6c906f09..c7e38aee46 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -2175,4 +2175,9 @@ public final class Bukkit { public static UnsafeValues getUnsafe() { return server.getUnsafe(); } + + @NotNull + public static Server.Spigot spigot() { + return server.spigot(); + } } diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 41cbb3aee5..abd04d01c4 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -1852,4 +1852,13 @@ public interface Server extends PluginMessageRecipient { @Deprecated(since = "1.7.2") @NotNull UnsafeValues getUnsafe(); + + // Spigot start + public class Spigot { + + } + + @NotNull + Spigot spigot(); + // Spigot end } diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index dff198dd75..35c646366a 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -2828,6 +2828,15 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); + // Spigot start + public class Spigot { + + } + + @NotNull + Spigot spigot(); + // Spigot end + /** * Find the closest nearby location with a biome matching the provided * {@link Biome}(s). Finding biomes can, and will, block if the world is looking diff --git a/paper-api/src/main/java/org/bukkit/command/CommandSender.java b/paper-api/src/main/java/org/bukkit/command/CommandSender.java index a7a2587b4c..4b6b95404f 100644 --- a/paper-api/src/main/java/org/bukkit/command/CommandSender.java +++ b/paper-api/src/main/java/org/bukkit/command/CommandSender.java @@ -53,4 +53,13 @@ public interface CommandSender extends Permissible { */ @NotNull public String getName(); + + // Spigot start + public class Spigot { + + } + + @NotNull + Spigot spigot(); + // Spigot end } diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index b57969f153..a4cf548b5f 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -766,4 +766,14 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @NotNull @ApiStatus.Experimental Entity copy(@NotNull Location to); + + // Spigot start + public class Spigot extends CommandSender.Spigot { + + } + + @NotNull + @Override + Spigot spigot(); + // Spigot end } diff --git a/paper-api/src/main/java/org/bukkit/entity/LightningStrike.java b/paper-api/src/main/java/org/bukkit/entity/LightningStrike.java index 158ac20f81..d913298eaa 100644 --- a/paper-api/src/main/java/org/bukkit/entity/LightningStrike.java +++ b/paper-api/src/main/java/org/bukkit/entity/LightningStrike.java @@ -2,6 +2,7 @@ package org.bukkit.entity; import org.bukkit.GameEvent; import org.bukkit.enchantments.Enchantment; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** @@ -82,4 +83,13 @@ public interface LightningStrike extends Entity { */ public void setCausingPlayer(@Nullable Player player); + // Spigot start + public class Spigot extends Entity.Spigot { + + } + + @NotNull + @Override + Spigot spigot(); + // Spigot end } diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 3e044e1b48..da0ddce5de 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -2287,4 +2287,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @return whether the player allows server listings */ public boolean isAllowingServerListings(); + + // Spigot start + public class Spigot extends Entity.Spigot { + + } + + @NotNull + @Override + Spigot spigot(); + // Spigot end } diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/BookMeta.java index 1be27b04c5..8a01c92d77 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/meta/BookMeta.java +++ b/paper-api/src/main/java/org/bukkit/inventory/meta/BookMeta.java @@ -113,4 +113,13 @@ public interface BookMeta extends WritableBookMeta { @Override @NotNull BookMeta clone(); + + // Spigot start + public class Spigot { + + } + + @NotNull + Spigot spigot(); + // Spigot end }