mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Simplify getEntity by UUID patch, misc readme changes
This commit is contained in:
parent
a639c9b080
commit
59cc0a9834
3 changed files with 18 additions and 23 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,5 +33,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return SERVER;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
}
|
||||
--
|
Loading…
Reference in a new issue