Simplify getEntity by UUID patch, misc readme changes

This commit is contained in:
Zach Brown 2016-06-09 21:43:32 -05:00
parent f4353accf6
commit b864322a18
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
3 changed files with 24 additions and 29 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

@ -1,34 +1,30 @@
From b6df18b98a522758e9c4e2633e66c6c19f9261ba Mon Sep 17 00:00:00 2001 From 1ad3298b70bd7775f2f4666f9981b07154a15a2c Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com> From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:20:11 -0500 Date: Wed, 30 Mar 2016 01:20:11 -0500
Subject: [PATCH] Add getEntity by UUID API Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4b60fed..5aaec82 100644 index 4b60fed..64868c0 100644
--- 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
@@ -1603,4 +1603,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1513,6 +1513,7 @@ 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) { @@ -1526,7 +1527,7 @@ 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 de45d8b..5cb0eba 100644 index de45d8b..5cb0eba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

View file

@ -1,4 +1,4 @@
From 1a88acf422cd4489b93e32ed7c0d00c8b28c2588 Mon Sep 17 00:00:00 2001 From 8a32b38e2c38a17e579d679bdb4a05ca6dc35b62 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400 Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton Subject: [PATCH] remove null possibility for getServer singleton
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1347ce2..6cc02d5 100644 index bfa6836..de67aca 100644
--- 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
@@ -54,6 +54,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -54,6 +54,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@ -25,7 +25,7 @@ index 1347ce2..6cc02d5 100644
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
this.e = proxy; this.e = proxy;
this.U = yggdrasilauthenticationservice; this.U = yggdrasilauthenticationservice;
@@ -1601,7 +1603,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1602,7 +1604,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// CraftBukkit start // CraftBukkit start
@Deprecated @Deprecated
public static MinecraftServer getServer() { public static MinecraftServer getServer() {
@ -33,7 +33,7 @@ index 1347ce2..6cc02d5 100644
+ return SERVER; + return SERVER;
} }
// CraftBukkit end // CraftBukkit end
}
-- --
2.8.3 2.8.3