Update Upstream
This commit is contained in:
parent
cb24079b77
commit
eeb2ecd789
348 changed files with 1661 additions and 1710 deletions
|
@ -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>
|
||||
Date: Tue, 1 Mar 2016 00:16:08 +0100
|
||||
Subject: [PATCH] POM changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 75681af7..ec6e4d14 100644
|
||||
index 0bc8d481..be4e1ca5 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -3,33 +3,29 @@
|
||||
|
@ -33,12 +33,10 @@ index 75681af7..ec6e4d14 100644
|
|||
|
||||
<properties>
|
||||
- <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 -->
|
||||
+ <!-- Paper - #Logic -->
|
||||
+ <maven.compiler.source>1.8</maven.compiler.source>
|
||||
+ <maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 18:48:17 -0600
|
||||
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
|
||||
index b3d5a302..9d0ae63f 100644
|
||||
index 81e4fa57..f020cb04 100644
|
||||
--- a/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;
|
||||
|
@ -3436,15 +3436,15 @@ index b3d5a302..9d0ae63f 100644
|
|||
}
|
||||
|
||||
public void setFallbackCommands() {
|
||||
@@ -64,6 +63,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
* {@inheritDoc}
|
||||
@@ -67,6 +66,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
@Override
|
||||
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
|
||||
+ command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
|
||||
label = label.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -3731,10 +3731,10 @@ index 6023e4f6..00000000
|
|||
- // Spigot end
|
||||
-}
|
||||
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
|
||||
+++ 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) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
@ -3747,10 +3747,10 @@ index 36a42a80..942cb386 100644
|
|||
|
||||
@NotNull
|
||||
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
|
||||
+++ 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()]);
|
||||
}
|
||||
|
||||
@@ -333,7 +332,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -336,7 +335,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
if (result != null) {
|
||||
plugins.add(result);
|
||||
|
@ -3767,16 +3767,16 @@ index 17ddbe61..47327376 100644
|
|||
}
|
||||
|
||||
return result;
|
||||
@@ -360,7 +359,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@@ -364,7 +363,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@Nullable
|
||||
public synchronized Plugin getPlugin(@NotNull String name) {
|
||||
- return lookupNames.get(name.replace(' ', '_'));
|
||||
+ return lookupNames.get(name.replace(' ', '_').toLowerCase(java.util.Locale.ENGLISH)); // Paper
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -562,7 +561,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@@ -577,7 +576,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
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));
|
||||
} else {
|
||||
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() {
|
||||
- return useTimings;
|
||||
+ 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
|
||||
*/
|
||||
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
|
||||
index 92983c1e..2618906f 100644
|
||||
index 1173e433..82e379d1 100644
|
||||
--- a/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 {
|
||||
|
@ -3815,14 +3815,15 @@ index 92983c1e..2618906f 100644
|
|||
|
||||
/**
|
||||
* 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
|
||||
- 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
|
||||
@Override
|
||||
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
|
||||
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
|
||||
try {
|
||||
if (!eventClass.isAssignableFrom(event.getClass())) {
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 17:22:34 -0600
|
||||
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
|
||||
index 942cb386..ca0dda5a 100644
|
||||
index 4f8ae7a8..329e2b01 100644
|
||||
--- a/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
|
||||
public String getLocale();
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 17:50:31 -0600
|
||||
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
|
||||
index f948f1fc..fa7ab5af 100644
|
||||
index 699c31d9..c8439d64 100644
|
||||
--- a/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
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 18:05:37 -0600
|
||||
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
|
||||
index ca0dda5a..801c7f01 100644
|
||||
index 329e2b01..145c78c2 100644
|
||||
--- a/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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 19:45:21 -0600
|
||||
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
|
||||
index 2618906f..85139364 100644
|
||||
index 82e379d1..12601db6 100644
|
||||
--- a/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);
|
||||
} catch (Throwable ex) {
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 19:54:32 -0600
|
||||
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
|
||||
* 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
|
||||
index 801c7f01..fd88fd65 100644
|
||||
index 145c78c2..bc4ec3f2 100644
|
||||
--- a/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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 20:02:40 -0600
|
||||
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
|
||||
index fd88fd65..1de43bd3 100644
|
||||
index bc4ec3f2..abe00d72 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -396,7 +396,7 @@ index fd88fd65..1de43bd3 100644
|
|||
import org.bukkit.Achievement;
|
||||
import org.bukkit.Effect;
|
||||
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) {
|
||||
spigot().sendMessage(position, components);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 20:24:35 -0600
|
||||
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
|
||||
index 9d0ae63f..911d90fd 100644
|
||||
index f020cb04..adfc7aae 100644
|
||||
--- a/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;
|
||||
|
@ -476,7 +476,7 @@ index 9d0ae63f..911d90fd 100644
|
|||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Location;
|
||||
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.timings.stopTiming(); // Spigot // Paper
|
||||
} catch (CommandException ex) {
|
||||
|
@ -492,7 +492,7 @@ index 9d0ae63f..911d90fd 100644
|
|||
}
|
||||
|
||||
// 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) {
|
||||
throw 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
|
||||
index 47327376..ef38b2af 100644
|
||||
index 78a2d2f8..aa0c809a 100644
|
||||
--- a/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;
|
||||
|
@ -518,7 +518,7 @@ index 47327376..ef38b2af 100644
|
|||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Server;
|
||||
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 {
|
||||
plugin.getPluginLoader().enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
|
@ -528,7 +528,7 @@ index 47327376..ef38b2af 100644
|
|||
}
|
||||
|
||||
HandlerList.bakeAll();
|
||||
@@ -425,36 +430,48 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -435,36 +440,48 @@ public final class SimplePluginManager implements PluginManager {
|
||||
try {
|
||||
plugin.getPluginLoader().disablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
|
@ -579,10 +579,10 @@ index 47327376..ef38b2af 100644
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public void clearPlugins() {
|
||||
synchronized (this) {
|
||||
disablePlugins();
|
||||
@@ -519,7 +536,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -531,7 +548,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 25 Nov 2012 13:47:27 -0600
|
||||
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
|
||||
index 5427c99a..ab666fb9 100644
|
||||
index 2dbb81c1..a62f10e2 100644
|
||||
--- a/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
|
||||
*/
|
||||
boolean isCollidable();
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 4 Apr 2015 22:59:54 -0400
|
||||
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
|
||||
index 1de43bd3..c237073a 100644
|
||||
index abe00d72..eb2e392d 100644
|
||||
--- a/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 too long. The
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
|
@ -18,7 +18,7 @@ index 1de43bd3..c237073a 100644
|
|||
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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Thu, 3 Mar 2016 13:20:33 -0700
|
||||
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.
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 81861781..2f68fba2 100644
|
||||
index b7f7eeff..8f2730df 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -130,6 +130,17 @@
|
||||
|
@ -412,14 +412,15 @@ index a850f078..9026e108 100644
|
|||
+ // Paper end
|
||||
}
|
||||
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
|
||||
+++ 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
|
||||
- @Override
|
||||
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
|
||||
- try {
|
||||
- if (!eventClass.isAssignableFrom(event.getClass())) {
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 18 Mar 2016 03:28:07 -0400
|
||||
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
|
||||
index ef38b2af..e4a0f938 100644
|
||||
index aa0c809a..4cbec1f1 100644
|
||||
--- a/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) {
|
||||
co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 21 Jun 2015 15:05:21 -0400
|
||||
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
|
||||
index ee0f95b1..864c0a9e 100644
|
||||
index c2793f3e..373f4b5b 100644
|
||||
--- a/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 {
|
||||
|
@ -43,9 +43,9 @@ index ee0f95b1..864c0a9e 100644
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return this.isCancelled;
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 20 Mar 2016 06:44:49 -0400
|
||||
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
|
||||
index ef55b146..eb71f01e 100644
|
||||
index 88ce9dc6..96916ec9 100644
|
||||
--- a/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
|
||||
public HumanEntity getHolder();
|
||||
+
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 4 Mar 2016 03:13:18 -0500
|
||||
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
|
||||
index 99f73a2b..b63f2fd9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Arrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
@@ -149,4 +149,38 @@ public interface Arrow extends Projectile {
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
index 4460f6c9..a1990fef 100644
|
||||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
@@ -111,4 +111,38 @@ public interface AbstractArrow extends Projectile {
|
||||
*/
|
||||
CREATIVE_ONLY
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 16 Oct 2016 23:19:34 -0700
|
||||
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
|
||||
index 0074423f..0eaa8df9 100644
|
||||
index 0e0ed93b..d3949edf 100644
|
||||
--- a/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;
|
||||
|
@ -105,7 +105,7 @@ index 0074423f..0eaa8df9 100644
|
|||
this.bolt = bolt;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ index 0074423f..0eaa8df9 100644
|
|||
@NotNull
|
||||
@Override
|
||||
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() {
|
||||
return handlers;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 28 Nov 2016 10:16:39 -0500
|
||||
Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
|
@ -56,10 +56,10 @@ index bd2c7a69..864c263b 100644
|
|||
+ // Paper end
|
||||
}
|
||||
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
|
||||
+++ 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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 20 Dec 2016 15:55:55 -0500
|
||||
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
|
||||
index c237073a..219556ed 100644
|
||||
index eb2e392d..27ecae8b 100644
|
||||
--- a/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);
|
||||
|
||||
// Paper start
|
||||
|
@ -35,7 +35,7 @@ index c237073a..219556ed 100644
|
|||
/**
|
||||
* 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
|
||||
*
|
||||
|
@ -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) {
|
||||
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
|
||||
*
|
||||
|
@ -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) {
|
||||
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
|
||||
*
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 7 Jan 2017 15:23:03 -0500
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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 {
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 9 Jun 2017 07:24:24 -0700
|
||||
Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
@ -46,10 +46,10 @@ index f248400e..2778ce92 100644
|
|||
+ // Paper end
|
||||
}
|
||||
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
|
||||
+++ 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) {
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 10 Jun 2017 16:59:40 -0500
|
||||
Subject: [PATCH] Fix upstream javadoc warnings and errors
|
||||
|
@ -21,10 +21,10 @@ index ffebffd8..f5e3929a 100644
|
|||
*/
|
||||
@Deprecated
|
||||
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
|
||||
+++ 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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -1781,6 +1785,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -1794,6 +1798,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
* particle used (normally speed)
|
||||
* @param data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -1802,6 +1807,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -1815,6 +1820,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
* particle used (normally speed)
|
||||
* @param data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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
|
||||
* range and encourage their client to render it regardless of
|
||||
* 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);
|
||||
|
||||
@@ -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
|
||||
* range and encourage their client to render it regardless of
|
||||
* settings
|
||||
|
@ -140,10 +140,10 @@ index 734f5ac7..5efa4e60 100644
|
|||
*/
|
||||
@Deprecated
|
||||
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
|
||||
+++ 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.
|
||||
*
|
||||
|
@ -152,7 +152,7 @@ index 219556ed..c21785d5 100644
|
|||
* @param message The message to send
|
||||
*/
|
||||
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
|
||||
*
|
||||
|
@ -160,7 +160,7 @@ index 219556ed..c21785d5 100644
|
|||
* @deprecated Use {@link #updateTitle(Title)}
|
||||
*/
|
||||
@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
|
||||
*
|
||||
|
@ -168,7 +168,7 @@ index 219556ed..c21785d5 100644
|
|||
* @deprecated Use {@link #updateTitle(Title)}
|
||||
*/
|
||||
@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
|
||||
*
|
||||
|
@ -176,7 +176,7 @@ index 219556ed..c21785d5 100644
|
|||
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
|
||||
*/
|
||||
@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
|
||||
*
|
||||
|
@ -184,7 +184,7 @@ index 219556ed..c21785d5 100644
|
|||
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
|
||||
*/
|
||||
@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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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 data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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)
|
||||
* @param data the data to use for the particle or null,
|
||||
* 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);
|
||||
|
||||
@@ -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)
|
||||
* @param data the data to use for the particle or null,
|
||||
* 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
|
||||
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
|
||||
index 8b901845..374fe364 100644
|
||||
index 1b2267f4..1a58734d 100644
|
||||
--- a/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
|
||||
*/
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 7 May 2017 06:26:01 -0500
|
||||
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
|
||||
index c7599116..5777d380 100644
|
||||
index 951ea2cc..18d82c11 100644
|
||||
--- a/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;
|
||||
|
@ -16,7 +16,7 @@ index c7599116..5777d380 100644
|
|||
private boolean cancel = false;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,11 @@ index c7599116..5777d380 100644
|
|||
+ }
|
||||
+ // Paper End
|
||||
+
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
|
||||
@@ -53,6 +75,7 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
+ this.flyAtPlayer = !cancel; // Paper
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 17 Jun 2017 15:04:51 -0400
|
||||
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
|
||||
index f76bc85c..037e2393 100644
|
||||
index 6277f392..5b5fb303 100644
|
||||
--- a/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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
||||
Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
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
|
||||
+++ 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
|
||||
Location getOrigin();
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 4 May 2016 23:55:48 -0400
|
||||
Subject: [PATCH] ensureServerConversions API
|
||||
|
@ -29,10 +29,10 @@ index cbcbe8c8..8e602cf5 100644
|
|||
+ // Paper end
|
||||
}
|
||||
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
|
||||
+++ 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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 4 May 2016 23:55:48 -0400
|
||||
Subject: [PATCH] Add getI18NDisplayName API
|
||||
|
@ -29,10 +29,10 @@ index 8e602cf5..dca77bba 100644
|
|||
// Paper end
|
||||
}
|
||||
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
|
||||
+++ 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() {
|
||||
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 9 Dec 2017 12:40:25 -0500
|
||||
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.
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -24,6 +24,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@Deprecated
|
||||
@@ -25,6 +25,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
public ShapedRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
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();
|
||||
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
|
||||
index ef28e75d..823645c5 100644
|
||||
index 68447fb8..84062dd7 100644
|
||||
--- a/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 {
|
||||
@Deprecated
|
||||
@@ -26,6 +26,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
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();
|
||||
this.output = new ItemStack(result);
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 20 Dec 2017 17:38:07 -0500
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 19 Jan 2018 00:29:28 -0500
|
||||
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
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -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.
|
||||
@@ -61,6 +62,20 @@ public interface Skull extends BlockState {
|
||||
@@ -61,6 +62,20 @@ public interface Skull extends TileState {
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
index 1583764b..43cdc4c6 100644
|
||||
index 35a39203..8b2465ea 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
@@ -1,9 +1,11 @@
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 18 Mar 2018 12:28:55 -0400
|
||||
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.
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
|
@ -17,7 +17,7 @@ index c7bc13e7..06154a5c 100644
|
|||
import org.bukkit.Achievement;
|
||||
import org.bukkit.Effect;
|
||||
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}
|
||||
*/
|
||||
boolean hasResourcePack();
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 1 Apr 2018 02:28:43 +0300
|
||||
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
|
||||
index 037e2393..04f0e08f 100644
|
||||
index 5b5fb303..cdbac95b 100644
|
||||
--- a/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
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 28 Apr 2018 10:28:50 -0400
|
||||
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");
|
||||
|
||||
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
|
||||
+++ 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
|
||||
*/
|
||||
public boolean isBanned();
|
||||
|
@ -74,7 +74,7 @@ index 11eedda6..aed01189 100644
|
|||
/**
|
||||
* 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
|
||||
index 06154a5c..a840b49d 100644
|
||||
index 8f87b165..214fe2d9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1,10 +1,15 @@
|
||||
|
@ -93,7 +93,7 @@ index 06154a5c..a840b49d 100644
|
|||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
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);
|
||||
|
||||
// Paper start
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 30 Apr 2018 17:55:28 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
||||
|
@ -19,7 +19,7 @@ index ac12a8fb..14f97491 100644
|
|||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
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
|
||||
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 30 Apr 2018 19:27:31 -0400
|
||||
Subject: [PATCH] Location.isChunkLoaded() API
|
||||
|
||||
|
||||
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
|
||||
+++ 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;
|
||||
}
|
||||
|
||||
+ 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
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 29 Aug 2017 23:58:48 -0400
|
||||
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
|
||||
* color and size.
|
||||
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
|
||||
+++ 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()}
|
||||
* @param <T> Type
|
||||
*/
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 1 May 2018 21:33:35 -0400
|
||||
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
|
||||
*
|
||||
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
|
||||
+++ 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() {
|
||||
+ disablePlugins(false);
|
||||
+ }
|
||||
|
@ -74,11 +72,12 @@ index e4a0f938..269bb5ca 100644
|
|||
}
|
||||
}
|
||||
|
||||
+ // Paper start - close Classloader on disable
|
||||
@Override
|
||||
public void disablePlugin(@NotNull final Plugin plugin) {
|
||||
+ disablePlugin(plugin, false);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) {
|
||||
+ // Paper end - close Classloader on disable
|
||||
if (plugin.isEnabled()) {
|
||||
|
@ -88,8 +87,8 @@ index e4a0f938..269bb5ca 100644
|
|||
} catch (Throwable ex) {
|
||||
handlePluginException("Error occurred (in the plugin loader) while disabling "
|
||||
+ 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() {
|
||||
synchronized (this) {
|
||||
- disablePlugins();
|
||||
|
@ -98,10 +97,10 @@ index e4a0f938..269bb5ca 100644
|
|||
lookupNames.clear();
|
||||
HandlerList.unregisterAll();
|
||||
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
|
||||
+++ 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) {
|
||||
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
|
||||
|
@ -110,9 +109,9 @@ index 024d8393..ca29394d 100644
|
|||
return;
|
||||
// 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) {
|
||||
+ // Paper start - close Classloader on disable
|
||||
+ 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");
|
||||
|
||||
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) {
|
||||
removeClass(name);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Thu, 24 May 2018 21:01:13 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ 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
|
||||
+ /**
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 5 Jun 2018 22:59:50 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ 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() {
|
||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 16 Jun 2018 01:17:39 -0500
|
||||
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
|
||||
index 49c79028..01c49322 100644
|
||||
index 5ca11bb9..bf5d3096 100644
|
||||
--- a/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
|
||||
*/
|
||||
void setArrowsStuck(int arrows);
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 18 Jun 2018 00:41:46 -0500
|
||||
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
|
||||
index 34e90167..f3ae58ee 100644
|
||||
index 4f695faf..5730d5f4 100644
|
||||
--- a/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.Nullable;
|
||||
|
||||
|
@ -24,7 +24,7 @@ index 34e90167..f3ae58ee 100644
|
|||
/**
|
||||
* Represents a 3-dimensional position in a world.
|
||||
* <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);
|
||||
return centerLoc;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ index 34e90167..f3ae58ee 100644
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public Collection<Entity> getNearbyEntities(double x, double y, double z) {
|
||||
+ World world = this.getWorld();
|
||||
+ if (world == null) {
|
||||
+ throw new IllegalArgumentException("Location has no world");
|
||||
+ }
|
||||
|
@ -263,6 +264,7 @@ index 34e90167..f3ae58ee 100644
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ 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) {
|
||||
+ throw new IllegalArgumentException("Location has no world");
|
||||
+ }
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 19 Dec 2017 16:24:42 -0500
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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 org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
|
@ -17,7 +17,7 @@ index f3ae58ee..b5a6ac16 100644
|
|||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ index f3ae58ee..b5a6ac16 100644
|
|||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ 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
|
||||
+ */
|
||||
+ 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
|
||||
+ */
|
||||
+ 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
|
||||
+ */
|
||||
+ 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
|
||||
+ */
|
||||
+ 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
|
||||
+ */
|
||||
+ 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.
|
||||
*
|
||||
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
|
||||
+++ 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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 22 Jun 2018 22:59:18 -0400
|
||||
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
|
||||
index 7a4ace35..72e268c1 100644
|
||||
index f129121e..690abbba 100644
|
||||
--- a/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;
|
||||
|
@ -18,7 +18,7 @@ index 7a4ace35..72e268c1 100644
|
|||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
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
|
||||
return ensureServerConversions().getMaxItemUseDuration();
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 29 Jun 2018 00:19:19 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -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.PotionEffectType;
|
||||
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
|
||||
*/
|
||||
void setShieldBlockingDelay(int delay);
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 3 Jul 2018 16:07:16 +0200
|
||||
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
|
||||
index 9579437b..8d23ad74 100644
|
||||
index eb5860b2..3f934c80 100644
|
||||
--- a/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
|
||||
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 4 Jul 2018 02:25:48 -0400
|
||||
Subject: [PATCH] Entity#getChunk API
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
|
|||
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
|
||||
index a1edcf02..9391bbf0 100644
|
||||
index 35d0909b..adca48f1 100644
|
||||
--- a/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;
|
||||
|
@ -17,7 +17,7 @@ index a1edcf02..9391bbf0 100644
|
|||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
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
|
||||
*/
|
||||
boolean fromMobSpawner();
|
||||
|
|
|
@ -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>
|
||||
Date: Thu, 19 Jul 2018 15:07:02 -0500
|
||||
Subject: [PATCH] Add an asterisk to legacy API plugins
|
||||
|
@ -42,10 +42,10 @@ index d4e74d29..6cfd9f3c 100644
|
|||
|
||||
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
|
||||
index ca29394d..ed7455c3 100644
|
||||
index bc7bf6a3..31a70b29 100644
|
||||
--- a/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");
|
||||
|
||||
if (!plugin.isEnabled()) {
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 25 Jul 2018 01:36:07 -0400
|
||||
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);
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -518,6 +518,54 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
||||
@@ -546,6 +546,54 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
||||
|
||||
// Paper start
|
||||
+
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 9 Sep 2018 00:32:05 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ 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
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -391,7 +391,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param plugin Plugin to check
|
||||
@@ -398,7 +398,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @return true if the plugin is enabled, otherwise false
|
||||
*/
|
||||
@Override
|
||||
- public boolean isPluginEnabled(@Nullable Plugin plugin) {
|
||||
+ public synchronized boolean isPluginEnabled(@Nullable Plugin plugin) { // Paper - synchronize
|
||||
if ((plugin != null) && (plugins.contains(plugin))) {
|
||||
return plugin.isEnabled();
|
||||
} 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 synchronized void enablePlugin(@NotNull final Plugin plugin) { // Paper - synchronize
|
||||
if (!plugin.isEnabled()) {
|
||||
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
||||
|
||||
@@ -436,7 +436,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
disablePlugin(plugin, false);
|
||||
@@ -445,7 +445,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) {
|
||||
+ public synchronized void disablePlugin(@NotNull final Plugin plugin, boolean closeClassloader) { // Paper - synchronize
|
||||
// Paper end - close Classloader on disable
|
||||
if (plugin.isEnabled()) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ index 269bb5ca..5d99a41a 100644
|
|||
|
||||
/**
|
||||
* Calls an event with the given details.
|
||||
@@ -505,25 +506,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param event Event details
|
||||
@@ -516,25 +517,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@Override
|
||||
public void callEvent(@NotNull Event event) {
|
||||
- if (event.isAsynchronous()) {
|
||||
- if (Thread.holdsLock(this)) {
|
||||
|
@ -97,7 +97,7 @@ index 269bb5ca..5d99a41a 100644
|
|||
RegisteredListener[] listeners = handlers.getRegisteredListeners();
|
||||
|
||||
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
|
||||
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
@@ -17,7 +17,7 @@ public class PluginManagerTest {
|
||||
|
@ -126,7 +126,7 @@ index 5e986de8..2b50fe63 100644
|
|||
@Test
|
||||
public void testAsyncLocked() throws InterruptedException {
|
||||
final Event event = new TestEvent(true);
|
||||
@@ -123,7 +123,7 @@ public class PluginManagerTest {
|
||||
@@ -127,7 +127,7 @@ public class PluginManagerTest {
|
||||
if (store.value == null) {
|
||||
throw new IllegalStateException("No exception thrown");
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
Date: Thu, 2 Aug 2018 08:44:20 -0500
|
||||
Subject: [PATCH] Add hand to bucket events
|
||||
|
@ -30,7 +30,7 @@ index cdf2e201..5e93f1bb 100644
|
|||
@Override
|
||||
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
|
||||
index d0ccba06..280ca87b 100644
|
||||
index d2990a20..dfc76add 100644
|
||||
--- a/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;
|
||||
|
@ -79,9 +79,9 @@ index d0ccba06..280ca87b 100644
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
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
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 4 Aug 2018 19:37:35 -0400
|
||||
Subject: [PATCH] Provide Chunk Coordinates as a Long API
|
||||
|
@ -44,10 +44,10 @@ index e583f86d..7302b6e3 100644
|
|||
* Gets the world containing this chunk
|
||||
*
|
||||
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
|
||||
+++ 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
|
||||
public Chunk getChunkAt(@NotNull Block block);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Mon, 29 Feb 2016 17:43:33 -0600
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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) {
|
||||
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
|
||||
index 5098eade..b0ba2d97 100644
|
||||
index 2d3cee14..f41243f9 100644
|
||||
--- a/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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 14 Aug 2018 21:42:10 -0700
|
||||
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]
|
||||
|
||||
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
|
||||
+++ 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
|
||||
import java.util.Collection;
|
||||
|
@ -29,7 +29,7 @@ index 8e444f7f..e546407e 100644
|
|||
import java.util.function.Predicate;
|
||||
import org.bukkit.entity.Entity;
|
||||
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());
|
||||
return blockLoc;
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ index 8e444f7f..e546407e 100644
|
|||
* @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
|
||||
index 99527eb5..446d91c5 100644
|
||||
index a06d7a0d..4d35efb0 100644
|
||||
--- a/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
|
||||
public Block getBlockAt(@NotNull Location location);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 21 Aug 2018 19:39:46 -0700
|
||||
Subject: [PATCH] isChunkGenerated API
|
||||
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.bukkit;
|
||||
|
||||
@@ -3,6 +3,7 @@ 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 java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -517,6 +518,15 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
||||
@@ -545,6 +546,16 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
||||
|
||||
// Paper start
|
||||
+ /**
|
||||
|
@ -25,6 +26,7 @@ index e546407e..7713f183 100644
|
|||
+ * @return true if a chunk has been generated at this location
|
||||
+ */
|
||||
+ public boolean isGenerated() {
|
||||
+ World world = this.getWorld();
|
||||
+ Preconditions.checkNotNull(world, "Location has no world!");
|
||||
+ 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
|
||||
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
|
||||
+++ 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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 4 Sep 2018 15:01:54 -0500
|
||||
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
|
||||
index a840b49d..1b3a6a91 100644
|
||||
index 214fe2d9..024528ba 100644
|
||||
--- a/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
|
||||
*/
|
||||
void setPlayerProfile(@NotNull PlayerProfile profile);
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 12 Sep 2018 18:53:35 +0300
|
||||
Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values
|
||||
|
@ -226,10 +226,10 @@ index f5e3929a..8648e8fb 100644
|
|||
return key;
|
||||
}
|
||||
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
|
||||
+++ 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
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
|
|
@ -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>
|
||||
Date: Thu, 13 Sep 2018 20:51:50 -0400
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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);
|
||||
|
||||
|
@ -35,7 +35,7 @@ index 27c14c0f..72fff64e 100644
|
|||
} else {
|
||||
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);
|
||||
|
||||
|
@ -50,60 +50,61 @@ index 27c14c0f..72fff64e 100644
|
|||
return perm.getDefault().getValue(isOp());
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
- 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
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("Permission name cannot be 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
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin) { // Paper - synchronized
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -130,7 +136,7 @@ public class PermissibleBase implements Permissible {
|
||||
return result;
|
||||
@@ -139,7 +145,7 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void removeAttachment(@NotNull PermissionAttachment attachment) {
|
||||
+ public synchronized void removeAttachment(@NotNull PermissionAttachment attachment) { // Paper - synchronized
|
||||
if (attachment == 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 synchronized void recalculatePermissions() { // Paper - synchronized
|
||||
clearPermissions();
|
||||
Set<Permission> defaults = Bukkit.getServer().getPluginManager().getDefaultPermissions(isOp());
|
||||
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
|
||||
- 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
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("Permission name cannot be 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
|
||||
- public PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) {
|
||||
+ public synchronized PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) { // Paper - synchronized
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -235,7 +241,7 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
@@ -248,7 +254,7 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
- public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
||||
+ public synchronized Set<PermissionAttachmentInfo> getEffectivePermissions() { // Paper - synchronized
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 17 Jul 2018 01:27:15 -0400
|
||||
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
|
||||
index 596384b1..763befad 100644
|
||||
index 61993528..5f9d3482 100644
|
||||
--- a/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 {
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 7 Oct 2018 00:54:15 -0500
|
||||
Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
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
|
||||
+++ 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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 18 Nov 2018 15:53:43 +0000
|
||||
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!
|
||||
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
|
||||
@@ -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) {
|
||||
+ // Paper start
|
||||
+ if (cancel && !isCancellable) {
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 23 Oct 2018 19:32:55 +0300
|
||||
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
|
||||
index 8227b375..cc750eb3 100644
|
||||
index 1d061412..6fda7f3a 100644
|
||||
--- a/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) {
|
||||
channel = validateAndCorrectChannel(channel);
|
||||
|
||||
|
@ -16,9 +16,9 @@ index 8227b375..cc750eb3 100644
|
|||
+ 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
|
||||
index c15fa003..31ff2f61 100644
|
||||
index dce3d619..7e2335ed 100644
|
||||
--- a/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 {
|
||||
|
|
|
@ -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>
|
||||
Date: Wed, 2 Jan 2019 00:31:12 -0600
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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.
|
||||
*
|
||||
* @return Date of last log-in for this player, or 0
|
||||
|
@ -29,7 +29,7 @@ index aed01189..f6782e0d 100644
|
|||
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
|
||||
public Location getBedSpawnLocation();
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Tue, 28 Jan 2014 19:13:57 -0500
|
||||
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
|
||||
|
||||
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
|
||||
+++ 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;
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,10 @@ index 038ed0a6..2181f09b 100644
|
|||
* 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
|
||||
index 823645c5..062924ea 100644
|
||||
index 84062dd7..ddcf84e6 100644
|
||||
--- a/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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 24 Mar 2019 00:21:23 -0400
|
||||
Subject: [PATCH] Entity#getEntitySpawnReason
|
||||
|
@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
|
|||
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
|
||||
index b0ba2d97..61aa4999 100644
|
||||
index f41243f9..29229c64 100644
|
||||
--- a/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
|
||||
Chunk getChunk();
|
||||
|
|
|
@ -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>
|
||||
Date: Sun, 24 Mar 2019 18:39:01 -0400
|
||||
Subject: [PATCH] Flip some Spigot API null annotations
|
||||
|
@ -31,10 +31,10 @@ index 3b883b93..9f56e7f8 100644
|
|||
return server.getTag(registry, tag, clazz);
|
||||
}
|
||||
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
|
||||
+++ 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 z The z-coordinate of this new location
|
||||
*/
|
||||
|
@ -43,24 +43,24 @@ index 7713f183..c12d2a26 100644
|
|||
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 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(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) { // Paper
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
@@ -80,7 +80,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
*
|
||||
* @return World that contains this location
|
||||
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
||||
if (world != null) {
|
||||
this.world = new WeakReference<>(world);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
* @throws IllegalArgumentException when world is unloaded
|
||||
* @see #isWorldLoaded()
|
||||
*/
|
||||
- @Nullable
|
||||
+ @UndefinedNullability
|
||||
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
|
||||
index 63a661bd..2f2be03f 100644
|
||||
--- 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
|
||||
index 76da06d1..4f72cd7c 100644
|
||||
index 6d18de76..495161f6 100644
|
||||
--- a/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
|
||||
|
@ -116,7 +116,7 @@ index 76da06d1..4f72cd7c 100644
|
|||
import org.bukkit.Utility;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
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
|
||||
*/
|
||||
|
|
|
@ -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>
|
||||
Date: Sat, 1 Dec 2018 19:00:36 -0800
|
||||
Subject: [PATCH] Add Heightmap API
|
||||
|
@ -46,10 +46,10 @@ index 00000000..4cd9b5ed
|
|||
+ SOLID_OR_LIQUID_NO_LEAVES;
|
||||
+}
|
||||
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
|
||||
+++ 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;
|
||||
}
|
||||
|
||||
|
@ -84,10 +84,10 @@ index c12d2a26..1eef404e 100644
|
|||
* 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
|
||||
index 696cd649..5469ee4f 100644
|
||||
index 951eba31..2da92d39 100644
|
||||
--- a/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
|
||||
public Block getHighestBlockAt(@NotNull Location location);
|
||||
|
||||
|
|
|
@ -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>
|
||||
Date: Fri, 19 Apr 2019 12:41:19 -0500
|
||||
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
|
||||
index 5773e99e..31c5a006 100644
|
||||
index e73fb0ef..2ff0f24d 100644
|
||||
--- a/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
|
||||
*/
|
||||
public void setSpawnRange(int spawnRange);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue