3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Update Upstream

Dieser Commit ist enthalten in:
Spottedleaf 2019-05-05 19:58:04 -07:00
Ursprung cb24079b77
Commit eeb2ecd789
348 geänderte Dateien mit 1661 neuen und 1710 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From b8ddb776d61410ee76eb2bad75c5f904ff8cce5d Mon Sep 17 00:00:00 2001 From eeda55e4929215bdae08f66dcbb3a4e9c02b3da3 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100 Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 75681af7..ec6e4d14 100644 index 0bc8d481..be4e1ca5 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -3,33 +3,29 @@ @@ -3,33 +3,29 @@
@ -33,12 +33,10 @@ index 75681af7..ec6e4d14 100644
<properties> <properties>
- <skipTests>true</skipTests> - <skipTests>true</skipTests>
- <maven.compiler.source>1.7</maven.compiler.source>
- <maven.compiler.target>1.7</maven.compiler.target>
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well --> + <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
+ <!-- Paper - #Logic --> + <!-- Paper - #Logic -->
+ <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>

Datei anzeigen

@ -1,4 +1,4 @@
From cf5ea1965af71c23c2baae43f99cabd273c82291 Mon Sep 17 00:00:00 2001 From 3cb74e805adf6ffb74f73fa3e55b7ad82e12c801 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600 Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -3416,7 +3416,7 @@ index 00000000..ca1893e9
+ +
+} +}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index b3d5a302..9d0ae63f 100644 index 81e4fa57..f020cb04 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand; @@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand;
@ -3436,15 +3436,15 @@ index b3d5a302..9d0ae63f 100644
} }
public void setFallbackCommands() { public void setFallbackCommands() {
@@ -64,6 +63,7 @@ public class SimpleCommandMap implements CommandMap { @@ -67,6 +66,7 @@ public class SimpleCommandMap implements CommandMap {
* {@inheritDoc}
*/ */
@Override
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) { public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
+ command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper + command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
label = label.toLowerCase(java.util.Locale.ENGLISH).trim(); label = label.toLowerCase(java.util.Locale.ENGLISH).trim();
fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim(); fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim();
boolean registered = register(label, command, false, fallbackPrefix); boolean registered = register(label, command, false, fallbackPrefix);
@@ -139,16 +139,22 @@ public class SimpleCommandMap implements CommandMap { @@ -143,16 +143,22 @@ public class SimpleCommandMap implements CommandMap {
return false; return false;
} }
@ -3731,10 +3731,10 @@ index 6023e4f6..00000000
- // Spigot end - // Spigot end
-} -}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 36a42a80..942cb386 100644 index 06762a69..4f8ae7a8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1565,6 +1565,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1566,6 +1566,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@ -3747,10 +3747,10 @@ index 36a42a80..942cb386 100644
@NotNull @NotNull
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 17ddbe61..47327376 100644 index f648c598..78a2d2f8 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -295,7 +295,6 @@ public final class SimplePluginManager implements PluginManager { @@ -297,7 +297,6 @@ public final class SimplePluginManager implements PluginManager {
} }
} }
@ -3758,7 +3758,7 @@ index 17ddbe61..47327376 100644
return result.toArray(new Plugin[result.size()]); return result.toArray(new Plugin[result.size()]);
} }
@@ -333,7 +332,7 @@ public final class SimplePluginManager implements PluginManager { @@ -336,7 +335,7 @@ public final class SimplePluginManager implements PluginManager {
if (result != null) { if (result != null) {
plugins.add(result); plugins.add(result);
@ -3767,16 +3767,16 @@ index 17ddbe61..47327376 100644
} }
return result; return result;
@@ -360,7 +359,7 @@ public final class SimplePluginManager implements PluginManager { @@ -364,7 +363,7 @@ public final class SimplePluginManager implements PluginManager {
*/ @Override
@Nullable @Nullable
public synchronized Plugin getPlugin(@NotNull String name) { public synchronized Plugin getPlugin(@NotNull String name) {
- return lookupNames.get(name.replace(' ', '_')); - return lookupNames.get(name.replace(' ', '_'));
+ return lookupNames.get(name.replace(' ', '_').toLowerCase(java.util.Locale.ENGLISH)); // Paper + return lookupNames.get(name.replace(' ', '_').toLowerCase(java.util.Locale.ENGLISH)); // Paper
} }
@NotNull @Override
@@ -562,7 +561,8 @@ public final class SimplePluginManager implements PluginManager { @@ -577,7 +576,8 @@ public final class SimplePluginManager implements PluginManager {
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled"); throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
} }
@ -3786,16 +3786,16 @@ index 17ddbe61..47327376 100644
getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
} else { } else {
getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
@@ -745,7 +745,7 @@ public final class SimplePluginManager implements PluginManager { @@ -774,7 +774,7 @@ public final class SimplePluginManager implements PluginManager {
}
@Override
public boolean useTimings() { public boolean useTimings() {
- return useTimings; - return useTimings;
+ return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot + return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot
} }
/** /**
@@ -754,6 +754,6 @@ public final class SimplePluginManager implements PluginManager { @@ -783,6 +783,6 @@ public final class SimplePluginManager implements PluginManager {
* @param use True if per event timing code should be used * @param use True if per event timing code should be used
*/ */
public void useTimings(boolean use) { public void useTimings(boolean use) {
@ -3804,7 +3804,7 @@ index 17ddbe61..47327376 100644
} }
} }
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 92983c1e..2618906f 100644 index 1173e433..82e379d1 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader { @@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader {
@ -3815,14 +3815,15 @@ index 92983c1e..2618906f 100644
/** /**
* This class was not meant to be constructed explicitly * This class was not meant to be constructed explicitly
@@ -298,26 +297,20 @@ public final class JavaPluginLoader implements PluginLoader { @@ -302,27 +301,21 @@ public final class JavaPluginLoader implements PluginLoader {
} }
} }
- final CustomTimingsHandler timings = new CustomTimingsHandler("Plugin: " + plugin.getDescription().getFullName() + " Event: " + listener.getClass().getName() + "::" + method.getName()+"("+eventClass.getSimpleName()+")", pluginParentTimer); // Spigot - final CustomTimingsHandler timings = new CustomTimingsHandler("Plugin: " + plugin.getDescription().getFullName() + " Event: " + listener.getClass().getName() + "::" + method.getName()+"("+eventClass.getSimpleName()+")", pluginParentTimer); // Spigot
- EventExecutor executor = new EventExecutor() { - EventExecutor executor = new EventExecutor() {
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
+ EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper + EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
@Override
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper + public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
try { try {
if (!eventClass.isAssignableFrom(event.getClass())) { if (!eventClass.isAssignableFrom(event.getClass())) {

Datei anzeigen

@ -1,14 +1,14 @@
From 2c1d58ff26be1c6623cbd2f598a03405037f262c Mon Sep 17 00:00:00 2001 From cc1651a5c0a8d62c0fb1a29399db2b32c398c080 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Mon, 29 Feb 2016 17:22:34 -0600 Date: Mon, 29 Feb 2016 17:22:34 -0600
Subject: [PATCH] Player affects spawning API Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 942cb386..ca0dda5a 100644 index 4f8ae7a8..329e2b01 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1455,6 +1455,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1456,6 +1456,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@NotNull @NotNull
public String getLocale(); public String getLocale();

Datei anzeigen

@ -1,14 +1,14 @@
From cd87ab89a8a26d08b1af14028c1040a8e78695dc Mon Sep 17 00:00:00 2001 From 8afe5fdd42c40fbe3abb9fbae80e154fd896f4d7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 17:50:31 -0600 Date: Mon, 29 Feb 2016 17:50:31 -0600
Subject: [PATCH] Entity Origin API Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index f948f1fc..fa7ab5af 100644 index 699c31d9..c8439d64 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -592,4 +592,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -606,4 +606,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@Override @Override
Spigot spigot(); Spigot spigot();
// Spigot end // Spigot end

Datei anzeigen

@ -1,14 +1,14 @@
From d04309c257669a7340b21f6947b503d54069c9a1 Mon Sep 17 00:00:00 2001 From 7b4710b297c3c73e4541edc5c71df4ccc6ca1fdd Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 18:05:37 -0600 Date: Mon, 29 Feb 2016 18:05:37 -0600
Subject: [PATCH] Add player view distance API Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ca0dda5a..801c7f01 100644 index 329e2b01..145c78c2 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1479,6 +1479,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1480,6 +1480,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void updateCommands(); public void updateCommands();

Datei anzeigen

@ -1,14 +1,14 @@
From 30d7c520cf0004c8629f7c085639785bb5d32146 Mon Sep 17 00:00:00 2001 From d52d23e3b9da885c5a0209ad2a8a00afb2d78b6c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 19:45:21 -0600 Date: Mon, 29 Feb 2016 19:45:21 -0600
Subject: [PATCH] Automatically disable plugins that fail to load Subject: [PATCH] Automatically disable plugins that fail to load
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 2618906f..85139364 100644 index 82e379d1..12601db6 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -339,6 +339,10 @@ public final class JavaPluginLoader implements PluginLoader { @@ -345,6 +345,10 @@ public final class JavaPluginLoader implements PluginLoader {
jPlugin.setEnabled(true); jPlugin.setEnabled(true);
} catch (Throwable ex) { } catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex); server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);

Datei anzeigen

@ -1,4 +1,4 @@
From 2221f63255840589b9c788e76bdac17218a66549 Mon Sep 17 00:00:00 2001 From 5208c701f3786837ca72f4973ebb238a47baa9fa Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 19:54:32 -0600 Date: Mon, 29 Feb 2016 19:54:32 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
@ -68,10 +68,10 @@ index c5435c42..246e081b 100644
* Gets the name of the update folder. The update folder is used to safely * Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load. * update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 801c7f01..fd88fd65 100644 index 145c78c2..bc4ec3f2 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -420,6 +420,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -421,6 +421,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);

Datei anzeigen

@ -1,4 +1,4 @@
From 1277d8b62c6c49ac4a32c7c5e0695b2f35e7aee8 Mon Sep 17 00:00:00 2001 From 930766c10632a6483c6a44cfc9c08564571e880a Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Mon, 29 Feb 2016 20:02:40 -0600 Date: Mon, 29 Feb 2016 20:02:40 -0600
Subject: [PATCH] Player Tab List and Title APIs Subject: [PATCH] Player Tab List and Title APIs
@ -384,7 +384,7 @@ index 00000000..4fe18540
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fd88fd65..1de43bd3 100644 index bc4ec3f2..abe00d72 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -396,7 +396,7 @@ index fd88fd65..1de43bd3 100644
import org.bukkit.Achievement; import org.bukkit.Achievement;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -450,6 +452,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -451,6 +453,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components); spigot().sendMessage(position, components);
} }

Datei anzeigen

@ -1,4 +1,4 @@
From d8a7d90df073f104820ab655dcf7d682a993361c Mon Sep 17 00:00:00 2001 From 4b0e39e1270afcb0a08bc1d74935aa363ee79c56 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:24:35 -0600 Date: Mon, 29 Feb 2016 20:24:35 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -462,7 +462,7 @@ index 00000000..5582999f
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 9d0ae63f..911d90fd 100644 index f020cb04..adfc7aae 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -8,6 +8,10 @@ import java.util.HashMap; @@ -8,6 +8,10 @@ import java.util.HashMap;
@ -476,7 +476,7 @@ index 9d0ae63f..911d90fd 100644
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Server; import org.bukkit.Server;
@@ -151,11 +155,14 @@ public class SimpleCommandMap implements CommandMap { @@ -155,11 +159,14 @@ public class SimpleCommandMap implements CommandMap {
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
} // target.timings.stopTiming(); // Spigot // Paper } // target.timings.stopTiming(); // Spigot // Paper
} catch (CommandException ex) { } catch (CommandException ex) {
@ -492,7 +492,7 @@ index 9d0ae63f..911d90fd 100644
} }
// return true as command was handled // return true as command was handled
@@ -230,7 +237,9 @@ public class SimpleCommandMap implements CommandMap { @@ -238,7 +245,9 @@ public class SimpleCommandMap implements CommandMap {
} catch (CommandException ex) { } catch (CommandException ex) {
throw ex; throw ex;
} catch (Throwable ex) { } catch (Throwable ex) {
@ -504,7 +504,7 @@ index 9d0ae63f..911d90fd 100644
} }
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 47327376..ef38b2af 100644 index 78a2d2f8..aa0c809a 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -19,6 +19,10 @@ import java.util.WeakHashMap; @@ -19,6 +19,10 @@ import java.util.WeakHashMap;
@ -518,7 +518,7 @@ index 47327376..ef38b2af 100644
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@@ -406,7 +410,8 @@ public final class SimplePluginManager implements PluginManager { @@ -414,7 +418,8 @@ public final class SimplePluginManager implements PluginManager {
try { try {
plugin.getPluginLoader().enablePlugin(plugin); plugin.getPluginLoader().enablePlugin(plugin);
} catch (Throwable ex) { } catch (Throwable ex) {
@ -528,7 +528,7 @@ index 47327376..ef38b2af 100644
} }
HandlerList.bakeAll(); HandlerList.bakeAll();
@@ -425,36 +430,48 @@ public final class SimplePluginManager implements PluginManager { @@ -435,36 +440,48 @@ public final class SimplePluginManager implements PluginManager {
try { try {
plugin.getPluginLoader().disablePlugin(plugin); plugin.getPluginLoader().disablePlugin(plugin);
} catch (Throwable ex) { } catch (Throwable ex) {
@ -579,10 +579,10 @@ index 47327376..ef38b2af 100644
+ } + }
+ // Paper end + // Paper end
+ +
@Override
public void clearPlugins() { public void clearPlugins() {
synchronized (this) { synchronized (this) {
disablePlugins(); @@ -531,7 +548,13 @@ public final class SimplePluginManager implements PluginManager {
@@ -519,7 +536,13 @@ public final class SimplePluginManager implements PluginManager {
)); ));
} }
} catch (Throwable ex) { } catch (Throwable ex) {

Datei anzeigen

@ -1,14 +1,14 @@
From 60daf9d1f89657b5556791c550ec6df03b501370 Mon Sep 17 00:00:00 2001 From 7cad905e5bb7ed63e6c95e8032c94dbc627d0ef3 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc> From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:47:27 -0600 Date: Sun, 25 Nov 2012 13:47:27 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 5427c99a..ab666fb9 100644 index 2dbb81c1..a62f10e2 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -467,4 +467,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -474,4 +474,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return collision status * @return collision status
*/ */
boolean isCollidable(); boolean isCollidable();

Datei anzeigen

@ -1,14 +1,14 @@
From 88916b54a083813d0732f1c63461a5eca90a93e5 Mon Sep 17 00:00:00 2001 From 2cfeb5e9e7efd65ad45b6155ce03e34197a25370 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 22:59:54 -0400 Date: Sat, 4 Apr 2015 22:59:54 -0400
Subject: [PATCH] Complete resource pack API Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1de43bd3..c237073a 100644 index abe00d72..eb2e392d 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1212,7 +1212,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1213,7 +1213,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The * @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value. * length restriction is an implementation specific arbitrary value.
@ -18,7 +18,7 @@ index 1de43bd3..c237073a 100644
public void setResourcePack(@NotNull String url); public void setResourcePack(@NotNull String url);
/** /**
@@ -1637,6 +1639,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1638,6 +1640,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void setViewDistance(int viewDistance); public void setViewDistance(int viewDistance);

Datei anzeigen

@ -1,4 +1,4 @@
From 2a1f662e39f99ea8f90a5391754df6d155ae0ffb Mon Sep 17 00:00:00 2001 From b3a2a2cac156b3ed3a36ba449e95547aced6dfb7 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 13:20:33 -0700 Date: Thu, 3 Mar 2016 13:20:33 -0700
Subject: [PATCH] Use ASM for event executors. Subject: [PATCH] Use ASM for event executors.
@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods. Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 81861781..2f68fba2 100644 index b7f7eeff..8f2730df 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -130,6 +130,17 @@ @@ -130,6 +130,17 @@
@ -412,14 +412,15 @@ index a850f078..9026e108 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 85139364..024d8393 100644 index 12601db6..06b6724f 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -297,20 +297,7 @@ public final class JavaPluginLoader implements PluginLoader { @@ -301,21 +301,7 @@ public final class JavaPluginLoader implements PluginLoader {
} }
} }
- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper - EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
- @Override
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper - public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
- try { - try {
- if (!eventClass.isAssignableFrom(event.getClass())) { - if (!eventClass.isAssignableFrom(event.getClass())) {

Datei anzeigen

@ -1,4 +1,4 @@
From 85e051d778411259e9b95ab5d4b292a4eeecdd46 Mon Sep 17 00:00:00 2001 From e94f385e9218282340bf014f7bee495fc6d28444 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com> From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:28:07 -0400 Date: Fri, 18 Mar 2016 03:28:07 -0400
Subject: [PATCH] Add command to reload permissions.yml and require confirm to Subject: [PATCH] Add command to reload permissions.yml and require confirm to
@ -85,10 +85,10 @@ index 50cc311b..c62da413 100644
} }
} }
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index ef38b2af..e4a0f938 100644 index aa0c809a..4cbec1f1 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -779,4 +779,13 @@ public final class SimplePluginManager implements PluginManager { @@ -808,4 +808,13 @@ public final class SimplePluginManager implements PluginManager {
public void useTimings(boolean use) { public void useTimings(boolean use) {
co.aikar.timings.Timings.setTimingsEnabled(use); // Paper co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
} }

Datei anzeigen

@ -1,11 +1,11 @@
From aad20b148458f6ddeb3712f30e7d8e86dfe6cbb4 Mon Sep 17 00:00:00 2001 From d00529ea428e96ea97364b8c2bc02c1681208fb6 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:05:21 -0400 Date: Sun, 21 Jun 2015 15:05:21 -0400
Subject: [PATCH] Custom replacement for eaten items Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
index ee0f95b1..864c0a9e 100644 index c2793f3e..373f4b5b 100644
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
@@ -22,6 +22,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable { @@ -22,6 +22,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
@ -43,9 +43,9 @@ index ee0f95b1..864c0a9e 100644
+ } + }
+ // Paper end + // Paper end
+ +
@Override
public boolean isCancelled() { public boolean isCancelled() {
return this.isCancelled; return this.isCancelled;
}
-- --
2.21.0 2.21.0

Datei anzeigen

@ -1,15 +1,15 @@
From 08e8906ba42e6a4c86d0ca56c9cb37f178885ab2 Mon Sep 17 00:00:00 2001 From 97f9cfc53d2559c942affd253a465f1c630d80ac Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 20 Mar 2016 06:44:49 -0400 Date: Sun, 20 Mar 2016 06:44:49 -0400
Subject: [PATCH] Access items by EquipmentSlot Subject: [PATCH] Access items by EquipmentSlot
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index ef55b146..eb71f01e 100644 index 88ce9dc6..96916ec9 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -214,4 +214,23 @@ public interface PlayerInventory extends Inventory { @@ -215,4 +215,23 @@ public interface PlayerInventory extends Inventory {
@Override
@Nullable @Nullable
public HumanEntity getHolder(); public HumanEntity getHolder();
+ +

Datei anzeigen

@ -1,17 +1,17 @@
From 96d6e1387e8ca6a7a772f8e1540481d71ace9089 Mon Sep 17 00:00:00 2001 From 0599f023061d1ef63c069dccc2477f24134e7ebc Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Fri, 4 Mar 2016 03:13:18 -0500 Date: Fri, 4 Mar 2016 03:13:18 -0500
Subject: [PATCH] Arrow pickup rule API Subject: [PATCH] Arrow pickup rule API
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
index 99f73a2b..b63f2fd9 100644 index 4460f6c9..a1990fef 100644
--- a/src/main/java/org/bukkit/entity/Arrow.java --- a/src/main/java/org/bukkit/entity/AbstractArrow.java
+++ b/src/main/java/org/bukkit/entity/Arrow.java +++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
@@ -149,4 +149,38 @@ public interface Arrow extends Projectile { @@ -111,4 +111,38 @@ public interface AbstractArrow extends Projectile {
@Override */
Spigot spigot(); CREATIVE_ONLY
// Spigot end }
+ +
+ // Paper start + // Paper start
+ /** + /**

Datei anzeigen

@ -1,4 +1,4 @@
From 81d25abccb60bfa3607c1a70719d61b1d57f5a52 Mon Sep 17 00:00:00 2001 From 58a3f2295b0e58314b33d6908388bef6920b11a5 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com> From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:34 -0700 Date: Sun, 16 Oct 2016 23:19:34 -0700
Subject: [PATCH] Add EntityZapEvent Subject: [PATCH] Add EntityZapEvent
@ -76,7 +76,7 @@ index 00000000..3b725a48
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
index 0074423f..0eaa8df9 100644 index 0e0ed93b..d3949edf 100644
--- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java --- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PigZapEvent.java +++ b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
@@ -2,6 +2,7 @@ package org.bukkit.event.entity; @@ -2,6 +2,7 @@ package org.bukkit.event.entity;
@ -105,7 +105,7 @@ index 0074423f..0eaa8df9 100644
this.bolt = bolt; this.bolt = bolt;
this.pigzombie = pigzombie; this.pigzombie = pigzombie;
} }
@@ -61,6 +62,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable { @@ -63,6 +64,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
return pigzombie; return pigzombie;
} }
@ -114,7 +114,7 @@ index 0074423f..0eaa8df9 100644
@NotNull @NotNull
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
@@ -71,4 +74,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable { @@ -73,4 +76,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 115bd301484371f6d9f6dfdec617abbe9df39f74 Mon Sep 17 00:00:00 2001 From 5054117d47392e633989f9732641c6833311ed4b Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com> From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:16:39 -0500 Date: Mon, 28 Nov 2016 10:16:39 -0500
Subject: [PATCH] Allow Reloading of Command Aliases Subject: [PATCH] Allow Reloading of Command Aliases
@ -56,10 +56,10 @@ index bd2c7a69..864c263b 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 911d90fd..8d352eeb 100644 index adfc7aae..460fda05 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -289,4 +289,11 @@ public class SimpleCommandMap implements CommandMap { @@ -297,4 +297,11 @@ public class SimpleCommandMap implements CommandMap {
} }
} }
} }

Datei anzeigen

@ -1,14 +1,14 @@
From e8135e116f16410a8b79c0520b4033553c3a237c Mon Sep 17 00:00:00 2001 From d094c6a2cdb1dba5073ba0a09f1cf523f06e2c47 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 20 Dec 2016 15:55:55 -0500 Date: Tue, 20 Dec 2016 15:55:55 -0500
Subject: [PATCH] Add String based Action Bar API Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c237073a..219556ed 100644 index eb2e392d..27ecae8b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -423,6 +423,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -424,6 +424,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);
// Paper start // Paper start
@ -35,7 +35,7 @@ index c237073a..219556ed 100644
/** /**
* Sends the component to the player * Sends the component to the player
* *
@@ -446,9 +466,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -447,9 +467,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends an array of components as a single message to the specified screen position of this player * Sends an array of components as a single message to the specified screen position of this player
* *
@ -47,7 +47,7 @@ index c237073a..219556ed 100644
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components); spigot().sendMessage(position, components);
} }
@@ -1781,9 +1803,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1782,9 +1804,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends the component to the specified screen position of this player * Sends the component to the specified screen position of this player
* *
@ -59,7 +59,7 @@ index c237073a..219556ed 100644
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@@ -1791,9 +1815,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1792,9 +1816,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends an array of components as a single message to the specified screen position of this player * Sends an array of components as a single message to the specified screen position of this player
* *

Datei anzeigen

@ -1,4 +1,4 @@
From 28f5e7081c337610bbb54fffccefa9665a1b814d Mon Sep 17 00:00:00 2001 From 60957aa5e1df382fd211eaaaa2fb9d063c499d75 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:23:03 -0500 Date: Sat, 7 Jan 2017 15:23:03 -0500
Subject: [PATCH] Provide E/TE/Chunk count stat methods Subject: [PATCH] Provide E/TE/Chunk count stat methods
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 05a82e4f..0e6dd6e1 100644 index 17b4f38d..80608e7a 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -37,6 +37,33 @@ import org.jetbrains.annotations.Nullable; @@ -38,6 +38,33 @@ import org.jetbrains.annotations.Nullable;
*/ */
public interface World extends PluginMessageRecipient, Metadatable { public interface World extends PluginMessageRecipient, Metadatable {

Datei anzeigen

@ -1,4 +1,4 @@
From edba48d35f93076c75eb85e2d5f502ec17832986 Mon Sep 17 00:00:00 2001 From a2729794b8cf80f90163f9a543708914876c6cf2 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:24 -0700 Date: Fri, 9 Jun 2017 07:24:24 -0700
Subject: [PATCH] Add configuration option to prevent player names from being Subject: [PATCH] Add configuration option to prevent player names from being
@ -46,10 +46,10 @@ index f248400e..2778ce92 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java
index 30597d30..6206ff44 100644 index 7f153000..1e126487 100644
--- a/src/main/java/org/bukkit/command/PluginCommand.java --- a/src/main/java/org/bukkit/command/PluginCommand.java
+++ b/src/main/java/org/bukkit/command/PluginCommand.java +++ b/src/main/java/org/bukkit/command/PluginCommand.java
@@ -150,6 +150,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo @@ -151,6 +151,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
} }
if (completions == null) { if (completions == null) {

Datei anzeigen

@ -1,4 +1,4 @@
From 811f1e098bd6192a850ab6b9ce5b121664628c21 Mon Sep 17 00:00:00 2001 From da832ecc767d55f84f4c25cd822496d474ca6077 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500 Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -21,10 +21,10 @@ index ffebffd8..f5e3929a 100644
*/ */
@Deprecated @Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0e6dd6e1..ac12a8fb 100644 index 80608e7a..d8d42c84 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1643,6 +1643,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1656,6 +1656,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles * @param count the number of particles
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -32,7 +32,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -1658,6 +1659,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1671,6 +1672,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles * @param count the number of particles
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -40,7 +40,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -1707,6 +1709,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1720,6 +1722,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis * @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -48,7 +48,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1726,6 +1729,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1739,6 +1742,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis * @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -56,7 +56,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1781,6 +1785,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1794,6 +1798,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed) * particle used (normally speed)
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -64,7 +64,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1802,6 +1807,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1815,6 +1820,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed) * particle used (normally speed)
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -72,7 +72,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1824,6 +1830,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1837,6 +1843,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended * @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of * range and encourage their client to render it regardless of
* settings * settings
@ -80,7 +80,7 @@ index 0e6dd6e1..ac12a8fb 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
@@ -1848,6 +1855,7 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1861,6 +1868,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended * @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of * range and encourage their client to render it regardless of
* settings * settings
@ -140,10 +140,10 @@ index 734f5ac7..5efa4e60 100644
*/ */
@Deprecated @Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 219556ed..c21785d5 100644 index 27ecae8b..c30f9791 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -438,7 +438,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -439,7 +439,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* *
* Use supplied alternative character to the section symbol to represent legacy color codes. * Use supplied alternative character to the section symbol to represent legacy color codes.
* *
@ -152,7 +152,7 @@ index 219556ed..c21785d5 100644
* @param message The message to send * @param message The message to send
*/ */
public void sendActionBar(char alternateChar, @NotNull String message); public void sendActionBar(char alternateChar, @NotNull String message);
@@ -505,6 +505,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -506,6 +506,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Update the subtitle of titles displayed to the player * Update the subtitle of titles displayed to the player
* *
@ -160,7 +160,7 @@ index 219556ed..c21785d5 100644
* @deprecated Use {@link #updateTitle(Title)} * @deprecated Use {@link #updateTitle(Title)}
*/ */
@Deprecated @Deprecated
@@ -513,6 +514,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -514,6 +515,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Update the subtitle of titles displayed to the player * Update the subtitle of titles displayed to the player
* *
@ -168,7 +168,7 @@ index 219556ed..c21785d5 100644
* @deprecated Use {@link #updateTitle(Title)} * @deprecated Use {@link #updateTitle(Title)}
*/ */
@Deprecated @Deprecated
@@ -521,6 +523,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -522,6 +524,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Show the given title to the player, along with the last subtitle set, using the last set times * Show the given title to the player, along with the last subtitle set, using the last set times
* *
@ -176,7 +176,7 @@ index 219556ed..c21785d5 100644
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/ */
@Deprecated @Deprecated
@@ -529,6 +532,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -530,6 +533,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Show the given title to the player, along with the last subtitle set, using the last set times * Show the given title to the player, along with the last subtitle set, using the last set times
* *
@ -184,7 +184,7 @@ index 219556ed..c21785d5 100644
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/ */
@Deprecated @Deprecated
@@ -1428,6 +1432,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1429,6 +1433,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param count the number of particles * @param count the number of particles
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -192,7 +192,7 @@ index 219556ed..c21785d5 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -1443,6 +1448,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1444,6 +1449,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param count the number of particles * @param count the number of particles
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -200,7 +200,7 @@ index 219556ed..c21785d5 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -1492,6 +1498,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1493,6 +1499,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis * @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -208,7 +208,7 @@ index 219556ed..c21785d5 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1511,6 +1518,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1512,6 +1519,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param offsetZ the maximum random offset on the Z axis * @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -216,7 +216,7 @@ index 219556ed..c21785d5 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1566,6 +1574,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1567,6 +1575,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed) * particle used (normally speed)
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -224,7 +224,7 @@ index 219556ed..c21785d5 100644
*/ */
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1587,6 +1596,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1588,6 +1597,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* particle used (normally speed) * particle used (normally speed)
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
@ -287,10 +287,10 @@ index 1ca8de5e..0dba5d01 100644
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot this(player, hostname, address, realAddress); // Spigot
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 8b901845..374fe364 100644 index 1b2267f4..1a58734d 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -76,7 +76,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable { @@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
* *
* @return Location the player moved to * @return Location the player moved to
*/ */

Datei anzeigen

@ -1,11 +1,11 @@
From d8be66ef36bc2d6b2a7581eeee0ccbe567ff0716 Mon Sep 17 00:00:00 2001 From 3d62f02e2b5e03a136cfc8ee51b88e42221fd595 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 May 2017 06:26:01 -0500 Date: Sun, 7 May 2017 06:26:01 -0500
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
index c7599116..5777d380 100644 index 951ea2cc..18d82c11 100644
--- a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
@@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull; @@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull;
@ -16,7 +16,7 @@ index c7599116..5777d380 100644
private boolean cancel = false; private boolean cancel = false;
private final int remaining; private final int remaining;
@@ -45,12 +46,34 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable { @@ -45,6 +46,27 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
return remaining; return remaining;
} }
@ -41,10 +41,11 @@ index c7599116..5777d380 100644
+ } + }
+ // Paper End + // Paper End
+ +
@Override
public boolean isCancelled() { public boolean isCancelled() {
return cancel; return cancel;
} @@ -53,6 +75,7 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
@Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
+ this.flyAtPlayer = !cancel; // Paper + this.flyAtPlayer = !cancel; // Paper

Datei anzeigen

@ -1,14 +1,14 @@
From 0c0dcf70779a634834277770a644ce513a240d5f Mon Sep 17 00:00:00 2001 From eba649f74129e9b960548a5f2bff478f385e979b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 15:04:51 -0400 Date: Sat, 17 Jun 2017 15:04:51 -0400
Subject: [PATCH] Shoulder Entities Release API Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index f76bc85c..037e2393 100644 index 6277f392..5b5fb303 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -331,6 +331,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -324,6 +324,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/ */
public int getExpToLevel(); public int getExpToLevel();

Datei anzeigen

@ -1,14 +1,14 @@
From e9cc77d6cf44ce00f1dd2c47535573e04eaf56dc Mon Sep 17 00:00:00 2001 From 2fca0ae8869cce83cf6c22fc95e0d6b8a9a9f17a Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 18 Jun 2017 18:17:05 -0500 Date: Sun, 18 Jun 2017 18:17:05 -0500
Subject: [PATCH] Entity#fromMobSpawner() Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index fa7ab5af..a1edcf02 100644 index c8439d64..35d0909b 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -603,5 +603,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -617,5 +617,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/ */
@Nullable @Nullable
Location getOrigin(); Location getOrigin();

Datei anzeigen

@ -1,4 +1,4 @@
From ae030eb68664e246e3610cd6e0b9eb66c7b75bc3 Mon Sep 17 00:00:00 2001 From 005245b4911271b4f13791ff70746dc694f9b531 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400 Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] ensureServerConversions API Subject: [PATCH] ensureServerConversions API
@ -29,10 +29,10 @@ index cbcbe8c8..8e602cf5 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7b709457..4ee01be5 100644 index bab86d80..44f3bec7 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -517,7 +517,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -518,7 +518,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
} }
} }
@ -41,7 +41,7 @@ index 7b709457..4ee01be5 100644
} }
/** /**
@@ -576,4 +576,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -577,4 +577,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
return true; return true;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 1083cf344326c8c77207bab66a92c2d06d4f9f7d Mon Sep 17 00:00:00 2001 From 5fee301aedb1cbdf582295f335c237a142e82865 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400 Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] Add getI18NDisplayName API Subject: [PATCH] Add getI18NDisplayName API
@ -29,10 +29,10 @@ index 8e602cf5..dca77bba 100644
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 4ee01be5..3ff3458e 100644 index 44f3bec7..9526cfe0 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -590,5 +590,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -591,5 +591,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
public ItemStack ensureServerConversions() { public ItemStack ensureServerConversions() {
return Bukkit.getServer().getItemFactory().ensureServerConversions(this); return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 686c76fc32425a5fd568cb11693f89c798055456 Mon Sep 17 00:00:00 2001 From 6fa61bcbd8768d7501dea34c48490992d4edc2a4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 9 Dec 2017 12:40:25 -0500 Date: Sat, 9 Dec 2017 12:40:25 -0500
Subject: [PATCH] Display warning on deprecated recipe API Subject: [PATCH] Display warning on deprecated recipe API
@ -10,24 +10,24 @@ on the players login.
Plugin authors need to define a key to keep it consistent between server restarts. Plugin authors need to define a key to keep it consistent between server restarts.
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
index 83c72eda..038ed0a6 100644 index d74b3114..d742c405 100644
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
@@ -24,6 +24,7 @@ public class ShapedRecipe implements Recipe, Keyed { @@ -25,6 +25,7 @@ public class ShapedRecipe implements Recipe, Keyed {
@Deprecated
public ShapedRecipe(@NotNull ItemStack result) { public ShapedRecipe(@NotNull ItemStack result) {
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
this.key = NamespacedKey.randomKey(); this.key = NamespacedKey.randomKey();
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
this.output = new ItemStack(result); this.output = new ItemStack(result);
} }
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
index ef28e75d..823645c5 100644 index 68447fb8..84062dd7 100644
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
@@ -25,6 +25,7 @@ public class ShapelessRecipe implements Recipe, Keyed { @@ -26,6 +26,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
@Deprecated
public ShapelessRecipe(@NotNull ItemStack result) { public ShapelessRecipe(@NotNull ItemStack result) {
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
this.key = NamespacedKey.randomKey(); this.key = NamespacedKey.randomKey();
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
this.output = new ItemStack(result); this.output = new ItemStack(result);

Datei anzeigen

@ -1,4 +1,4 @@
From 323d8fa0173c68391c1e828cdbf4ae6ee6cb555c Mon Sep 17 00:00:00 2001 From d9f8be3f0027a03340b60ccde44a253048eceeb7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 17:38:07 -0500 Date: Wed, 20 Dec 2017 17:38:07 -0500
Subject: [PATCH] Ability to apply mending to XP API Subject: [PATCH] Ability to apply mending to XP API
@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added. Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 247ed072..c7bc13e7 100644 index b90e211a..df1d3c78 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -946,12 +946,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -947,12 +947,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void resetPlayerWeather(); public void resetPlayerWeather();

Datei anzeigen

@ -1,4 +1,4 @@
From 35a4d7387a22fe69f696b54ea874cb44d6f77a06 Mon Sep 17 00:00:00 2001 From 17f04473ae82c2ae90cca24a5f7fce0bbb5855e8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 19 Jan 2018 00:29:28 -0500 Date: Fri, 19 Jan 2018 00:29:28 -0500
Subject: [PATCH] Add setPlayerProfile API for Skulls Subject: [PATCH] Add setPlayerProfile API for Skulls
@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
index 6325f583..27675ecd 100644 index 943d751f..a6914f01 100644
--- a/src/main/java/org/bukkit/block/Skull.java --- a/src/main/java/org/bukkit/block/Skull.java
+++ b/src/main/java/org/bukkit/block/Skull.java +++ b/src/main/java/org/bukkit/block/Skull.java
@@ -7,6 +7,7 @@ import org.bukkit.block.data.BlockData; @@ -7,6 +7,7 @@ import org.bukkit.block.data.BlockData;
@ -18,7 +18,7 @@ index 6325f583..27675ecd 100644
/** /**
* Represents a captured state of a skull block. * Represents a captured state of a skull block.
@@ -61,6 +62,20 @@ public interface Skull extends BlockState { @@ -61,6 +62,20 @@ public interface Skull extends TileState {
*/ */
public void setOwningPlayer(@NotNull OfflinePlayer player); public void setOwningPlayer(@NotNull OfflinePlayer player);
@ -40,7 +40,7 @@ index 6325f583..27675ecd 100644
* Gets the rotation of the skull in the world (or facing direction if this * Gets the rotation of the skull in the world (or facing direction if this
* is a wall mounted skull). * is a wall mounted skull).
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
index 1583764b..43cdc4c6 100644 index 35a39203..8b2465ea 100644
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java --- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
@@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 70fd2be258f2dfcc9c3a446c98afb383d5d52a10 Mon Sep 17 00:00:00 2001 From 088273d7cf7bf3be282254a2ba7686fbf9648ea0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:28:55 -0400 Date: Sun, 18 Mar 2018 12:28:55 -0400
Subject: [PATCH] Player.setPlayerProfile API Subject: [PATCH] Player.setPlayerProfile API
@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in. This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c7bc13e7..06154a5c 100644 index df1d3c78..8f87b165 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -17,7 +17,7 @@ index c7bc13e7..06154a5c 100644
import org.bukkit.Achievement; import org.bukkit.Achievement;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -1746,6 +1747,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1747,6 +1748,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/ */
boolean hasResourcePack(); boolean hasResourcePack();

