13
0
geforkt von Mirrors/Paper

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>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2013-06-02 15:10:56 +10:00
Ursprung 02380b2f27
Commit 6b0bae2fb6
9 geänderte Dateien mit 99 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -2559,4 +2559,16 @@ public final class CraftServer implements Server {
public UnsafeValues getUnsafe() { public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE; 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
} }

Datei anzeigen

@ -2082,4 +2082,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
this.persistentDataContainer.putAll((CompoundTag) c); 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
} }

Datei anzeigen

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

Datei anzeigen

@ -95,4 +95,16 @@ public abstract class ServerCommandSender implements CommandSender {
public void sendMessage(UUID uuid, String... messages) { public void sendMessage(UUID uuid, String... messages) {
this.sendMessage(messages); // ServerCommandSenders have no use for senders 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
} }

Datei anzeigen

@ -892,4 +892,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
} }
return CraftEntity.perm; 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
} }

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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