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.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2013-06-02 15:10:56 +10:00
parent 02380b2f27
commit 6b0bae2fb6
9 changed files with 99 additions and 0 deletions

View file

@ -2559,4 +2559,16 @@ public final class CraftServer implements Server {
public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE;
}
// Spigot start
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
};
public org.bukkit.Server.Spigot spigot()
{
return this.spigot;
}
// Spigot end
}

View file

@ -2082,4 +2082,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
this.persistentDataContainer.putAll((CompoundTag) c);
}
}
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
{
};
public org.bukkit.World.Spigot spigot()
{
return this.spigot;
}
// Spigot end
}

View file

@ -132,4 +132,11 @@ public class ProxiedNativeCommandSender implements ProxiedCommandSender {
this.getCaller().setOp(value);
}
// Spigot start
@Override
public org.bukkit.command.CommandSender.Spigot spigot()
{
return this.getCaller().spigot();
}
// Spigot end
}

View file

@ -95,4 +95,16 @@ public abstract class ServerCommandSender implements CommandSender {
public void sendMessage(UUID uuid, String... messages) {
this.sendMessage(messages); // ServerCommandSenders have no use for senders
}
// Spigot start
private final org.bukkit.command.CommandSender.Spigot spigot = new org.bukkit.command.CommandSender.Spigot()
{
};
@Override
public org.bukkit.command.CommandSender.Spigot spigot()
{
return this.spigot;
}
// Spigot end
}

View file

@ -892,4 +892,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
return CraftEntity.perm;
}
// Spigot start
private final org.bukkit.entity.Entity.Spigot spigot = new org.bukkit.entity.Entity.Spigot()
{
};
public org.bukkit.entity.Entity.Spigot spigot()
{
return this.spigot;
}
// Spigot end
}

View file

@ -50,4 +50,15 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike
public String toString() {
return "CraftLightningStrike";
}
// Spigot start
private final LightningStrike.Spigot spigot = new LightningStrike.Spigot() {
};
@Override
public LightningStrike.Spigot spigot() {
return this.spigot;
}
// Spigot end
}

View file

@ -2338,4 +2338,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean isAllowingServerListings() {
return this.getHandle().allowsListing();
}
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()
{
};
public Player.Spigot spigot()
{
return this.spigot;
}
// Spigot end
}

View file

@ -246,6 +246,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
if (this.pages != null) {
meta.pages = new ArrayList<String>(this.pages);
}
meta.spigot = meta.new SpigotMeta(); // Spigot
return meta;
}
@ -286,4 +287,15 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
return builder;
}
// Spigot start
private BookMeta.Spigot spigot = new SpigotMeta();
private class SpigotMeta extends BookMeta.Spigot {
};
@Override
public BookMeta.Spigot spigot() {
return this.spigot;
}
// Spigot end
}

View file

@ -292,6 +292,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
if (this.pages != null) {
meta.pages = new ArrayList<Component>(this.pages);
}
meta.spigot = meta.new SpigotMeta(); // Spigot
return meta;
}
@ -364,4 +365,15 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
return builder;
}
// Spigot start
private BookMeta.Spigot spigot = new SpigotMeta();
private class SpigotMeta extends BookMeta.Spigot {
};
@Override
public BookMeta.Spigot spigot() {
return this.spigot;
}
// Spigot end
}