Datei anzeigen

@ -1,14 +1,14 @@
From c9bb7666691300ce29eac6f766a5fe2c434504fc Mon Sep 17 00:00:00 2001 From 5ee5c9f828a151a39e2f0f715eb50582dd23560f Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu> From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 1 Apr 2018 02:28:43 +0300 Date: Sun, 1 Apr 2018 02:28:43 +0300
Subject: [PATCH] Add method to open already placed sign Subject: [PATCH] Add method to open already placed sign
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 037e2393..04f0e08f 100644 index 5b5fb303..cdbac95b 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -465,4 +465,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -458,4 +458,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/ */
@Deprecated @Deprecated
public void setShoulderEntityRight(@Nullable Entity entity); public void setShoulderEntityRight(@Nullable Entity entity);

Datei anzeigen

@ -1,4 +1,4 @@
From ee2733ccc823ea2e5ea9e376d81be2889c686ad9 Mon Sep 17 00:00:00 2001 From 5448fd27d7cab4be6ee7feed8c87aabfe2044a5c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 28 Apr 2018 10:28:50 -0400 Date: Sat, 28 Apr 2018 10:28:50 -0400
Subject: [PATCH] Add Ban Methods to Player Objects Subject: [PATCH] Add Ban Methods to Player Objects
@ -8,10 +8,10 @@ Allows a more logical API for banning players.
player.banPlayer("Breaking the rules"); player.banPlayer("Breaking the rules");
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index 11eedda6..aed01189 100644 index ffc8ad37..222a9a7b 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java --- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -42,6 +42,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @@ -44,6 +44,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* @return true if banned, otherwise false * @return true if banned, otherwise false
*/ */
public boolean isBanned(); public boolean isBanned();
@ -74,7 +74,7 @@ index 11eedda6..aed01189 100644
/** /**
* Checks if this player is whitelisted or not * Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 06154a5c..a840b49d 100644 index 8f87b165..214fe2d9 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1,10 +1,15 @@ @@ -1,10 +1,15 @@
@ -93,7 +93,7 @@ index 06154a5c..a840b49d 100644
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Instrument; import org.bukkit.Instrument;
@@ -424,6 +429,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -425,6 +430,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);
// Paper start // Paper start

Datei anzeigen

@ -1,4 +1,4 @@
From bc4ae922a5f161cda7df549eb4a3c49f6d3f3642 Mon Sep 17 00:00:00 2001 From 69b1739f71d3210dcf61ff3cdded512a9830b2dd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 17:55:28 -0400 Date: Mon, 30 Apr 2018 17:55:28 -0400
Subject: [PATCH] Additional world.getNearbyEntities API's Subject: [PATCH] Additional world.getNearbyEntities API's
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ac12a8fb..14f97491 100644 index d8d42c84..bcf5f8aa 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
@ -19,7 +19,7 @@ index ac12a8fb..14f97491 100644
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -484,6 +487,256 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -497,6 +500,256 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull @NotNull
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes); public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);

Datei anzeigen

@ -1,18 +1,18 @@
From efd52e4dee3ebc0d26304f02ce2e7ac55a834e96 Mon Sep 17 00:00:00 2001 From d13ee63c08c1eab492e1863506f5882e9d18c061 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 19:27:31 -0400 Date: Mon, 30 Apr 2018 19:27:31 -0400
Subject: [PATCH] Location.isChunkLoaded() API Subject: [PATCH] Location.isChunkLoaded() API
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 39e57fe1..5c6e25c8 100644 index 44e3bca6..6021e672 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -505,6 +505,7 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -533,6 +533,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
return this; return this;
} }
+ public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper + public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) { if (obj == null) {

Datei anzeigen

@ -1,4 +1,4 @@
From 4600136f94cf51d9d689734f45d66d7597262032 Mon Sep 17 00:00:00 2001 From ca26d707e4e2751c7adfdd7069089403b940fddd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 29 Aug 2017 23:58:48 -0400 Date: Tue, 29 Aug 2017 23:58:48 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -515,10 +515,10 @@ index 68cb7442..69aae30a 100644
* Options which can be applied to redstone dust particles - a particle * Options which can be applied to redstone dust particles - a particle
* color and size. * color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 14f97491..a709ac47 100644 index bcf5f8aa..28afb932 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2062,7 +2062,57 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -2075,7 +2075,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
* @param <T> Type * @param <T> Type
*/ */

