13
0
geforkt von Mirrors/Paper

Simplify getEntity by UUID patch, misc readme changes

Dieser Commit ist enthalten in:
Zach Brown 2016-06-09 21:43:32 -05:00
Ursprung a639c9b080
Commit 59cc0a9834
3 geänderte Dateien mit 18 neuen und 23 gelöschten Zeilen

Datei anzeigen

@ -8,14 +8,13 @@ High performance Spigot fork that aims to fix gameplay and mechanics inconsisten
Documentation
------
Access the paper docs here: [paper.readthedocs.org](https://paper.readthedocs.org/)
Access the paper docs here: [paper.readthedocs.io](https://paper.readthedocs.io/)
How To (Server Admins)
------
Paperclip is a jar file that you can download and run just like a normal jar file.
Download a copy of Paperclip.jar from our buildserver here:
https://ci.destroystokyo.com/job/PaperSpigot/
Download a copy of paperclip.jar from [our build server, here](https://ci.destroystokyo.com/job/PaperSpigot/).
Run the Paperclip jar directly from your server. Just like old times

Datei anzeigen

@ -9,26 +9,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null;
this.Y = 0L;
}
// CraftBukkit end
+
+ // Paper start
+ public Entity getEntity(UUID uuid) {
+ Entity entity;
+ for (WorldServer world : worldServer) {
+ if (world == null) {
+ continue;
+ }
+ entity = world.getEntity(uuid);
+ if (entity != null && !entity.dead) {
+ return entity;
+ }
+ }
+ return null;
+ }
+ // Paper end
}
+ public Entity getEntity(UUID uuid) { return this.a(uuid); } // Paper - OBFHELPER
@Nullable
public Entity a(UUID uuid) {
WorldServer[] aworldserver = this.worldServer;
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
if (worldserver != null) {
Entity entity = worldserver.getEntity(uuid);
- if (entity != null) {
+ if (entity != null && entity.isAlive()) {
return entity;
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

Datei anzeigen

@ -33,5 +33,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return SERVER;
}
// CraftBukkit end
}
--