Simplify getEntity by UUID patch, misc readme changes

This commit is contained in:
Zach Brown 2016-06-09 21:43:32 -05:00
parent a639c9b080
commit 59cc0a9834
3 changed files with 18 additions and 23 deletions

View file

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

View file

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

View file

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