Datei anzeigen

@ -1,4 +1,4 @@
From c81c54c9d585ac5c34aa58f474b32d44854bb8a4 Mon Sep 17 00:00:00 2001 From 11d55b78c68da025428c3e85a7bb0fef49112c82 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 May 2018 21:33:35 -0400 Date: Tue, 1 May 2018 21:33:35 -0400
Subject: [PATCH] Close Plugin Class Loaders on Disable Subject: [PATCH] Close Plugin Class Loaders on Disable
@ -53,14 +53,12 @@ index 41e26451..86cc5025 100644
* Gets a {@link Permission} from its fully qualified name * Gets a {@link Permission} from its fully qualified name
* *
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index e4a0f938..269bb5ca 100644 index 4cbec1f1..da3cd63b 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -418,17 +418,29 @@ public final class SimplePluginManager implements PluginManager { @@ -428,17 +428,28 @@ public final class SimplePluginManager implements PluginManager {
}
}
+ // Paper start - close Classloader on disable @Override
public void disablePlugins() { public void disablePlugins() {
+ disablePlugins(false); + disablePlugins(false);
+ } + }
@ -74,11 +72,12 @@ index e4a0f938..269bb5ca 100644
} }
} }
+ // Paper start - close Classloader on disable @Override
public void disablePlugin(@NotNull final Plugin plugin) { public void disablePlugin(@NotNull final Plugin plugin) {
+ disablePlugin(plugin, false); + disablePlugin(plugin, false);
+ } + }
+ +
+ @Override
+ public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) { + public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) {
+ // Paper end - close Classloader on disable + // Paper end - close Classloader on disable
if (plugin.isEnabled()) { if (plugin.isEnabled()) {
@ -88,8 +87,8 @@ index e4a0f938..269bb5ca 100644
} catch (Throwable ex) { } catch (Throwable ex) {
handlePluginException("Error occurred (in the plugin loader) while disabling " handlePluginException("Error occurred (in the plugin loader) while disabling "
+ plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
@@ -474,7 +486,7 @@ public final class SimplePluginManager implements PluginManager { @@ -485,7 +496,7 @@ public final class SimplePluginManager implements PluginManager {
@Override
public void clearPlugins() { public void clearPlugins() {
synchronized (this) { synchronized (this) {
- disablePlugins(); - disablePlugins();
@ -98,10 +97,10 @@ index e4a0f938..269bb5ca 100644
lookupNames.clear(); lookupNames.clear();
HandlerList.unregisterAll(); HandlerList.unregisterAll();
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 024d8393..ca29394d 100644 index 06b6724f..bc7bf6a3 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -327,7 +327,7 @@ public final class JavaPluginLoader implements PluginLoader { @@ -332,7 +332,7 @@ public final class JavaPluginLoader implements PluginLoader {
} catch (Throwable ex) { } catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex); server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
// Paper start - Disable plugins that fail to load // Paper start - Disable plugins that fail to load
@ -110,9 +109,9 @@ index 024d8393..ca29394d 100644
return; return;
// Paper end // Paper end
} }
@@ -339,6 +339,12 @@ public final class JavaPluginLoader implements PluginLoader { @@ -345,6 +345,12 @@ public final class JavaPluginLoader implements PluginLoader {
}
@Override
public void disablePlugin(@NotNull Plugin plugin) { public void disablePlugin(@NotNull Plugin plugin) {
+ // Paper start - close Classloader on disable + // Paper start - close Classloader on disable
+ disablePlugin(plugin, false); // Retain old behavior unless requested + disablePlugin(plugin, false); // Retain old behavior unless requested
@ -123,7 +122,7 @@ index 024d8393..ca29394d 100644
Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader"); Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
if (plugin.isEnabled()) { if (plugin.isEnabled()) {
@@ -365,6 +371,16 @@ public final class JavaPluginLoader implements PluginLoader { @@ -371,6 +377,16 @@ public final class JavaPluginLoader implements PluginLoader {
for (String name : names) { for (String name : names) {
removeClass(name); removeClass(name);
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 0701304bb671bd961643e7ff8510d97304f10307 Mon Sep 17 00:00:00 2001 From 08b2440a26eb1424573216f76e56d4c64423b8b6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 24 May 2018 21:01:13 -0400 Date: Thu, 24 May 2018 21:01:13 -0400
Subject: [PATCH] Location.toBlockLocation/toCenterLocation() Subject: [PATCH] Location.toBlockLocation/toCenterLocation()
@ -6,13 +6,13 @@ Subject: [PATCH] Location.toBlockLocation/toCenterLocation()
Convert location objects to their block coordinates, or the center of the block Convert location objects to their block coordinates, or the center of the block
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 5c6e25c8..34e90167 100644 index 6021e672..4f695faf 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -506,6 +506,31 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -534,6 +534,31 @@ public class Location implements Cloneable, ConfigurationSerializable {
} }
public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
+ +
+ // Paper start + // Paper start
+ /** + /**

Datei anzeigen

@ -1,4 +1,4 @@
From 669ab2ed43b68285e1add1c3bfb0a33493dacbdd Mon Sep 17 00:00:00 2001 From b78d7f7e912c656a7c9abbd6d62adcd19ed2783c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:59:50 -0400 Date: Tue, 5 Jun 2018 22:59:50 -0400
Subject: [PATCH] ItemStack#getMaxItemUseDuration Subject: [PATCH] ItemStack#getMaxItemUseDuration
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 3ff3458e..345dc8bd 100644 index 9526cfe0..f129121e 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -602,5 +602,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -603,5 +603,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
public String getI18NDisplayName() { public String getI18NDisplayName() {
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this); return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
} }

Datei anzeigen

@ -1,14 +1,14 @@
From 31cbc2b364b29e853ed7bac33e882dcc773d3c84 Mon Sep 17 00:00:00 2001 From 59f80990fb5676b49a1361460acc7b6e3d0e1842 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:17:39 -0500 Date: Sat, 16 Jun 2018 01:17:39 -0500
Subject: [PATCH] Make shield blocking delay configurable Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 49c79028..01c49322 100644 index 5ca11bb9..bf5d3096 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -490,5 +490,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -497,5 +497,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param arrows Number of arrows to stick in this entity * @param arrows Number of arrows to stick in this entity
*/ */
void setArrowsStuck(int arrows); void setArrowsStuck(int arrows);

Datei anzeigen

@ -1,14 +1,14 @@
From eec21f171a7518257567e49002a79e0eeea026ce Mon Sep 17 00:00:00 2001 From d4a8bae91bcb848e431f81908a7d149d6cc87e62 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 18 Jun 2018 00:41:46 -0500 Date: Mon, 18 Jun 2018 00:41:46 -0500
Subject: [PATCH] Add "getNearbyXXX" methods to Location Subject: [PATCH] Add "getNearbyXXX" methods to Location
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 34e90167..f3ae58ee 100644 index 4f695faf..5730d5f4 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -9,6 +9,15 @@ import org.bukkit.util.Vector; @@ -12,6 +12,15 @@ import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -24,7 +24,7 @@ index 34e90167..f3ae58ee 100644
/** /**
* Represents a 3-dimensional position in a world. * Represents a 3-dimensional position in a world.
* <br> * <br>
@@ -530,6 +539,246 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -558,6 +567,248 @@ public class Location implements Cloneable, ConfigurationSerializable {
centerLoc.setZ(getBlockZ() + 0.5); centerLoc.setZ(getBlockZ() + 0.5);
return centerLoc; return centerLoc;
} }
@ -41,6 +41,7 @@ index 34e90167..f3ae58ee 100644
+ */ + */
+ @NotNull + @NotNull
+ public Collection<Entity> getNearbyEntities(double x, double y, double z) { + public Collection<Entity> getNearbyEntities(double x, double y, double z) {
+ World world = this.getWorld();
+ if (world == null) { + if (world == null) {
+ throw new IllegalArgumentException("Location has no world"); + throw new IllegalArgumentException("Location has no world");
+ } + }
@ -263,6 +264,7 @@ index 34e90167..f3ae58ee 100644
+ */ + */
+ @NotNull + @NotNull
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(@Nullable Class<? extends Entity> clazz, double xRadius, double yRadius, double zRadius, @Nullable Predicate<T> predicate) { + public <T extends Entity> Collection<T> getNearbyEntitiesByType(@Nullable Class<? extends Entity> clazz, double xRadius, double yRadius, double zRadius, @Nullable Predicate<T> predicate) {
+ World world = this.getWorld();
+ if (world == null) { + if (world == null) {
+ throw new IllegalArgumentException("Location has no world"); + throw new IllegalArgumentException("Location has no world");
+ } + }

Datei anzeigen

@ -1,4 +1,4 @@
From 6014a368344b93d8a67207acca5dce642311dd2b Mon Sep 17 00:00:00 2001 From 2715b1aea34fcc2ac427535cba59a5f43bcfafe5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:24:42 -0500 Date: Tue, 19 Dec 2017 16:24:42 -0500
Subject: [PATCH] Expand Explosions API Subject: [PATCH] Expand Explosions API
@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index f3ae58ee..b5a6ac16 100644 index 5730d5f4..b226d7e4 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -4,6 +4,7 @@ import java.util.HashMap; @@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.configuration.serialization.ConfigurationSerializable;
@ -17,7 +17,7 @@ index f3ae58ee..b5a6ac16 100644
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@@ -540,6 +541,87 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -568,6 +569,87 @@ public class Location implements Cloneable, ConfigurationSerializable {
return centerLoc; return centerLoc;
} }
@ -30,7 +30,7 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(float power) { + public boolean createExplosion(float power) {
+ return world.createExplosion(this, power); + return this.getWorld().createExplosion(this, power);
+ } + }
+ +
+ /** + /**
@ -44,7 +44,7 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(float power, boolean setFire) { + public boolean createExplosion(float power, boolean setFire) {
+ return world.createExplosion(this, power, setFire); + return this.getWorld().createExplosion(this, power, setFire);
+ } + }
+ +
+ /** + /**
@ -57,7 +57,7 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(float power, boolean setFire, boolean breakBlocks) { + public boolean createExplosion(float power, boolean setFire, boolean breakBlocks) {
+ return world.createExplosion(this, power, setFire, breakBlocks); + return this.getWorld().createExplosion(this, power, setFire, breakBlocks);
+ } + }
+ +
+ /** + /**
@ -70,7 +70,7 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(@Nullable Entity source, float power) { + public boolean createExplosion(@Nullable Entity source, float power) {
+ return world.createExplosion(source, this, power, true, true); + return this.getWorld().createExplosion(source, this, power, true, true);
+ } + }
+ +
+ /** + /**
@ -85,7 +85,7 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(@Nullable Entity source, float power, boolean setFire) { + public boolean createExplosion(@Nullable Entity source, float power, boolean setFire) {
+ return world.createExplosion(source, this, power, setFire, true); + return this.getWorld().createExplosion(source, this, power, setFire, true);
+ } + }
+ +
+ /** + /**
@ -99,17 +99,17 @@ index f3ae58ee..b5a6ac16 100644
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) { + public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) {
+ return world.createExplosion(source, source.getLocation(), power, setFire, breakBlocks); + return this.getWorld().createExplosion(source, source.getLocation(), power, setFire, breakBlocks);
+ } + }
+ +
/** /**
* Returns a list of entities within a bounding box centered around a Location. * Returns a list of entities within a bounding box centered around a Location.
* *
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index a709ac47..9579437b 100644 index 28afb932..eb5860b2 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1188,6 +1188,102 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1201,6 +1201,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/ */
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);

Datei anzeigen

@ -1,11 +1,11 @@
From 99b83c34aed53dcef145a8e02978b84778915778 Mon Sep 17 00:00:00 2001 From 271d50401e6ae6ba853ae96a2c4172ab8d488435 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 22 Jun 2018 22:59:18 -0400 Date: Fri, 22 Jun 2018 22:59:18 -0400
Subject: [PATCH] ItemStack API additions for quantity/flags/lore Subject: [PATCH] ItemStack API additions for quantity/flags/lore
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7a4ace35..72e268c1 100644 index f129121e..690abbba 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -2,7 +2,9 @@ package org.bukkit.inventory; @@ -2,7 +2,9 @@ package org.bukkit.inventory;
@ -18,7 +18,7 @@ index 7a4ace35..72e268c1 100644
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
@@ -610,5 +612,140 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -611,5 +613,140 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
// Requires access to NMS // Requires access to NMS
return ensureServerConversions().getMaxItemUseDuration(); return ensureServerConversions().getMaxItemUseDuration();
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 2c5fc6a638f23f4ca9017d194449797b14f00aab Mon Sep 17 00:00:00 2001 From b6f3ff57144a35d024fca8213f71837add1b235e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:19:19 -0400 Date: Fri, 29 Jun 2018 00:19:19 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 01c49322..95567daa 100644 index bf5d3096..7322bf6d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -10,6 +10,7 @@ import org.bukkit.World; @@ -10,6 +10,7 @@ import org.bukkit.World;
@ -17,7 +17,7 @@ index 01c49322..95567daa 100644
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.bukkit.projectiles.ProjectileSource; import org.bukkit.projectiles.ProjectileSource;
@@ -504,5 +505,32 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -511,5 +512,32 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param delay Delay in ticks * @param delay Delay in ticks
*/ */
void setShieldBlockingDelay(int delay); void setShieldBlockingDelay(int delay);

Datei anzeigen

@ -1,14 +1,14 @@
From 50730348c82fbebf291c65472b8882a41687005d Mon Sep 17 00:00:00 2001 From e4492ea2ddcebc431c20d0933e4dc7f85090695d Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de> From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:07:16 +0200 Date: Tue, 3 Jul 2018 16:07:16 +0200
Subject: [PATCH] Add World.getEntity(UUID) API Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 9579437b..8d23ad74 100644 index eb5860b2..3f934c80 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -763,6 +763,17 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -776,6 +776,17 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull @NotNull
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z); public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);

Datei anzeigen

@ -1,4 +1,4 @@
From cf05fa82929aff70c3a6a4a14b66391338dbc359 Mon Sep 17 00:00:00 2001 From bd1d9bcc76034a9cdbe655d37b0d55e85af9a520 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:25:48 -0400 Date: Wed, 4 Jul 2018 02:25:48 -0400
Subject: [PATCH] Entity#getChunk API Subject: [PATCH] Entity#getChunk API
@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
Get the chunk the entity is currently registered to Get the chunk the entity is currently registered to
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index a1edcf02..9391bbf0 100644 index 35d0909b..adca48f1 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -17,7 +17,7 @@ index a1edcf02..9391bbf0 100644
import org.bukkit.EntityEffect; import org.bukkit.EntityEffect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Nameable; import org.bukkit.Nameable;
@@ -610,5 +611,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -624,5 +625,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @return True if entity spawned from a mob spawner * @return True if entity spawned from a mob spawner
*/ */
boolean fromMobSpawner(); boolean fromMobSpawner();

Datei anzeigen

@ -1,4 +1,4 @@
From 53f3e607544800706ae1f1f01b6a6f292acb6fa6 Mon Sep 17 00:00:00 2001 From 0e5e339e31b65bd94e6a94af1d69b504aa59c177 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 19 Jul 2018 15:07:02 -0500 Date: Thu, 19 Jul 2018 15:07:02 -0500
Subject: [PATCH] Add an asterisk to legacy API plugins Subject: [PATCH] Add an asterisk to legacy API plugins
@ -42,10 +42,10 @@ index d4e74d29..6cfd9f3c 100644
StringBuilder pluginList = new StringBuilder(); StringBuilder pluginList = new StringBuilder();
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index ca29394d..ed7455c3 100644 index bc7bf6a3..31a70b29 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -311,7 +311,14 @@ public final class JavaPluginLoader implements PluginLoader { @@ -316,7 +316,14 @@ public final class JavaPluginLoader implements PluginLoader {
Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader"); Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
if (!plugin.isEnabled()) { if (!plugin.isEnabled()) {

Datei anzeigen

@ -1,4 +1,4 @@
From b37d200e4fc162202173c684bbba942d197bc032 Mon Sep 17 00:00:00 2001 From c807a2cd2c5ce27ece6532433232f8391a84edbe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 25 Jul 2018 01:36:07 -0400 Date: Wed, 25 Jul 2018 01:36:07 -0400
Subject: [PATCH] Expand Location Manipulation API Subject: [PATCH] Expand Location Manipulation API
@ -6,11 +6,11 @@ Subject: [PATCH] Expand Location Manipulation API
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z); Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index b5a6ac16..8e444f7f 100644 index b226d7e4..884862ab 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -518,6 +518,54 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -546,6 +546,54 @@ public class Location implements Cloneable, ConfigurationSerializable {
public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
// Paper start // Paper start
+ +

Datei anzeigen

@ -1,4 +1,4 @@
From efab2286b27530bc51746d79927a19d4b75d0777 Mon Sep 17 00:00:00 2001 From 79eb3b353f5f8e4b7f237675a59c0b8139499da3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 00:32:05 -0400 Date: Sun, 9 Sep 2018 00:32:05 -0400
Subject: [PATCH] Remove deadlock risk in firing async events Subject: [PATCH] Remove deadlock risk in firing async events
@ -16,12 +16,12 @@ which results in a hard crash.
This change removes the synchronize and adds some protection around enable/disable This change removes the synchronize and adds some protection around enable/disable
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 9391bbf0..5098eade 100644 index adca48f1..2d3cee14 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable; @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
*/ */
public interface Entity extends Metadatable, CommandSender, Nameable { public interface Entity extends Metadatable, CommandSender, Nameable, PersistentDataHolder {
- /** - /**
+ /* + /*
@ -29,37 +29,37 @@ index 9391bbf0..5098eade 100644
* *
* @return a new copy of Location containing the position of this entity * @return a new copy of Location containing the position of this entity
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 269bb5ca..5d99a41a 100644 index da3cd63b..583f8ee4 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -391,7 +391,7 @@ public final class SimplePluginManager implements PluginManager { @@ -398,7 +398,7 @@ public final class SimplePluginManager implements PluginManager {
* @param plugin Plugin to check
* @return true if the plugin is enabled, otherwise false * @return true if the plugin is enabled, otherwise false
*/ */
@Override
- public boolean isPluginEnabled(@Nullable Plugin plugin) { - public boolean isPluginEnabled(@Nullable Plugin plugin) {
+ public synchronized boolean isPluginEnabled(@Nullable Plugin plugin) { // Paper - synchronize + public synchronized boolean isPluginEnabled(@Nullable Plugin plugin) { // Paper - synchronize
if ((plugin != null) && (plugins.contains(plugin))) { if ((plugin != null) && (plugins.contains(plugin))) {
return plugin.isEnabled(); return plugin.isEnabled();
} else { } else {
@@ -399,7 +399,7 @@ public final class SimplePluginManager implements PluginManager { @@ -407,7 +407,7 @@ public final class SimplePluginManager implements PluginManager {
}
} }
@Override
- public void enablePlugin(@NotNull final Plugin plugin) { - public void enablePlugin(@NotNull final Plugin plugin) {
+ public synchronized void enablePlugin(@NotNull final Plugin plugin) { // Paper - synchronize + public synchronized void enablePlugin(@NotNull final Plugin plugin) { // Paper - synchronize
if (!plugin.isEnabled()) { if (!plugin.isEnabled()) {
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin); List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
@@ -436,7 +436,7 @@ public final class SimplePluginManager implements PluginManager { @@ -445,7 +445,7 @@ public final class SimplePluginManager implements PluginManager {
disablePlugin(plugin, false);
} }
@Override
- public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) { - public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) {
+ public synchronized void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) { // Paper - synchronize + public synchronized void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) { // Paper - synchronize
// Paper end - close Classloader on disable // Paper end - close Classloader on disable
if (plugin.isEnabled()) { if (plugin.isEnabled()) {
try { try {
@@ -496,6 +496,7 @@ public final class SimplePluginManager implements PluginManager { @@ -506,6 +506,7 @@ public final class SimplePluginManager implements PluginManager {
defaultPerms.get(false).clear(); defaultPerms.get(false).clear();
} }
} }
@ -67,9 +67,9 @@ index 269bb5ca..5d99a41a 100644
/** /**
* Calls an event with the given details. * Calls an event with the given details.
@@ -505,25 +506,11 @@ public final class SimplePluginManager implements PluginManager { @@ -516,25 +517,11 @@ public final class SimplePluginManager implements PluginManager {
* @param event Event details
*/ */
@Override
public void callEvent(@NotNull Event event) { public void callEvent(@NotNull Event event) {
- if (event.isAsynchronous()) { - if (event.isAsynchronous()) {
- if (Thread.holdsLock(this)) { - if (Thread.holdsLock(this)) {
@ -97,7 +97,7 @@ index 269bb5ca..5d99a41a 100644
RegisteredListener[] listeners = handlers.getRegisteredListeners(); RegisteredListener[] listeners = handlers.getRegisteredListeners();
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
index 5e986de8..2b50fe63 100644 index 17dbe913..bae26ce7 100644
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java --- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java +++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
@@ -17,7 +17,7 @@ public class PluginManagerTest { @@ -17,7 +17,7 @@ public class PluginManagerTest {
@ -126,7 +126,7 @@ index 5e986de8..2b50fe63 100644
@Test @Test
public void testAsyncLocked() throws InterruptedException { public void testAsyncLocked() throws InterruptedException {
final Event event = new TestEvent(true); final Event event = new TestEvent(true);
@@ -123,7 +123,7 @@ public class PluginManagerTest { @@ -127,7 +127,7 @@ public class PluginManagerTest {
if (store.value == null) { if (store.value == null) {
throw new IllegalStateException("No exception thrown"); throw new IllegalStateException("No exception thrown");
} }

Datei anzeigen

@ -1,4 +1,4 @@
From b3c143f917ab08b168af452ef3687e79be91b829 Mon Sep 17 00:00:00 2001 From 5163c03359615886d54e6541ac60df07f0bb509d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Aug 2018 08:44:20 -0500 Date: Thu, 2 Aug 2018 08:44:20 -0500
Subject: [PATCH] Add hand to bucket events Subject: [PATCH] Add hand to bucket events
@ -30,7 +30,7 @@ index cdf2e201..5e93f1bb 100644
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
index d0ccba06..280ca87b 100644 index d2990a20..dfc76add 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java
@@ -5,6 +5,7 @@ import org.bukkit.block.Block; @@ -5,6 +5,7 @@ import org.bukkit.block.Block;
@ -79,9 +79,9 @@ index d0ccba06..280ca87b 100644
+ } + }
+ // Paper end + // Paper end
+ +
@Override
public boolean isCancelled() { public boolean isCancelled() {
return cancelled; return cancelled;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java b/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java
index cc1b03eb..15be7128 100644 index cc1b03eb..15be7128 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java

Datei anzeigen

@ -1,4 +1,4 @@
From dc43b4d369f3dd1705303fd1f9e3db0e0f78e8a9 Mon Sep 17 00:00:00 2001 From d8ab6185814520370886f17aa53e2cbe4cbeac13 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 4 Aug 2018 19:37:35 -0400 Date: Sat, 4 Aug 2018 19:37:35 -0400
Subject: [PATCH] Provide Chunk Coordinates as a Long API Subject: [PATCH] Provide Chunk Coordinates as a Long API
@ -44,10 +44,10 @@ index e583f86d..7302b6e3 100644
* Gets the world containing this chunk * Gets the world containing this chunk
* *
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 8d23ad74..7e245356 100644 index 3f934c80..dd0ab741 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -156,6 +156,22 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -157,6 +157,22 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull @NotNull
public Chunk getChunkAt(@NotNull Block block); public Chunk getChunkAt(@NotNull Block block);

Datei anzeigen

@ -1,4 +1,4 @@
From 87e727b0b52b60f2d73ecb218f54e6a170453355 Mon Sep 17 00:00:00 2001 From 52ee3c6a80ac54dc5ecd9a5518f008da2fb1d9fc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:43:33 -0600 Date: Mon, 29 Feb 2016 17:43:33 -0600
Subject: [PATCH] Async Chunks API Subject: [PATCH] Async Chunks API
@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
Also adds utility methods to Entity to teleport asynchronously. Also adds utility methods to Entity to teleport asynchronously.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 7e245356..99527eb5 100644 index dd0ab741..a06d7a0d 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -170,6 +170,358 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -171,6 +171,358 @@ public interface World extends PluginMessageRecipient, Metadatable {
public default Chunk getChunkAt(long chunkKey) { public default Chunk getChunkAt(long chunkKey) {
return getChunkAt((int) chunkKey, (int) (chunkKey >> 32)); return getChunkAt((int) chunkKey, (int) (chunkKey >> 32));
} }
@ -371,10 +371,10 @@ index 7e245356..99527eb5 100644
/** /**
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 5098eade..b0ba2d97 100644 index 2d3cee14..f41243f9 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -156,6 +156,30 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -157,6 +157,30 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/ */
public boolean teleport(@NotNull Entity destination, @NotNull TeleportCause cause); public boolean teleport(@NotNull Entity destination, @NotNull TeleportCause cause);

Datei anzeigen

@ -1,4 +1,4 @@
From 3b4d905bfd218550bf8a4c4aecb694af0b2ecd87 Mon Sep 17 00:00:00 2001 From 5c9c0c19bf8ed9ca04c795ad49f5ceeb04d505f7 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com> From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 14 Aug 2018 21:42:10 -0700 Date: Tue, 14 Aug 2018 21:42:10 -0700
Subject: [PATCH] Allow Blocks to be accessed via a long key Subject: [PATCH] Allow Blocks to be accessed via a long key
@ -18,10 +18,10 @@ Y range: [0, 1023]
X, Z range: [-67 108 864, 67 108 863] X, Z range: [-67 108 864, 67 108 863]
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 8e444f7f..e546407e 100644 index 884862ab..6dc39989 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -12,7 +12,6 @@ import org.jetbrains.annotations.Nullable; @@ -15,7 +15,6 @@ import org.jetbrains.annotations.Nullable;
// Paper start // Paper start
import java.util.Collection; import java.util.Collection;
@ -29,7 +29,7 @@ index 8e444f7f..e546407e 100644
import java.util.function.Predicate; import java.util.function.Predicate;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
@@ -577,6 +576,17 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -605,6 +604,17 @@ public class Location implements Cloneable, ConfigurationSerializable {
blockLoc.setZ(getBlockZ()); blockLoc.setZ(getBlockZ());
return blockLoc; return blockLoc;
} }
@ -48,10 +48,10 @@ index 8e444f7f..e546407e 100644
* @return A new location where X/Y/Z are the center of the block * @return A new location where X/Y/Z are the center of the block
*/ */
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 99527eb5..446d91c5 100644 index a06d7a0d..4d35efb0 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -87,6 +87,38 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -88,6 +88,38 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull @NotNull
public Block getBlockAt(@NotNull Location location); public Block getBlockAt(@NotNull Location location);

Datei anzeigen

@ -1,22 +1,23 @@
From 1ed95fc07f6d3e686f998625d821320a3419b70d Mon Sep 17 00:00:00 2001 From 4f3dd333bb40e8c41894462cb63dfde6cf8b9bf7 Mon Sep 17 00:00:00 2001
From: cswhite2000 <18whitechristop@gmail.com> From: cswhite2000 <18whitechristop@gmail.com>
Date: Tue, 21 Aug 2018 19:39:46 -0700 Date: Tue, 21 Aug 2018 19:39:46 -0700
Subject: [PATCH] isChunkGenerated API Subject: [PATCH] isChunkGenerated API
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index e546407e..7713f183 100644 index 6dc39989..4e69f277 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -1,5 +1,6 @@ @@ -3,6 +3,7 @@ package org.bukkit;
package org.bukkit; import com.google.common.base.Preconditions;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
+import com.google.common.base.Preconditions; // Paper +import com.google.common.base.Preconditions; // Paper
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@@ -517,6 +518,15 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -545,6 +546,16 @@ public class Location implements Cloneable, ConfigurationSerializable {
public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
// Paper start // Paper start
+ /** + /**
@ -25,6 +26,7 @@ index e546407e..7713f183 100644
+ * @return true if a chunk has been generated at this location + * @return true if a chunk has been generated at this location
+ */ + */
+ public boolean isGenerated() { + public boolean isGenerated() {
+ World world = this.getWorld();
+ Preconditions.checkNotNull(world, "Location has no world!"); + Preconditions.checkNotNull(world, "Location has no world!");
+ return world.isChunkGenerated(locToBlock(x) >> 4, locToBlock(z) >> 4); + return world.isChunkGenerated(locToBlock(x) >> 4, locToBlock(z) >> 4);
+ } + }
@ -32,10 +34,10 @@ index e546407e..7713f183 100644
/** /**
* Sets the position of this Location and returns itself * Sets the position of this Location and returns itself
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 446d91c5..dd51aa31 100644 index 4d35efb0..150c5af2 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -203,6 +203,17 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -204,6 +204,17 @@ public interface World extends PluginMessageRecipient, Metadatable {
return getChunkAt((int) chunkKey, (int) (chunkKey >> 32)); return getChunkAt((int) chunkKey, (int) (chunkKey >> 32));
} }

Datei anzeigen

@ -1,14 +1,14 @@
From cbd89dbe5d6252a902de32354206aae74b67febb Mon Sep 17 00:00:00 2001 From fba7db1aa8b007220c83722f68f22983be3dd7de Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Tue, 4 Sep 2018 15:01:54 -0500 Date: Tue, 4 Sep 2018 15:01:54 -0500
Subject: [PATCH] Expose attack cooldown methods for Player Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a840b49d..1b3a6a91 100644 index 214fe2d9..024528ba 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1922,6 +1922,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1923,6 +1923,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use * @param profile The new profile to use
*/ */
void setPlayerProfile(@NotNull PlayerProfile profile); void setPlayerProfile(@NotNull PlayerProfile profile);

Datei anzeigen

@ -1,4 +1,4 @@
From 311e3db15fe2f389a63eb03558ecfd021bfae7e4 Mon Sep 17 00:00:00 2001 From e98c081f8db91bfe12856621b2bd9446ad518c76 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu> From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:35 +0300 Date: Wed, 12 Sep 2018 18:53:35 +0300
Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values
@ -226,10 +226,10 @@ index f5e3929a..8648e8fb 100644
return key; return key;
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index f6a7f97b..d040a740 100644 index d0e4c8ee..d0221b29 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -417,4 +417,86 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { @@ -421,4 +421,86 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@NotNull @NotNull
Spigot spigot(); Spigot spigot();
// Spigot end // Spigot end

Datei anzeigen

@ -1,4 +1,4 @@
From de095cece28d722865a1b8daf50cead1d26bb254 Mon Sep 17 00:00:00 2001 From 92e63fa41726779b8e2673b1ebd5435b8fc954b7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 13 Sep 2018 20:51:50 -0400 Date: Thu, 13 Sep 2018 20:51:50 -0400
Subject: [PATCH] Performance & Concurrency Improvements to Permissions Subject: [PATCH] Performance & Concurrency Improvements to Permissions
@ -18,10 +18,10 @@ Optimized it to simply be a single get call cutting permission map
lookups in half. lookups in half.
diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java
index 27c14c0f..72fff64e 100644 index 497775f7..c94e4cdb 100644
--- a/src/main/java/org/bukkit/permissions/PermissibleBase.java --- a/src/main/java/org/bukkit/permissions/PermissibleBase.java
+++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java +++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java
@@ -70,8 +70,11 @@ public class PermissibleBase implements Permissible { @@ -75,8 +75,11 @@ public class PermissibleBase implements Permissible {
String name = inName.toLowerCase(java.util.Locale.ENGLISH); String name = inName.toLowerCase(java.util.Locale.ENGLISH);
@ -35,7 +35,7 @@ index 27c14c0f..72fff64e 100644
} else { } else {
Permission perm = Bukkit.getServer().getPluginManager().getPermission(name); Permission perm = Bukkit.getServer().getPluginManager().getPermission(name);
@@ -90,14 +93,17 @@ public class PermissibleBase implements Permissible { @@ -96,15 +99,18 @@ public class PermissibleBase implements Permissible {
String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH); String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH);
@ -50,60 +50,61 @@ index 27c14c0f..72fff64e 100644
return perm.getDefault().getValue(isOp()); return perm.getDefault().getValue(isOp());
} }
@Override
@NotNull @NotNull
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) { - public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) {
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) { // Paper - synchronized + public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) { // Paper - synchronized
if (name == null) { if (name == null) {
throw new IllegalArgumentException("Permission name cannot be null"); throw new IllegalArgumentException("Permission name cannot be null");
} else if (plugin == null) { } else if (plugin == null) {
@@ -115,7 +121,7 @@ public class PermissibleBase implements Permissible { @@ -123,7 +129,7 @@ public class PermissibleBase implements Permissible {
}
@Override
@NotNull @NotNull
- public PermissionAttachment addAttachment(@NotNull Plugin plugin) { - public PermissionAttachment addAttachment(@NotNull Plugin plugin) {
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin) { // Paper - synchronized + public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin) { // Paper - synchronized
if (plugin == null) { if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null"); throw new IllegalArgumentException("Plugin cannot be null");
} else if (!plugin.isEnabled()) { } else if (!plugin.isEnabled()) {
@@ -130,7 +136,7 @@ public class PermissibleBase implements Permissible { @@ -139,7 +145,7 @@ public class PermissibleBase implements Permissible {
return result;
} }
@Override
- public void removeAttachment(@NotNull PermissionAttachment attachment) { - public void removeAttachment(@NotNull PermissionAttachment attachment) {
+ public synchronized void removeAttachment(@NotNull PermissionAttachment attachment) { // Paper - synchronized + public synchronized void removeAttachment(@NotNull PermissionAttachment attachment) { // Paper - synchronized
if (attachment == null) { if (attachment == null) {
throw new IllegalArgumentException("Attachment cannot be null"); throw new IllegalArgumentException("Attachment cannot be null");
} }
@@ -149,7 +155,7 @@ public class PermissibleBase implements Permissible { @@ -159,7 +165,7 @@ public class PermissibleBase implements Permissible {
}
} }
@Override
- public void recalculatePermissions() { - public void recalculatePermissions() {
+ public synchronized void recalculatePermissions() { // Paper - synchronized + public synchronized void recalculatePermissions() { // Paper - synchronized
clearPermissions(); clearPermissions();
Set<Permission> defaults = Bukkit.getServer().getPluginManager().getDefaultPermissions(isOp()); Set<Permission> defaults = Bukkit.getServer().getPluginManager().getDefaultPermissions(isOp());
Bukkit.getServer().getPluginManager().subscribeToDefaultPerms(isOp(), parent); Bukkit.getServer().getPluginManager().subscribeToDefaultPerms(isOp(), parent);
@@ -197,7 +203,7 @@ public class PermissibleBase implements Permissible { @@ -208,7 +214,7 @@ public class PermissibleBase implements Permissible {
}
@Override
@Nullable @Nullable
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) { - public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) {
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) { // Paper + public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) { // Paper
if (name == null) { if (name == null) {
throw new IllegalArgumentException("Permission name cannot be null"); throw new IllegalArgumentException("Permission name cannot be null");
} else if (plugin == null) { } else if (plugin == null) {
@@ -216,7 +222,7 @@ public class PermissibleBase implements Permissible { @@ -228,7 +234,7 @@ public class PermissibleBase implements Permissible {
}
@Override
@Nullable @Nullable
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) { - public PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) {
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) { // Paper - synchronized + public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) { // Paper - synchronized
if (plugin == null) { if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null"); throw new IllegalArgumentException("Plugin cannot be null");
} else if (!plugin.isEnabled()) { } else if (!plugin.isEnabled()) {
@@ -235,7 +241,7 @@ public class PermissibleBase implements Permissible { @@ -248,7 +254,7 @@ public class PermissibleBase implements Permissible {
}
@Override
@NotNull @NotNull
- public Set<PermissionAttachmentInfo> getEffectivePermissions() { - public Set<PermissionAttachmentInfo> getEffectivePermissions() {
+ public synchronized Set<PermissionAttachmentInfo> getEffectivePermissions() { // Paper - synchronized + public synchronized Set<PermissionAttachmentInfo> getEffectivePermissions() { // Paper - synchronized

Datei anzeigen

@ -1,4 +1,4 @@
From 979f60cf2cbf5cd62d30024b971762dab77f6be7 Mon Sep 17 00:00:00 2001 From 6e0a7a9708fd792e32acae5b03dc7d4c3aca021d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 17 Jul 2018 01:27:15 -0400 Date: Tue, 17 Jul 2018 01:27:15 -0400
Subject: [PATCH] Add Material Tags Subject: [PATCH] Add Material Tags
@ -614,10 +614,10 @@ index 00000000..328c5147
+ } + }
+} +}
diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java
index 596384b1..763befad 100644 index 61993528..5f9d3482 100644
--- a/src/test/java/org/bukkit/TestServer.java --- a/src/test/java/org/bukkit/TestServer.java
+++ b/src/test/java/org/bukkit/TestServer.java +++ b/src/test/java/org/bukkit/TestServer.java
@@ -28,6 +28,16 @@ public final class TestServer implements InvocationHandler { @@ -29,6 +29,16 @@ public final class TestServer implements InvocationHandler {
} }
} }
); );

Datei anzeigen

@ -1,14 +1,14 @@
From 6c29a689f44834265546b00ccd11758431e6e39a Mon Sep 17 00:00:00 2001 From 20baf564f13aaaa1f0ec80f2b1695581523dda2c Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 00:54:15 -0500 Date: Sun, 7 Oct 2018 00:54:15 -0500
Subject: [PATCH] Add sun related API Subject: [PATCH] Add sun related API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index dd51aa31..696cd649 100644 index 150c5af2..951eba31 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1495,6 +1495,16 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -1508,6 +1508,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/ */
public void setFullTime(long time); public void setFullTime(long time);

Datei anzeigen

@ -1,4 +1,4 @@
From 11f2703bdec691d543ce1d7fb34e7b3ecf950a5f Mon Sep 17 00:00:00 2001 From 75492423338959a60f7831eff9e5e9a737d2f676 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 15:53:43 +0000 Date: Sun, 18 Nov 2018 15:53:43 +0000
Subject: [PATCH] Support cancellation supression of EntityDismount/VehicleExit Subject: [PATCH] Support cancellation supression of EntityDismount/VehicleExit
@ -21,7 +21,7 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome! Improvements/suggestions welcome!
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
index 69c9e499..f0c0bae5 100644 index 963b9ead..a976c32d 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java --- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
@@ -13,10 +13,18 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable { @@ -13,10 +13,18 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable {
@ -44,9 +44,9 @@ index 69c9e499..f0c0bae5 100644
} }
/** /**
@@ -34,9 +42,18 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable { @@ -36,9 +44,18 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable {
}
@Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
+ // Paper start + // Paper start
+ if (cancel && !isCancellable) { + if (cancel && !isCancellable) {

Datei anzeigen

@ -1,14 +1,14 @@
From 60f914151d133a85f5ed0a0e506540d494c515f7 Mon Sep 17 00:00:00 2001 From d5abb48e4d10b87de170ca3471261b766960bc61 Mon Sep 17 00:00:00 2001
From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com> From: DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
Date: Tue, 23 Oct 2018 19:32:55 +0300 Date: Tue, 23 Oct 2018 19:32:55 +0300
Subject: [PATCH] Change the reserved channel check to be sensible Subject: [PATCH] Change the reserved channel check to be sensible
diff --git a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java diff --git a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
index 8227b375..cc750eb3 100644 index 1d061412..6fda7f3a 100644
--- a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java --- a/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
+++ b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java +++ b/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java
@@ -171,7 +171,7 @@ public class StandardMessenger implements Messenger { @@ -172,7 +172,7 @@ public class StandardMessenger implements Messenger {
public boolean isReservedChannel(@NotNull String channel) { public boolean isReservedChannel(@NotNull String channel) {
channel = validateAndCorrectChannel(channel); channel = validateAndCorrectChannel(channel);
@ -16,9 +16,9 @@ index 8227b375..cc750eb3 100644
+ return channel.equals("minecraft:register") || channel.equals("minecraft:unregister"); // Paper + return channel.equals("minecraft:register") || channel.equals("minecraft:unregister"); // Paper
} }
public void registerOutgoingPluginChannel(@NotNull Plugin plugin, @NotNull String channel) { @Override
diff --git a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java diff --git a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
index c15fa003..31ff2f61 100644 index dce3d619..7e2335ed 100644
--- a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java --- a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
+++ b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java +++ b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
@@ -25,8 +25,8 @@ public class StandardMessengerTest { @@ -25,8 +25,8 @@ public class StandardMessengerTest {

Datei anzeigen

@ -1,4 +1,4 @@
From 0c244d3a0ef40f461a59e81f0c420991fa9368d5 Mon Sep 17 00:00:00 2001 From 7742ee299c1d018e0f7c0bb73870428e901dc42e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io> From: Zach Brown <zach@zachbr.io>
Date: Wed, 2 Jan 2019 00:31:12 -0600 Date: Wed, 2 Jan 2019 00:31:12 -0600
Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed
@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose. documented as to their purpose.
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index aed01189..f6782e0d 100644 index 222a9a7b..3ab914fb 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java --- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -144,7 +144,9 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @@ -146,7 +146,9 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* UTC. * UTC.
* *
* @return Date of last log-in for this player, or 0 * @return Date of last log-in for this player, or 0
@ -29,7 +29,7 @@ index aed01189..f6782e0d 100644
public long getLastPlayed(); public long getLastPlayed();
/** /**
@@ -163,4 +165,30 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @@ -165,4 +167,30 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
@Nullable @Nullable
public Location getBedSpawnLocation(); public Location getBedSpawnLocation();

Datei anzeigen

@ -1,4 +1,4 @@
From d553fac2c7725eb035224170171d9d134f64e90b Mon Sep 17 00:00:00 2001 From 2de9aa3c54fb5e949cf3dac28525918527141317 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 28 Jan 2014 19:13:57 -0500 Date: Tue, 28 Jan 2014 19:13:57 -0500
Subject: [PATCH] Add ItemStack Recipe API helper methods Subject: [PATCH] Add ItemStack Recipe API helper methods
@ -6,10 +6,10 @@ Subject: [PATCH] Add ItemStack Recipe API helper methods
Allows using ExactChoice Recipes with easier methodss Allows using ExactChoice Recipes with easier methodss
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
index 038ed0a6..2181f09b 100644 index d742c405..222a12ba 100644
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
@@ -143,6 +143,13 @@ public class ShapedRecipe implements Recipe, Keyed { @@ -145,6 +145,13 @@ public class ShapedRecipe implements Recipe, Keyed {
return this; return this;
} }
@ -24,10 +24,10 @@ index 038ed0a6..2181f09b 100644
* Get a copy of the ingredients map. * Get a copy of the ingredients map.
* *
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
index 823645c5..062924ea 100644 index 84062dd7..ddcf84e6 100644
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
@@ -141,6 +141,40 @@ public class ShapelessRecipe implements Recipe, Keyed { @@ -143,6 +143,40 @@ public class ShapelessRecipe implements Recipe, Keyed {
return this; return this;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From b663560421b798309ed99e5cc5f981cfa76e02e5 Mon Sep 17 00:00:00 2001 From 33c9867ff8e00e5f2903999c23cd50cd1f826362 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 00:21:23 -0400 Date: Sun, 24 Mar 2019 00:21:23 -0400
Subject: [PATCH] Entity#getEntitySpawnReason Subject: [PATCH] Entity#getEntitySpawnReason
@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored. or DEFAULT since data was not stored.
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index b0ba2d97..61aa4999 100644 index f41243f9..29229c64 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -643,5 +643,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable { @@ -657,5 +657,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/ */
@NotNull @NotNull
Chunk getChunk(); Chunk getChunk();

Datei anzeigen

@ -1,4 +1,4 @@
From edb2d6dfb38c6b17a6d159252e6bce00a1a92f8b Mon Sep 17 00:00:00 2001 From d41b85d8d0510fc739f63d301c4f2ceb16ea2d28 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:39:01 -0400 Date: Sun, 24 Mar 2019 18:39:01 -0400
Subject: [PATCH] Flip some Spigot API null annotations Subject: [PATCH] Flip some Spigot API null annotations
@ -31,10 +31,10 @@ index 3b883b93..9f56e7f8 100644
return server.getTag(registry, tag, clazz); return server.getTag(registry, tag, clazz);
} }
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 7713f183..c12d2a26 100644 index 4e69f277..2a40da99 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -43,7 +43,7 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
* @param y The y-coordinate of this new location * @param y The y-coordinate of this new location
* @param z The z-coordinate of this new location * @param z The z-coordinate of this new location
*/ */
@ -43,24 +43,24 @@ index 7713f183..c12d2a26 100644
this(world, x, y, z, 0, 0); this(world, x, y, z, 0, 0);
} }
@@ -57,7 +57,7 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -60,7 +60,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
* @param yaw The absolute rotation on the x-plane, in degrees * @param yaw The absolute rotation on the x-plane, in degrees
* @param pitch The absolute rotation on the y-plane, in degrees * @param pitch The absolute rotation on the y-plane, in degrees
*/ */
- public Location(@Nullable final World world, final double x, final double y, final double z, final float yaw, final float pitch) { - public Location(@Nullable final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) { // Paper + public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
this.world = world; if (world != null) {
this.x = x; this.world = new WeakReference<>(world);
this.y = y; }
@@ -80,7 +80,7 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -102,7 +102,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
* * @throws IllegalArgumentException when world is unloaded
* @return World that contains this location * @see #isWorldLoaded()
*/ */
- @Nullable - @Nullable
+ @UndefinedNullability + @UndefinedNullability
public World getWorld() { public World getWorld() {
return world; if (this.world == null) {
} return null;
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 63a661bd..2f2be03f 100644 index 63a661bd..2f2be03f 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
@ -105,7 +105,7 @@ index dca77bba..56734f8e 100644
/** /**
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 76da06d1..4f72cd7c 100644 index 6d18de76..495161f6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -8,6 +8,7 @@ import java.util.Set; // Paper @@ -8,6 +8,7 @@ import java.util.Set; // Paper
@ -116,7 +116,7 @@ index 76da06d1..4f72cd7c 100644
import org.bukkit.Utility; import org.bukkit.Utility;
import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
@@ -527,7 +528,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -528,7 +529,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
* *
* @return a copy of the current ItemStack's ItemData * @return a copy of the current ItemStack's ItemData
*/ */

Datei anzeigen

@ -1,4 +1,4 @@
From 053132875985ae1a3b5b2b0ca97e76aec417ba59 Mon Sep 17 00:00:00 2001 From 3bfd84603554d6cbb91aec86b2a689ffa29cebae Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com> From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 1 Dec 2018 19:00:36 -0800 Date: Sat, 1 Dec 2018 19:00:36 -0800
Subject: [PATCH] Add Heightmap API Subject: [PATCH] Add Heightmap API
@ -46,10 +46,10 @@ index 00000000..4cd9b5ed
+ SOLID_OR_LIQUID_NO_LEAVES; + SOLID_OR_LIQUID_NO_LEAVES;
+} +}
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index c12d2a26..1eef404e 100644 index 2a40da99..3e1ca4c9 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -609,6 +609,33 @@ public class Location implements Cloneable, ConfigurationSerializable { @@ -638,6 +638,33 @@ public class Location implements Cloneable, ConfigurationSerializable {
return centerLoc; return centerLoc;
} }
@ -84,10 +84,10 @@ index c12d2a26..1eef404e 100644
* Creates explosion at this location with given power * Creates explosion at this location with given power
* *
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 696cd649..5469ee4f 100644 index 951eba31..2da92d39 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -160,6 +160,79 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -161,6 +161,79 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull @NotNull
public Block getHighestBlockAt(@NotNull Location location); public Block getHighestBlockAt(@NotNull Location location);

Datei anzeigen

@ -1,14 +1,14 @@
From c12775547e70620e86c3d13910ed31fc1edfecff Mon Sep 17 00:00:00 2001 From 8a7fdc3db38d4b47cc8f1309e7426abfab179799 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com> From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 19 Apr 2019 12:41:19 -0500 Date: Fri, 19 Apr 2019 12:41:19 -0500
Subject: [PATCH] Mob Spawner API Enhancements Subject: [PATCH] Mob Spawner API Enhancements
diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java
index 5773e99e..31c5a006 100644 index e73fb0ef..2ff0f24d 100644
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java --- a/src/main/java/org/bukkit/block/CreatureSpawner.java
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java +++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
@@ -199,4 +199,18 @@ public interface CreatureSpawner extends BlockState { @@ -199,4 +199,18 @@ public interface CreatureSpawner extends TileState {
* @param spawnRange the new spawn range * @param spawnRange the new spawn range
*/ */
public void setSpawnRange(int spawnRange); public void setSpawnRange(int spawnRange);

Datei anzeigen

@ -1,4 +1,4 @@
From 3772a276f6566458d67baefb11a255c09b8ad02d Mon Sep 17 00:00:00 2001 From 9e4cbf4b8c647145b7f6718dd8564c35c1df4ddd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600 Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files Subject: [PATCH] Paper config files
@ -535,10 +535,10 @@ index e1ba833f3e..b60956218d 100644
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bc9894f84e..0819f56a62 100644 index fd8397bd4d..77015bc06e 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -131,9 +131,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
public boolean inChunk; public boolean inChunk;
@ -596,7 +596,7 @@ index 84155573df..83fdea893c 100644
this.world = new CraftWorld((WorldServer) this, gen, env); this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
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 dcdd3b002d..9021ab34fa 100644 index be03fe24b8..5dc2bb1246 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -751,6 +751,7 @@ public final class CraftServer implements Server { @@ -751,6 +751,7 @@ public final class CraftServer implements Server {
@ -623,7 +623,7 @@ index dcdd3b002d..9021ab34fa 100644
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -1949,4 +1952,26 @@ public final class CraftServer implements Server { @@ -1953,4 +1956,26 @@ public final class CraftServer implements Server {
{ {
return spigot; return spigot;
} }
@ -651,10 +651,10 @@ index dcdd3b002d..9021ab34fa 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ae320c2bb1..fd02ba1916 100644 index e17d914185..f406464ef8 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -127,6 +127,14 @@ public class Main { @@ -128,6 +128,14 @@ public class Main {
.defaultsTo(new File("spigot.yml")) .defaultsTo(new File("spigot.yml"))
.describedAs("Yml file"); .describedAs("Yml file");
// Spigot End // Spigot End
@ -670,43 +670,49 @@ index ae320c2bb1..fd02ba1916 100644
}; };
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 20597d30c5..222adb40c1 100644 index 6bceeb120b..9a51c0ef7a 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -39,31 +39,31 @@ public class SpigotWorldConfig @@ -39,36 +39,36 @@ public class SpigotWorldConfig
config.set( "world-settings.default." + path, val ); config.set( "world-settings.default." + path, val );
} }
- private boolean getBoolean(String path, boolean def) - private boolean getBoolean(String path, boolean def)
+ public boolean getBoolean(String path, boolean def) + public boolean getBoolean(String path, boolean def) // Paper - private -> public
{ {
config.addDefault( "world-settings.default." + path, def ); config.addDefault( "world-settings.default." + path, def );
return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) ); return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) );
} }
- private double getDouble(String path, double def) - private double getDouble(String path, double def)
+ public double getDouble(String path, double def) + public double getDouble(String path, double def) // Paper - private -> public
{ {
config.addDefault( "world-settings.default." + path, def ); config.addDefault( "world-settings.default." + path, def );
return config.getDouble( "world-settings." + worldName + "." + path, config.getDouble( "world-settings.default." + path ) ); return config.getDouble( "world-settings." + worldName + "." + path, config.getDouble( "world-settings.default." + path ) );
} }
- private int getInt(String path)
+ public int getInt(String path) // Paper - private -> public
{
return config.getInt( "world-settings." + worldName + "." + path );
}
- private int getInt(String path, int def) - private int getInt(String path, int def)
+ public int getInt(String path, int def) + public int getInt(String path, int def) // Paper - private -> public
{ {
config.addDefault( "world-settings.default." + path, def ); config.addDefault( "world-settings.default." + path, def );
return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) );
} }
- private <T> List getList(String path, T def) - private <T> List getList(String path, T def)
+ public <T> List getList(String path, T def) + public <T> List getList(String path, T def) // Paper - private -> public
{ {
config.addDefault( "world-settings.default." + path, def ); config.addDefault( "world-settings.default." + path, def );
return (List<T>) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) ); return (List<T>) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );
} }
- private String getString(String path, String def) - private String getString(String path, String def)
+ public String getString(String path, String def) + public String getString(String path, String def) // Paper - private -> public
{ {
config.addDefault( "world-settings.default." + path, def ); config.addDefault( "world-settings.default." + path, def );
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );

Datei anzeigen

@ -1,4 +1,4 @@
From 9fc1ff726d9990ee6e85e86545100faa7103b892 Mon Sep 17 00:00:00 2001 From 3c1c8843086f86670aaa95e3b59bc09b5c3cd7d9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400 Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils Subject: [PATCH] MC Utils
@ -732,10 +732,10 @@ index 4e20cfba41..363ab5da12 100644
int j = 0; int j = 0;
ChunkSection[] achunksection = chunk.getSections(); ChunkSection[] achunksection = chunk.getSections();
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 10ebb23c66..23e37b5008 100644 index 8080e38b37..78a090ac75 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -69,9 +69,9 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
private final MinecraftServer minecraftServer; private final MinecraftServer minecraftServer;
public EntityPlayer player; public EntityPlayer player;
private int e; private int e;
@ -799,7 +799,7 @@ index b3799ab564..5fae5a1233 100644
public static long getTimeMillis() { public static long getTimeMillis() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 73dd802205..9ed7f8ede4 100644 index 42f7bb0f7d..5d71addb0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack { @@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {

Datei anzeigen

@ -1,4 +1,4 @@
From aeb013fd8fa88372a085b1e30e1c081c87db0298 Mon Sep 17 00:00:00 2001 From 97044255b2aeb519750c02b7c656dadfc681b17b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 01:40:13 -0400 Date: Wed, 4 Jul 2018 01:40:13 -0400
Subject: [PATCH] Add MinecraftKey Information to Objects Subject: [PATCH] Add MinecraftKey Information to Objects
@ -19,10 +19,10 @@ index 2e79b0b5ff..f38179e983 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0819f56a62..89e54089c2 100644 index 77015bc06e..01e4863899 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -46,7 +46,7 @@ import org.bukkit.event.entity.EntityPortalEvent; @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.PluginManager;
// CraftBukkit end // CraftBukkit end
@ -31,7 +31,7 @@ index 0819f56a62..89e54089c2 100644
// CraftBukkit start // CraftBukkit start
private static final int CURRENT_LEVEL = 2; private static final int CURRENT_LEVEL = 2;
@@ -1663,12 +1663,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -1677,12 +1677,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
return true; return true;
} }
@ -65,7 +65,7 @@ index 0819f56a62..89e54089c2 100644
protected abstract void a(NBTTagCompound nbttagcompound); protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 65ad9243f8..9aed0d6b82 100644 index 3217a8ed18..c7fb8f513b 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java --- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> { @@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
@ -92,24 +92,28 @@ index 0000000000..743142d030
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 888c9605c8..94fbf228d2 100644 index 080fd819b6..77d77fcb8b 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger; @@ -10,7 +10,7 @@ import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
import org.spigotmc.CustomTimingsHandler; // Spigot import org.spigotmc.CustomTimingsHandler; // Spigot
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
-public abstract class TileEntity { -public abstract class TileEntity {
+public abstract class TileEntity implements KeyedObject { // Paper +public abstract class TileEntity implements KeyedObject { // Paper
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
// CraftBukkit start - data containers
@@ -18,7 +18,7 @@ public abstract class TileEntity {
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
- private final TileEntityTypes<?> b; - private final TileEntityTypes<?> b;
+ private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER + private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER
@Nullable @Nullable
protected World world; protected World world;
protected BlockPosition position; protected BlockPosition position;
@@ -24,6 +24,26 @@ public abstract class TileEntity { @@ -31,6 +31,26 @@ public abstract class TileEntity {
this.b = tileentitytypes; this.b = tileentitytypes;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From f51b5f65d158341dd5a12fc57a5d9bb6d70cf3a1 Mon Sep 17 00:00:00 2001 From 43fe880530ba71a467d76e1a5d6ad57ba9fed5d5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400 Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -93,10 +93,10 @@ index 8f789c91f7..15be6bb33f 100644
@Override @Override
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 89e54089c2..53f8e6811a 100644 index 01e4863899..14c3f04170 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -130,7 +130,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -133,7 +133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
@ -105,7 +105,7 @@ index 89e54089c2..53f8e6811a 100644
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
@@ -1664,6 +1664,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1678,6 +1678,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// Paper start // Paper start
@ -146,10 +146,10 @@ index 89e54089c2..53f8e6811a 100644
private String entityKeyString; private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 94fbf228d2..42303f5b39 100644 index 77d77fcb8b..4c811325c3 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -42,6 +42,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -49,6 +49,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
getMinecraftKey(); // Try to load if it doesn't exists. getMinecraftKey(); // Try to load if it doesn't exists.
return tileEntityKeyString; return tileEntityKeyString;
} }
@ -166,7 +166,7 @@ index 94fbf228d2..42303f5b39 100644
@Nullable @Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index ee34d42160..cebbdec741 100644 index eddac6ed95..049641db06 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager; @@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager;
@ -177,7 +177,7 @@ index ee34d42160..cebbdec741 100644
import org.bukkit.EntityEffect; import org.bukkit.EntityEffect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Server; import org.bukkit.Server;
@@ -173,6 +174,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -178,6 +179,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.entity = entity; this.entity = entity;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 87ac79ba576c04901783ab5e163826a361488db7 Mon Sep 17 00:00:00 2001 From a7ea633b747bb806e7fcc6077f30fcab76b59d04 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -546,7 +546,7 @@ index b60956218d..19e2df3098 100644
return waitable.get(); return waitable.get();
} catch (java.util.concurrent.ExecutionException e) { } catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 53f8e6811a..114a851f0f 100644 index 14c3f04170..6127f9ba96 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -559,7 +559,7 @@ index 53f8e6811a..114a851f0f 100644
import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -158,7 +159,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -161,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public boolean valid; public boolean valid;
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949 public boolean forceExplosionKnockback; // SPIGOT-949
@ -568,7 +568,7 @@ index 53f8e6811a..114a851f0f 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -474,7 +475,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -483,7 +484,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
public void move(EnumMoveType enummovetype, Vec3D vec3d) { public void move(EnumMoveType enummovetype, Vec3D vec3d) {
@ -576,7 +576,7 @@ index 53f8e6811a..114a851f0f 100644
if (this.noclip) { if (this.noclip) {
this.a(this.getBoundingBox().b(vec3d)); this.a(this.getBoundingBox().b(vec3d));
this.recalcPosition(); this.recalcPosition();
@@ -639,7 +639,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -648,7 +648,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }
@ -661,7 +661,7 @@ index f86e6a4c51..85567a7072 100644
} }
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 741105fb6c..277fa64e24 100644 index 4de927416b..4c1c914132 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
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -682,7 +682,7 @@ index 741105fb6c..277fa64e24 100644
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable {
@@ -659,6 +661,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -672,6 +674,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} }
// CraftBukkit end // CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server"); MinecraftServer.LOGGER.info("Stopping server");
@ -690,7 +690,7 @@ index 741105fb6c..277fa64e24 100644
// CraftBukkit start // CraftBukkit start
if (this.server != null) { if (this.server != null) {
this.server.disablePlugins(); this.server.disablePlugins();
@@ -929,7 +932,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -949,7 +952,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {} protected void exit() {}
protected void a(BooleanSupplier booleansupplier) { protected void a(BooleanSupplier booleansupplier) {
@ -699,7 +699,7 @@ index 741105fb6c..277fa64e24 100644
this.slackActivityAccountant.tickStarted(); // Spigot this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos(); long i = SystemUtils.getMonotonicNanos();
@@ -950,14 +953,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -970,14 +973,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} }
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -714,7 +714,7 @@ index 741105fb6c..277fa64e24 100644
} }
this.methodProfiler.enter("snooper"); this.methodProfiler.enter("snooper");
@@ -980,29 +981,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1000,29 +1001,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit(); this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot this.slackActivityAccountant.tickEnded(l); // Spigot
@ -752,7 +752,7 @@ index 741105fb6c..277fa64e24 100644
// Send time updates to everyone, it will get the right time from the world the player is in. // Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) { if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1010,7 +1010,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1030,7 +1030,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
} }
} }
@ -761,7 +761,7 @@ index 741105fb6c..277fa64e24 100644
// WorldServer worldserver; // CraftBukkit - dropped down // WorldServer worldserver; // CraftBukkit - dropped down
long i; long i;
@@ -1057,20 +1057,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1077,20 +1077,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} }
this.methodProfiler.exitEnter("connection"); this.methodProfiler.exitEnter("connection");
@ -789,7 +789,7 @@ index 741105fb6c..277fa64e24 100644
this.methodProfiler.exit(); this.methodProfiler.exit();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 4d8491c760..a44525304d 100644 index 755c0406e1..ee65b01f43 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -801,7 +801,7 @@ index 4d8491c760..a44525304d 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.DataFixer;
@@ -248,6 +250,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -244,6 +246,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunk = new PlayerChunk(new ChunkCoordIntPair(i), j, this.lightEngine, this.q, this); playerchunk = new PlayerChunk(new ChunkCoordIntPair(i), j, this.lightEngine, this.q, this);
} }
@ -826,11 +826,10 @@ index 4d8491c760..a44525304d 100644
this.updatingChunks.put(i, playerchunk); this.updatingChunks.put(i, playerchunk);
this.updatingChunksModified = true; this.updatingChunksModified = true;
} }
@@ -350,6 +370,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -332,6 +352,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.a(i, playerchunk, event); // CraftBukkit ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk, chunk.isNeedsSaving());
} else { this.world.getServer().getPluginManager().callEvent(event);
if (this.g.remove(i, playerchunk) && ichunkaccess != null) { this.saveChunk(ichunkaccess, event.isSaveChunk());
+
+ // TODO: VERIFY THIS + // TODO: VERIFY THIS
+ // Paper - Update neighbor counts + // Paper - Update neighbor counts
+ for (int x = -2; x < 3; x++) { + for (int x = -2; x < 3; x++) {
@ -848,10 +847,10 @@ index 4d8491c760..a44525304d 100644
+ } + }
+ } + }
+ // Paper + // Paper
// CraftBukkit start // CraftBukkit end
if (event == null) {
this.saveChunk(ichunkaccess); chunk.c(false);
@@ -424,7 +462,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -402,7 +439,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}); });
return completablefuture.thenComposeAsync((either) -> { return completablefuture.thenComposeAsync((either) -> {
@ -860,7 +859,7 @@ index 4d8491c760..a44525304d 100644
try { try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.b(playerchunk); return this.b(playerchunk);
@@ -904,6 +942,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -879,6 +916,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator; ObjectIterator objectiterator;
@ -868,7 +867,7 @@ index 4d8491c760..a44525304d 100644
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -921,9 +960,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -896,9 +934,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1; playerchunkmap_entitytracker.e = sectionposition1;
} }
} }
@ -881,10 +880,10 @@ index 4d8491c760..a44525304d 100644
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
playerchunkmap_entitytracker.track(list); playerchunkmap_entitytracker.track(list);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 23e37b5008..287bba3f6c 100644 index 78a090ac75..e07f4a9680 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -60,6 +60,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
@ -892,7 +891,7 @@ index 23e37b5008..287bba3f6c 100644
// CraftBukkit end // CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn { public class PlayerConnection implements PacketListenerPlayIn {
@@ -137,7 +138,6 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -135,7 +136,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit end // CraftBukkit end
public void tick() { public void tick() {
@ -900,7 +899,7 @@ index 23e37b5008..287bba3f6c 100644
this.syncPosition(); this.syncPosition();
this.player.playerTick(); this.player.playerTick();
this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch); this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch);
@@ -210,7 +210,6 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -208,7 +208,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854 this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0])); this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0]));
} }
@ -908,7 +907,7 @@ index 23e37b5008..287bba3f6c 100644
} }
@@ -1648,7 +1647,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1647,7 +1646,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit end // CraftBukkit end
private void handleCommand(String s) { private void handleCommand(String s) {
@ -917,7 +916,7 @@ index 23e37b5008..287bba3f6c 100644
// CraftBukkit start - whole method // CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s); this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1659,7 +1658,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1658,7 +1657,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.server.getPluginManager().callEvent(event); this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {
@ -926,7 +925,7 @@ index 23e37b5008..287bba3f6c 100644
return; return;
} }
@@ -1672,7 +1671,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1671,7 +1670,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return; return;
} finally { } finally {
@ -936,7 +935,7 @@ index 23e37b5008..287bba3f6c 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index c8d2c81c58..aefc3eb19c 100644 index cb6d50ea70..9ba03f8ed0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
@ -954,7 +953,7 @@ index c8d2c81c58..aefc3eb19c 100644
if (!iasynctaskhandler.isMainThread()) { if (!iasynctaskhandler.isMainThread()) {
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper + Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper
iasynctaskhandler.execute(() -> { iasynctaskhandler.execute(() -> {
if (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect) return; // CraftBukkit if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
+ try (Timing ignored = timing.startTiming()) { // Paper + try (Timing ignored = timing.startTiming()) { // Paper
packet.a(t0); packet.a(t0);
+ } // Paper - timings + } // Paper - timings
@ -962,7 +961,7 @@ index c8d2c81c58..aefc3eb19c 100644
throw CancelledPacketHandleException.INSTANCE; throw CancelledPacketHandleException.INSTANCE;
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index b0c6b1385d..7939208a5a 100644 index 56e36c8668..7a837ec0fc 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -972,7 +971,7 @@ index b0c6b1385d..7939208a5a 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -892,10 +893,11 @@ public abstract class PlayerList { @@ -894,10 +895,11 @@ public abstract class PlayerList {
} }
public void savePlayers() { public void savePlayers() {
@ -1039,25 +1038,24 @@ index 537e610797..b48e5b51a0 100644
} }
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 42303f5b39..456afbf079 100644 index 4c811325c3..da30d2cf86 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable; @@ -8,11 +8,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
import org.apache.logging.log4j.LogManager; import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
import org.apache.logging.log4j.Logger; import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
-import org.spigotmc.CustomTimingsHandler; // Spigot -import org.spigotmc.CustomTimingsHandler; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper +import co.aikar.timings.MinecraftTimings; // Paper
+import co.aikar.timings.Timing; // Paper +import co.aikar.timings.Timing; // Paper
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
public abstract class TileEntity implements KeyedObject { // Paper public abstract class TileEntity implements KeyedObject { // Paper
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
private static final Logger LOGGER = LogManager.getLogger(); // CraftBukkit start - data containers
private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
@Nullable public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 83fdea893c..738d9da8ce 100644 index 83fdea893c..738d9da8ce 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
@ -1123,7 +1121,7 @@ index 83fdea893c..738d9da8ce 100644
// Spigot end // Spigot end
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 20900593af..d54d58e1ee 100644 index d08c5fc93b..11cd9003e3 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1200,10 +1198,10 @@ index 20900593af..d54d58e1ee 100644
} }
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 9021ab34fa..672a647960 100644 index 5dc2bb1246..8e877055c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1922,12 +1922,31 @@ public final class CraftServer implements Server { @@ -1926,12 +1926,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot() private final Spigot spigot = new Spigot()
{ {
@ -1408,10 +1406,10 @@ index 38f211526b..0000000000
- } - }
-} -}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 57d4427097..25726dd751 100644 index 6806ada495..e45fd0028b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1726,6 +1726,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1728,6 +1728,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components; packet.components = components;
getHandle().playerConnection.sendPacket(packet); getHandle().playerConnection.sendPacket(packet);
} }
@ -1427,7 +1425,7 @@ index 57d4427097..25726dd751 100644
public Player.Spigot spigot() public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index e9fce8622f..d99634062b 100644 index b90979c7ba..8823f94f7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -1437,7 +1435,7 @@ index e9fce8622f..d99634062b 100644
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
@@ -246,7 +247,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -248,7 +249,7 @@ public class CraftScheduler implements BukkitScheduler {
} }
} }
return false; return false;
@ -1446,7 +1444,7 @@ index e9fce8622f..d99634062b 100644
handle(task, 0L); handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) { for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) { if (taskPending == task) {
@@ -280,7 +281,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -283,7 +284,7 @@ public class CraftScheduler implements BukkitScheduler {
} }
} }
} }
@ -1455,7 +1453,7 @@ index e9fce8622f..d99634062b 100644
handle(task, 0L); handle(task, 0L);
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) { for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
if (taskPending == task) { if (taskPending == task) {
@@ -387,9 +388,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -390,9 +391,7 @@ public class CraftScheduler implements BukkitScheduler {
if (task.isSync()) { if (task.isSync()) {
currentTask = task; currentTask = task;
try { try {
@ -1465,7 +1463,7 @@ index e9fce8622f..d99634062b 100644
} catch (final Throwable throwable) { } catch (final Throwable throwable) {
task.getOwner().getLogger().log( task.getOwner().getLogger().log(
Level.WARNING, Level.WARNING,
@@ -416,8 +415,10 @@ public class CraftScheduler implements BukkitScheduler { @@ -419,8 +418,10 @@ public class CraftScheduler implements BukkitScheduler {
runners.remove(task.getTaskId()); runners.remove(task.getTaskId());
} }
} }
@ -1476,7 +1474,7 @@ index e9fce8622f..d99634062b 100644
debugHead = debugHead.getNextHead(currentTick); debugHead = debugHead.getNextHead(currentTick);
} }
@@ -450,6 +451,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -453,6 +454,7 @@ public class CraftScheduler implements BukkitScheduler {
} }
private void parsePending() { private void parsePending() {
@ -1484,7 +1482,7 @@ index e9fce8622f..d99634062b 100644
CraftTask head = this.head; CraftTask head = this.head;
CraftTask task = head.getNext(); CraftTask task = head.getNext();
CraftTask lastTask = head; CraftTask lastTask = head;
@@ -468,6 +470,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -471,6 +473,7 @@ public class CraftScheduler implements BukkitScheduler {
task.setNext(null); task.setNext(null);
} }
this.head = lastTask; this.head = lastTask;

Datei anzeigen

@ -1,4 +1,4 @@
From 4c5ba563e76ce1ad1703efc25ef3952b56e373e6 Mon Sep 17 00:00:00 2001 From cd36b4b77d0828ac52974d0ec163f700246157f6 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600 Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 114a851f0f..ca21afc199 100644 index 6127f9ba96..ffad35a61f 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1769,6 +1769,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1783,6 +1783,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.a(itemstack, 0.0F); return this.a(itemstack, 0.0F);
} }

Datei anzeigen

@ -1,4 +1,4 @@
From d6da37cf3560528b02e72e0b5c08747103db3fcf Mon Sep 17 00:00:00 2001 From 8576fa86b2ba7e75460dee37d44bfb56edf84203 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600 Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -19,10 +19,10 @@ index 3f35a28ba1..cf00f35a5b 100644
throwable = throwable1; throwable = throwable1;
throw throwable1; throw throwable1;
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 277fa64e24..33e8030def 100644 index 4c1c914132..13a0918cea 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
@@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1288,7 +1288,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} }
public String getServerModName() { public String getServerModName() {
@ -32,7 +32,7 @@ index 277fa64e24..33e8030def 100644
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
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 672a647960..07e052b649 100644 index 8e877055c3..def01ae423 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -45,10 +45,10 @@ index 672a647960..07e052b649 100644
private final String bukkitVersion = Versioning.getBukkitVersion(); private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft"); private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index fd02ba1916..a96c144fca 100644 index f406464ef8..7f5ea764d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -199,12 +199,25 @@ public class Main { @@ -200,12 +200,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -3); deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) { if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***"); System.err.println("*** Error, this build is outdated ***");

Datei anzeigen

@ -1,11 +1,11 @@
From 20708be3fdc6f6bb1b11884a04087c6499756984 Mon Sep 17 00:00:00 2001 From b2f98146b39d7ce91a285ea261c8fbc958c679db Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600 Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 07401b4d9b..20460ad98a 100644 index ffaeb76d0f..d0713bfcd1 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving { @@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving {
@ -45,10 +45,10 @@ index dbbc34d91b..d823c6b6d9 100644
return false; return false;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 25726dd751..ca65d51d81 100644 index e45fd0028b..ffe29917ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1639,7 +1639,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1641,7 +1641,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String getLocale() { public String getLocale() {
return getHandle().locale; return getHandle().locale;

Datei anzeigen

@ -1,4 +1,4 @@
From c0f630db178f498a793777ac2084016fa9b5e453 Mon Sep 17 00:00:00 2001 From 072bc1538cc7c59fb817c5ab3d645f5137bdcee4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600 Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop Subject: [PATCH] Further improve server tick loop
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
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 33e8030def..48286867fe 100644 index 13a0918cea..320af3f503 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
@@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -24,7 +24,7 @@ index 33e8030def..48286867fe 100644
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>(); public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod; public int autosavePeriod;
public File bukkitDataPackFolder; public File bukkitDataPackFolder;
@@ -159,7 +159,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start // Spigot start
public static final int TPS = 20; public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / TPS; public static final int TICK_TIME = 1000000000 / TPS;
@ -33,7 +33,7 @@ index 33e8030def..48286867fe 100644
public final double[] recentTps = new double[ 3 ]; public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant(); public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end // Spigot end
@@ -745,6 +745,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -758,6 +758,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{ {
return ( avg * exp ) + ( tps * ( 1 - exp ) ); return ( avg * exp ) + ( tps * ( 1 - exp ) );
} }
@ -91,7 +91,7 @@ index 33e8030def..48286867fe 100644
// Spigot End // Spigot End
public void run() { public void run() {
@@ -757,30 +808,48 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -770,30 +821,48 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start // Spigot start
Arrays.fill( recentTps, 20 ); Arrays.fill( recentTps, 20 );
@ -156,20 +156,21 @@ index 33e8030def..48286867fe 100644
this.nextTick += 50L; this.nextTick += 50L;
if (this.T) { if (this.T) {
this.T = false; this.T = false;
@@ -848,7 +917,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -861,8 +930,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} }
private boolean canSleepForTick() { private boolean canSleepForTick() {
- return this.isEntered() || SystemUtils.getMonotonicMillis() < (this.ac ? this.ab : this.nextTick); - // CraftBukkit start
+ return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own - return this.forceTicks || this.isEntered() || SystemUtils.getMonotonicMillis() < (this.ac ? this.ab : this.nextTick);
+ return this.forceTicks || System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own
} }
protected void sleepForTick() { private void executeModerately() {
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 07e052b649..de592ae851 100644 index def01ae423..72902d2f5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1919,6 +1919,17 @@ public final class CraftServer implements Server { @@ -1923,6 +1923,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE; return CraftMagicNumbers.INSTANCE;
} }

Datei anzeigen

@ -1,14 +1,14 @@
From 4076d548ca6e55ff95403b309eb842e650799e87 Mon Sep 17 00:00:00 2001 From 30114cb020556b26a53429e43b61641166f4ca02 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:12:03 -0600 Date: Tue, 1 Mar 2016 23:12:03 -0600
Subject: [PATCH] Only refresh abilities if needed Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ca65d51d81..6b93cc3a57 100644 index ffe29917ce..a3628b2c2c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1328,12 +1328,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1330,12 +1330,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setFlying(boolean value) { public void setFlying(boolean value) {

Datei anzeigen

@ -1,14 +1,14 @@
From 6ca1200c22d2e6055bdedabe5c6b11c83b110374 Mon Sep 17 00:00:00 2001 From 70bd27dafcbb7673fa92e6ac6909bc1479626d75 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ca21afc199..af019fc3f1 100644 index ffad35a61f..7b7a437b93 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949 public boolean forceExplosionKnockback; // SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,19 +16,19 @@ index ca21afc199..af019fc3f1 100644
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -1528,6 +1529,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1542,6 +1543,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.bukkitEntity.storeBukkitValues(nbttagcompound);
} }
} // CraftBukkit end
+ // Paper start - Save the entity's origin location + // Paper start - Save the entity's origin location
+ if (origin != null) { + if (this.origin != null) {
+ nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); + nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
+ } + }
+ // Paper end + // Paper end
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1649,6 +1655,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1663,6 +1669,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// CraftBukkit end // CraftBukkit end
@ -42,7 +42,7 @@ index ca21afc199..af019fc3f1 100644
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1726,6 +1739,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1740,6 +1753,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
protected abstract void b(NBTTagCompound nbttagcompound); protected abstract void b(NBTTagCompound nbttagcompound);
@ -101,10 +101,10 @@ index ce510c4867..b7c94fe238 100644
if (i >= 0 && i < this.list.size()) { if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i); NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d54d58e1ee..742e7d793e 100644 index 11cd9003e3..e99b1b9460 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1101,6 +1101,11 @@ public class WorldServer extends World { @@ -1102,6 +1102,11 @@ public class WorldServer extends World {
this.I.add(((EntityInsentient) entity).getNavigation()); this.I.add(((EntityInsentient) entity).getNavigation());
} }
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit
@ -117,10 +117,10 @@ index d54d58e1ee..742e7d793e 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index cebbdec741..d20c05265a 100644 index 049641db06..cc493ab7f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -944,4 +944,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1009,4 +1009,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return spigot; return spigot;
} }
// Spigot end // Spigot end

Datei anzeigen

@ -1,14 +1,14 @@
From def800183b248ecec16bb7fe8c23196ff3450dc0 Mon Sep 17 00:00:00 2001 From d3030029a797dd7be902e3c097c3821d170c7560 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600 Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index b5e0ba3909..16957b9aa2 100644 index da30d2cf86..acd9edd670 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -179,7 +179,12 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -197,7 +197,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.q()) + " // " + this.getClass().getCanonicalName(); return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.q()) + " // " + this.getClass().getCanonicalName();
}); });
if (this.world != null) { if (this.world != null) {
@ -23,7 +23,7 @@ index b5e0ba3909..16957b9aa2 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 446f864420..62c77d8f51 100644 index 0d8e622294..051d7531d1 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -674,11 +674,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -674,11 +674,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,4 +1,4 @@
From 1ab46ee6d9339d3bcd0aeb14a5bf5167779f3bda Mon Sep 17 00:00:00 2001 From 4b6c1894e50426cb0ea92df05d1cb611b786ea4b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600 Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage Subject: [PATCH] Configurable top of nether void damage
@ -29,10 +29,10 @@ index 1ed58f4bba..a797a57671 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index af019fc3f1..49245b5c5f 100644 index 7b7a437b93..fe73aef9cb 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -384,9 +384,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -393,9 +393,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance *= 0.5F; this.fallDistance *= 0.5F;
} }
@ -48,7 +48,7 @@ index af019fc3f1..49245b5c5f 100644
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
this.setFlag(0, this.fireTicks > 0); this.setFlag(0, this.fireTicks > 0);
@@ -396,6 +402,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -405,6 +411,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }
@ -66,7 +66,7 @@ index af019fc3f1..49245b5c5f 100644
protected void E() { protected void E() {
if (this.portalCooldown > 0) { if (this.portalCooldown > 0) {
--this.portalCooldown; --this.portalCooldown;
@@ -463,6 +480,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -472,6 +489,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fireTicks = 0; this.fireTicks = 0;
} }

Datei anzeigen

@ -1,4 +1,4 @@
From b050f65ecd22f2c4a4658bd195e2633834001d62 Mon Sep 17 00:00:00 2001 From 96e182ab7959d4040f27304a92958605f8b05e5a Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com> From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500 Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits Subject: [PATCH] Configurable end credits
@ -20,10 +20,10 @@ index a797a57671..c2b9690a0c 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index e7856b2abe..5548163666 100644 index 67988b6c6a..550e6714bc 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long cm = SystemUtils.getMonotonicMillis(); private long cm = SystemUtils.getMonotonicMillis();
private Entity spectatedEntity; private Entity spectatedEntity;
public boolean worldChangeInvuln; public boolean worldChangeInvuln;
@ -32,7 +32,7 @@ index e7856b2abe..5548163666 100644
private final RecipeBookServer recipeBook; private final RecipeBookServer recipeBook;
private Vec3D cr; private Vec3D cr;
private int cs; private int cs;
@@ -697,6 +697,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -698,6 +698,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.getWorldServer().removePlayer(this); this.getWorldServer().removePlayer(this);
if (!this.viewingCredits) { if (!this.viewingCredits) {
this.viewingCredits = true; this.viewingCredits = true;

Datei anzeigen

@ -1,4 +1,4 @@
From bdafbcf48a32bfbede63ff359df1f1dfc81c23a5 Mon Sep 17 00:00:00 2001 From 0b795b90b210f2cc81cb8c42dd048b493115dcc3 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600 Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions Subject: [PATCH] Optimize explosions
@ -123,10 +123,10 @@ index e1c628f177..bcff117619 100644
+ // Paper end + // Paper end
} }
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 7dfe1f0a3c..8704c091d7 100644 index 320af3f503..1a9a981ade 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
@@ -1122,6 +1122,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -1141,6 +1141,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit(); this.methodProfiler.exit();
this.methodProfiler.exit(); this.methodProfiler.exit();
@ -135,7 +135,7 @@ index 7dfe1f0a3c..8704c091d7 100644
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 62c77d8f51..25f19091c7 100644 index 051d7531d1..ee953c880e 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -19,6 +19,7 @@ import org.apache.logging.log4j.util.Supplier; @@ -19,6 +19,7 @@ import org.apache.logging.log4j.util.Supplier;

Datei anzeigen

@ -1,4 +1,4 @@
From 696f64b5a8f1a08651b60d9ebd499c623b2e41d9 Mon Sep 17 00:00:00 2001 From 349002e874920f5e828deeee07cfbcdd4b8d36a2 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600 Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen Subject: [PATCH] Send absolute position the first time an entity is seen
@ -77,10 +77,10 @@ index 315c3d9165..aaf3a54b08 100644
this.c(); this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index a44525304d..f49575b3ab 100644 index ee65b01f43..0a64432384 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1057,10 +1057,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1031,10 +1031,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker; private final Entity tracker;
private final int trackingDistance; private final int trackingDistance;
private SectionPosition e; private SectionPosition e;
@ -97,7 +97,7 @@ index a44525304d..f49575b3ab 100644
this.tracker = entity; this.tracker = entity;
this.trackingDistance = i; this.trackingDistance = i;
this.e = SectionPosition.a(entity); this.e = SectionPosition.a(entity);
@@ -1142,7 +1146,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1116,7 +1120,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end // CraftBukkit end

Datei anzeigen

@ -1,4 +1,4 @@
From 0e0cdbb47aad3fb40ef01d000940577277963df4 Mon Sep 17 00:00:00 2001 From 1b44495fde971b1629df210ba39c03af28d125ed Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600 Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate Subject: [PATCH] Configurable container update tick rate
@ -19,10 +19,10 @@ index e4e00e2e1c..d663b15ceb 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index fbde752052..dbb9a9a694 100644 index 550e6714bc..409443356a 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -71,6 +71,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -72,6 +72,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean e; public boolean e;
public int ping; public int ping;
public boolean viewingCredits; public boolean viewingCredits;
@ -30,7 +30,7 @@ index fbde752052..dbb9a9a694 100644
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -348,7 +349,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -349,7 +350,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks; --this.noDamageTicks;
} }

Datei anzeigen

@ -1,14 +1,14 @@
From f21af7ce096c13e137b69a2704cf76b7a80ae5b4 Mon Sep 17 00:00:00 2001 From c0388a11bd083d4ad27ce482b73392570976b7b2 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Wed, 2 Mar 2016 23:42:37 -0600 Date: Wed, 2 Mar 2016 23:42:37 -0600
Subject: [PATCH] Use UserCache for player heads Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 63ec8d06e4..f270532763 100644 index c83bebe709..0136e1bfe1 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -152,7 +152,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { @@ -155,7 +155,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) { if (name == null) {
profile = null; profile = null;
} else { } else {

Datei anzeigen

@ -1,4 +1,4 @@
From b65da8135d73b3be5877239a3751c4dcd150f97f Mon Sep 17 00:00:00 2001 From 16a2ee411f4aa6292cf8f94b00b89e58f594641f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600 Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async. that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 287bba3f6c..9d7bbafe02 100644 index e07f4a9680..c73fd79666 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1579,6 +1579,29 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1578,6 +1578,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
} }
if (!async && s.startsWith("/")) { if (!async && s.startsWith("/")) {
@ -48,7 +48,7 @@ index 287bba3f6c..9d7bbafe02 100644
} else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin // Do nothing, this is coming from a plugin
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 de592ae851..9c54d151df 100644 index 72902d2f5d..8551073ab2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -704,6 +704,29 @@ public final class CraftServer implements Server { @@ -704,6 +704,29 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,14 +1,14 @@
From cbac1504f2d1b1c6ebe7c912bbe54df2e4a856f9 Mon Sep 17 00:00:00 2001 From 9a6df7e78a63ba269903c9ad72ce7820692e0974 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:15:57 -0600 Date: Thu, 3 Mar 2016 02:15:57 -0600
Subject: [PATCH] Expose server CommandMap Subject: [PATCH] Expose server CommandMap
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 9c54d151df..1c96beab7d 100644 index 8551073ab2..bb20024ba2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1579,6 +1579,7 @@ public final class CraftServer implements Server { @@ -1582,6 +1582,7 @@ public final class CraftServer implements Server {
return helpMap; return helpMap;
} }

Datei anzeigen

@ -1,14 +1,14 @@
From 86ae9c4cb8b6cae07cff69f6ee2a0ff8aa5fb7d1 Mon Sep 17 00:00:00 2001 From 379ad4d6b1430efec2297f0b1472ea0136bc6d59 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:18:39 -0600 Date: Thu, 3 Mar 2016 02:18:39 -0600
Subject: [PATCH] Be a bit more informative in maxHealth exception Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d01e06f1b9..d98b98e856 100644 index 46b3001439..4b5b2ae34e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -99,7 +99,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -101,7 +101,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setHealth(double health) { public void setHealth(double health) {
health = (float) health; health = (float) health;
if ((health < 0) || (health > getMaxHealth())) { if ((health < 0) || (health > getMaxHealth())) {

Datei anzeigen

@ -1,4 +1,4 @@
From 7ee3c5a8e6f38b0679e2450f39f8e2e9e2413c03 Mon Sep 17 00:00:00 2001 From be4d46773160f8c9ce10bcd3f1ecff3f5e7673e8 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com> From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600 Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs Subject: [PATCH] Player Tab List and Title APIs
@ -52,7 +52,7 @@ index 3a6e780007..535056c64e 100644
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6b93cc3a57..d56fbdf80b 100644 index a3628b2c2c..00be351e07 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -62,7 +62,7 @@ index 6b93cc3a57..d56fbdf80b 100644
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding; import com.google.common.io.BaseEncoding;
@@ -206,6 +207,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -208,6 +209,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
} }

Datei anzeigen

@ -1,11 +1,11 @@
From f030cae6bc568729c3bdb652614b9265f2df84a7 Mon Sep 17 00:00:00 2001 From 789cd00899d4fbcbb5379909561c1bcae7648929 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:48:12 -0600 Date: Thu, 3 Mar 2016 02:48:12 -0600
Subject: [PATCH] Add velocity warnings Subject: [PATCH] Add velocity warnings
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 1c96beab7d..01d5a49cf7 100644 index bb20024ba2..120c3a613b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -230,6 +230,7 @@ public final class CraftServer implements Server { @@ -230,6 +230,7 @@ public final class CraftServer implements Server {
@ -17,10 +17,10 @@ index 1c96beab7d..01d5a49cf7 100644
static { static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index d20c05265a..fb2047bffa 100644 index cc493ab7f7..0b7fc359d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -396,10 +396,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -405,10 +405,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setVelocity(Vector velocity) { public void setVelocity(Vector velocity) {
Preconditions.checkArgument(velocity != null, "velocity"); Preconditions.checkArgument(velocity != null, "velocity");
velocity.checkFinite(); velocity.checkFinite();

Datei anzeigen

@ -1,4 +1,4 @@
From 3b560988fe8b70cd78cf8e5913ef9b8963cab5c2 Mon Sep 17 00:00:00 2001 From ccde4241ae0089c2dbc015c597c9ed037db7f42b Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Thu, 3 Mar 2016 02:50:31 -0600 Date: Thu, 3 Mar 2016 02:50:31 -0600
Subject: [PATCH] Configurable inter-world teleportation safety Subject: [PATCH] Configurable inter-world teleportation safety
@ -30,10 +30,10 @@ index 320fd07c62..94f5c90b3c 100644
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d56fbdf80b..b993d236b5 100644 index 00be351e07..afa209f227 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -743,7 +743,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -745,7 +745,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) { if (fromWorld == toWorld) {
entity.playerConnection.teleport(to); entity.playerConnection.teleport(to);
} else { } else {

Datei anzeigen

@ -1,4 +1,4 @@
From 132e8398b585be26653081f5ad7d9b558b9c0484 Mon Sep 17 00:00:00 2001 From b7e3ec23edd18418b43f7932d0a9ea4310e0ee8d Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600 Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -121,10 +121,10 @@ index 1dd793d2fb..61ea2818b1 100644
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index f49575b3ab..26125fe27a 100644 index 0a64432384..5ecf446e11 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -622,6 +622,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -596,6 +596,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.world.checkSession(); this.world.checkSession();
} catch (ExceptionWorldConflict exceptionworldconflict) { } catch (ExceptionWorldConflict exceptionworldconflict) {
PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
@ -132,7 +132,7 @@ index f49575b3ab..26125fe27a 100644
return; return;
} }
@@ -648,6 +649,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -622,6 +623,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.write(chunkcoordintpair, nbttagcompound); this.write(chunkcoordintpair, nbttagcompound);
} catch (Exception exception) { } catch (Exception exception) {
PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);
@ -267,7 +267,7 @@ index 3c5b3fe101..47a4ea9985 100644
} finally { } finally {
if (pushbackinputstream != null) { if (pushbackinputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index d99634062b..86a5ee8aac 100644 index 8823f94f7b..552daf4376 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger;
@ -280,7 +280,7 @@ index d99634062b..86a5ee8aac 100644
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.plugin.IllegalPluginAccessException; import org.bukkit.plugin.IllegalPluginAccessException;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
@@ -390,20 +393,26 @@ public class CraftScheduler implements BukkitScheduler { @@ -393,20 +396,26 @@ public class CraftScheduler implements BukkitScheduler {
try { try {
task.run(); task.run();
} catch (final Throwable throwable) { } catch (final Throwable throwable) {

Datei anzeigen

@ -1,4 +1,4 @@
From 3e23947760e0ec7eb777f34679372e128c282a02 Mon Sep 17 00:00:00 2001 From 22f37631cf7184718b02b44242679a71a62c4959 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500 Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default Subject: [PATCH] Disable Scoreboards for non players by default
@ -25,10 +25,10 @@ index 94f5c90b3c..30f0dcfd51 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 49245b5c5f..9ad8893943 100644 index fe73aef9cb..67199fd0ff 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2188,6 +2188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2208,6 +2208,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@Nullable @Nullable
public ScoreboardTeamBase getScoreboardTeam() { public ScoreboardTeamBase getScoreboardTeam() {

Datei anzeigen

@ -1,14 +1,14 @@
From 36f151f93826062aa0d486731dd87c96c6ced8dc Mon Sep 17 00:00:00 2001 From 60c47a3db5b36b1b1742c452527d895223afb2a9 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc> From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600 Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index defcfc9337..424b2b7088 100644 index 4b5b2ae34e..540f6ea8ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -538,4 +538,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -585,4 +585,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean isCollidable() { public boolean isCollidable() {
return getHandle().collides; return getHandle().collides;
} }

Datei anzeigen

@ -1,14 +1,14 @@
From a48383fd414daf754066154d927930852400201e Mon Sep 17 00:00:00 2001 From da1180199e3adcaaa60cb6370fad3352e3dc2144 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400 Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9d7bbafe02..e83ebaf4f4 100644 index c73fd79666..b7c8cab9ea 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1344,7 +1344,11 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1343,7 +1343,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit start // CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer()); PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
@ -22,7 +22,7 @@ index 9d7bbafe02..e83ebaf4f4 100644
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b993d236b5..326200fd58 100644 index afa209f227..7209794ce9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -131,6 +131,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -131,6 +131,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -36,7 +36,7 @@ index b993d236b5..326200fd58 100644
public CraftPlayer(CraftServer server, EntityPlayer entity) { public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity); super(server, entity);
@@ -1753,6 +1757,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1755,6 +1759,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().server.getCommandDispatcher().a(getHandle()); getHandle().server.getCommandDispatcher().a(getHandle());
} }

Datei anzeigen

@ -1,4 +1,4 @@
From eee12efdff4e2f32f84f028a95839c0da8018e70 Mon Sep 17 00:00:00 2001 From 20fd4a7f1c069d95060617fb16f35f8ba4b26397 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com> From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:30:17 -0400 Date: Fri, 18 Mar 2016 03:30:17 -0400
Subject: [PATCH] Allow Reloading of Custom Permissions Subject: [PATCH] Allow Reloading of Custom Permissions
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49 https://github.com/PaperMC/Paper/issues/49
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 b2861fd0ba..591d3702b5 100644 index 10588bc672..4d3a246ee5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2029,5 +2029,23 @@ public final class CraftServer implements Server { @@ -2033,5 +2033,23 @@ public final class CraftServer implements Server {
return false; return false;
} }
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 254ea00cb305b0db306aafaf25b383c0e3b83fb4 Mon Sep 17 00:00:00 2001 From 059159f7ef5559325d589a7702c9c16eb9d07d60 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400 Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies Subject: [PATCH] Handle Item Meta Inconsistencies
@ -78,7 +78,7 @@ index aa6a58dd88..b643a41235 100644
public boolean hasEnchantments() { public boolean hasEnchantments() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 9ed7f8ede4..6c00ca7378 100644 index 5d71addb0c..00497350a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
@ -193,7 +193,7 @@ index 9ed7f8ede4..6c00ca7378 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) { static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index e3ca978f89..b3f8249b06 100644 index ab77a37e75..0d513e1f33 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -24,6 +24,7 @@ import java.util.ArrayList; @@ -24,6 +24,7 @@ import java.util.ArrayList;
@ -220,7 +220,7 @@ index e3ca978f89..b3f8249b06 100644
import net.minecraft.server.NBTBase; import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTCompressedStreamTools; import net.minecraft.server.NBTCompressedStreamTools;
import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagCompound;
@@ -263,7 +266,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -268,7 +271,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private List<IChatBaseComponent> lore; private List<IChatBaseComponent> lore;
private Integer customModelData; private Integer customModelData;
private String blockData; private String blockData;
@ -229,16 +229,16 @@ index e3ca978f89..b3f8249b06 100644
private Multimap<Attribute, AttributeModifier> attributeModifiers; private Multimap<Attribute, AttributeModifier> attributeModifiers;
private int repairCost; private int repairCost;
private int hideFlag; private int hideFlag;
@@ -274,7 +277,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -279,7 +282,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private static final CraftCustomTagTypeRegistry TAG_TYPE_REGISTRY = new CraftCustomTagTypeRegistry(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
private NBTTagCompound internalTag; private NBTTagCompound internalTag;
- private final Map<String, NBTBase> unhandledTags = new HashMap<String, NBTBase>(); - private final Map<String, NBTBase> unhandledTags = new HashMap<String, NBTBase>();
+ private final Map<String, NBTBase> unhandledTags = new TreeMap<>(); // Paper + private final Map<String, NBTBase> unhandledTags = new TreeMap<>(); // Paper
private final CraftCustomItemTagContainer publicItemTagContainer = new CraftCustomItemTagContainer(TAG_TYPE_REGISTRY); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
@@ -295,7 +298,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -300,7 +303,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.blockData = meta.blockData; this.blockData = meta.blockData;
if (meta.enchantments != null) { // Spigot if (meta.enchantments != null) { // Spigot
@ -247,7 +247,7 @@ index e3ca978f89..b3f8249b06 100644
} }
if (meta.hasAttributeModifiers()) { if (meta.hasAttributeModifiers()) {
@@ -391,13 +394,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -396,13 +399,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
} }
@ -263,7 +263,7 @@ index e3ca978f89..b3f8249b06 100644
for (int i = 0; i < ench.size(); i++) { for (int i = 0; i < ench.size(); i++) {
String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT);
@@ -549,13 +552,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -554,13 +557,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
} }
@ -279,14 +279,15 @@ index e3ca978f89..b3f8249b06 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) { for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants // Doctor older enchants
String enchantKey = entry.getKey().toString(); String enchantKey = entry.getKey().toString();
@@ -798,13 +801,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -811,14 +814,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
@Override
public Map<Enchantment, Integer> getEnchants() { public Map<Enchantment, Integer> getEnchants() {
- return hasEnchants() ? ImmutableMap.copyOf(enchantments) : ImmutableMap.<Enchantment, Integer>of(); - return hasEnchants() ? ImmutableMap.copyOf(enchantments) : ImmutableMap.<Enchantment, Integer>of();
+ return hasEnchants() ? ImmutableSortedMap.copyOfSorted(enchantments) : ImmutableMap.<Enchantment, Integer>of(); // Paper + return hasEnchants() ? ImmutableSortedMap.copyOfSorted(enchantments) : ImmutableMap.<Enchantment, Integer>of(); // Paper
} }
@Override
public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) { public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
Validate.notNull(ench, "Enchantment cannot be null"); Validate.notNull(ench, "Enchantment cannot be null");
if (enchantments == null) { if (enchantments == null) {
@ -295,7 +296,7 @@ index e3ca978f89..b3f8249b06 100644
} }
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1170,7 +1173,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1196,7 +1199,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData; clone.customModelData = this.customModelData;
clone.blockData = this.blockData; clone.blockData = this.blockData;
if (this.enchantments != null) { if (this.enchantments != null) {
@ -304,7 +305,7 @@ index e3ca978f89..b3f8249b06 100644
} }
if (this.hasAttributeModifiers()) { if (this.hasAttributeModifiers()) {
clone.attributeModifiers = HashMultimap.create(this.attributeModifiers); clone.attributeModifiers = HashMultimap.create(this.attributeModifiers);
@@ -1395,6 +1398,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1424,6 +1427,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 464d72e32ae10b3fe24c1191eb13cabde58a3872 Mon Sep 17 00:00:00 2001 From 42d31ed7a97bc379dbe761f4215fbe03e7fa75a3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400 Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data Subject: [PATCH] handle NaN health/absorb values and repair bad data
@ -44,10 +44,10 @@ index 44570edcae..5ae7014887 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 326200fd58..e866480f04 100644 index 7209794ce9..7edb01082a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1563,6 +1563,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1565,6 +1565,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void setRealHealth(double health) { public void setRealHealth(double health) {

Datei anzeigen

@ -1,4 +1,4 @@
From da7e2198ebbb80405295fbe12e64addb0c7de6bc Mon Sep 17 00:00:00 2001 From 89ff2472dac345bdfabad959e4624bfd8e1c4bcf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:33:47 -0400 Date: Tue, 22 Mar 2016 00:33:47 -0400
Subject: [PATCH] Use a Shared Random for Entities Subject: [PATCH] Use a Shared Random for Entities
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9ad8893943..5744760acc 100644 index 67199fd0ff..bff30aac1c 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -51,6 +51,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -54,6 +54,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
// CraftBukkit start // CraftBukkit start
private static final int CURRENT_LEVEL = 2; private static final int CURRENT_LEVEL = 2;
@ -30,7 +30,7 @@ index 9ad8893943..5744760acc 100644
static boolean isLevelAtLeast(NBTTagCompound tag, int level) { static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
} }
@@ -182,7 +196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -185,7 +199,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.B = Vec3D.a; this.B = Vec3D.a;
this.av = 1.0F; this.av = 1.0F;
this.aw = 1.0F; this.aw = 1.0F;

Datei anzeigen

@ -1,14 +1,14 @@
From 95cb3da5a69aa89cc552cf83a94d4eeff8cb2625 Mon Sep 17 00:00:00 2001 From 8c74d27fd8b984b8301ef5712a94a74d5733a0ad Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 20 Mar 2016 06:45:01 -0400 Date: Sun, 20 Mar 2016 06:45:01 -0400
Subject: [PATCH] Access items by EquipmentSlot Subject: [PATCH] Access items by EquipmentSlot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
index d5b90069c..c7db9bd39 100644 index 5873b76236..ef4cd7a7b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
@@ -249,4 +249,54 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i @@ -268,4 +268,54 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
public void setBootsDropChance(float chance) { public void setBootsDropChance(float chance) {
throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory"); throw new UnsupportedOperationException("Cannot set drop chance for PlayerInventory");
} }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen