We're going on an Adventure! (#4842)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
Riley Park 2021-02-21 11:45:33 -08:00 committed by GitHub
parent 1a97356116
commit 4e958e229f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
948 changed files with 7844 additions and 1589 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,11 +5,11 @@ Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f22b21ee12496452f7b2125c131f56ecc74d439a..ab1a2816e3bc78be103823fd61cc5d01f8362552 100644 index 447de8f7c1d871ef5fb1a06bace451e1de06d972..0ec05e160a8ebe2aea374b1225dbd8ea24a418e3 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1272,6 +1272,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1404,6 +1404,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@NotNull @Deprecated // Paper
public String getLocale(); public String getLocale();
+ // Paper start + // Paper start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 7c715fdc11ab7837552b1fe3ffd08b31cec0a63b..984bec345cbb8038d8756f5ab5553143f04a5044 100644 index 426b1e83226e674ee4bf3ec05ddcd3ac4376b06d..cd1b4be422a3a4290579d5daed9466084f18ed60 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1421,6 +1421,17 @@ public final class Bukkit { @@ -1531,6 +1531,17 @@ public final class Bukkit {
return server.getEntity(uuid); return server.getEntity(uuid);
} }
@ -27,10 +27,10 @@ index 7c715fdc11ab7837552b1fe3ffd08b31cec0a63b..984bec345cbb8038d8756f5ab5553143
* Get the advancement specified by this key. * Get the advancement specified by this key.
* *
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index a6b9e4f158583e5932bf8ca210d531857e9f5360..0be1d5d5fa5a6d687820d767e501a54f93fd72b4 100644 index d9515a79dc7ed60c66960cd6c6bb4c108f206f3c..9ec374570e135a4ba14db7efdbb5c1bd213226eb 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1192,6 +1192,16 @@ public interface Server extends PluginMessageRecipient { @@ -1290,6 +1290,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@Nullable @Nullable
Entity getEntity(@NotNull UUID uuid); Entity getEntity(@NotNull UUID uuid);

View File

@ -5,15 +5,14 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 344c14a5ed86e9ebe401bfb5ba3aedc0c0ed0b04..7c3100d44ca42fe9c9ffedad321be9f2e446491a 100644 index 41a1bc45cc5eb7f19374115ade7f5328c7fc1dae..e9d0d507b47b0347b975b1a83f5ae70dca5587b8 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -602,4 +602,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -609,5 +609,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@Override default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
Spigot spigot(); return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName())));
// Spigot end }
+ +
+ // Paper start
+ /** + /**
+ * Gets the location where this entity originates from. + * Gets the location where this entity originates from.
+ * <p> + * <p>
@ -23,7 +22,7 @@ index 344c14a5ed86e9ebe401bfb5ba3aedc0c0ed0b04..7c3100d44ca42fe9c9ffedad321be9f2
+ */ + */
+ @Nullable + @Nullable
+ Location getOrigin(); + Location getOrigin();
+ // Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
index 64f9d3fd870d65afd2ee9a85625b149163eee144..14cb0d770561151570ab4399ca5facff43076819 100644 index 64f9d3fd870d65afd2ee9a85625b149163eee144..14cb0d770561151570ab4399ca5facff43076819 100644

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ab1a2816e3bc78be103823fd61cc5d01f8362552..85c242034d125e5760952900557b10418ec5605b 100644 index 0ec05e160a8ebe2aea374b1225dbd8ea24a418e3..e304ccf40047f6df290c8db6fde312eb88d85d7c 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1286,6 +1286,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1418,6 +1418,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param affects Whether the player can affect mob spawning * @param affects Whether the player can affect mob spawning
*/ */
public void setAffectsSpawning(boolean affects); public void setAffectsSpawning(boolean affects);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 984bec345cbb8038d8756f5ab5553143f04a5044..4747afa841b4fa71328c480f836f9fefb2e0c118 100644 index cd1b4be422a3a4290579d5daed9466084f18ed60..10274053320f1ec690a65d3794abb44b58658059 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1595,6 +1595,19 @@ public final class Bukkit { @@ -1705,6 +1705,19 @@ public final class Bukkit {
return server.getUnsafe(); return server.getUnsafe();
} }
@ -29,10 +29,10 @@ index 984bec345cbb8038d8756f5ab5553143f04a5044..4747afa841b4fa71328c480f836f9fef
public static Server.Spigot spigot() { public static Server.Spigot spigot() {
return server.spigot(); return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 0be1d5d5fa5a6d687820d767e501a54f93fd72b4..1f8095141bdbfabb1e487d93f33f636e83084386 100644 index 9ec374570e135a4ba14db7efdbb5c1bd213226eb..7e4a728ceb943b6a32b9ba9b84bada34e71c0980 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1202,6 +1202,15 @@ public interface Server extends PluginMessageRecipient { @@ -1300,6 +1300,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
public double[] getTPS(); public double[] getTPS();
// Paper end // Paper end

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
Change Javadoc to be accurate Change Javadoc to be accurate
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74fbea894a0 100644 index 10274053320f1ec690a65d3794abb44b58658059..22b83b142de97dcba28fa9a49730de7880d0b5d2 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -283,6 +283,26 @@ public final class Bukkit { @@ -285,6 +285,30 @@ public final class Bukkit {
return server.broadcastMessage(message); return server.broadcastMessage(message);
} }
@ -18,7 +18,9 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f
+ * Sends the component to all online players. + * Sends the component to all online players.
+ * + *
+ * @param component the component to send + * @param component the component to send
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Deprecated
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ server.broadcast(component); + server.broadcast(component);
+ } + }
@ -27,7 +29,9 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f
+ * Sends an array of components as a single message to all online players. + * Sends an array of components as a single message to all online players.
+ * + *
+ * @param components the components to send + * @param components the components to send
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Deprecated
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ server.broadcast(components); + server.broadcast(components);
+ } + }
@ -37,11 +41,11 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f
* Gets the name of the update folder. The update folder is used to safely * Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load. * update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a8728e762 100644 index 7e4a728ceb943b6a32b9ba9b84bada34e71c0980..9ce9b4ce2da6c57c62607502ae2042e30fc26d88 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -232,6 +232,26 @@ public interface Server extends PluginMessageRecipient { @@ -234,6 +234,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/ @Deprecated // Paper
public int broadcastMessage(@NotNull String message); public int broadcastMessage(@NotNull String message);
+ // Paper start + // Paper start
@ -49,7 +53,9 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a
+ * Sends the component to all online players. + * Sends the component to all online players.
+ * + *
+ * @param component the component to send + * @param component the component to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Deprecated
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ spigot().broadcast(component); + spigot().broadcast(component);
+ } + }
@ -58,7 +64,9 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a
+ * Sends an array of components as a single message to all online players. + * Sends an array of components as a single message to all online players.
+ * + *
+ * @param components the components to send + * @param components the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Deprecated
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ spigot().broadcast(components); + spigot().broadcast(components);
+ } + }
@ -68,10 +76,10 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a
* Gets the name of the update folder. The update folder is used to safely * Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load. * update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58aea727543c 100644 index e304ccf40047f6df290c8db6fde312eb88d85d7c..d504299c0e1dfec3f191dc10ebebbc595130e417 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -482,6 +482,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -604,6 +604,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);
@ -80,8 +88,10 @@ index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58ae
+ * Sends the component to the player + * Sends the component to the player
+ * + *
+ * @param component the components to send + * @param component the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Override + @Override
+ @Deprecated
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ spigot().sendMessage(component); + spigot().sendMessage(component);
+ } + }
@ -90,8 +100,10 @@ index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58ae
+ * Sends an array of components as a single message to the player + * Sends an array of components as a single message to the player
+ * + *
+ * @param components the components to send + * @param components the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */ + */
+ @Override + @Override
+ @Deprecated
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ spigot().sendMessage(components); + spigot().sendMessage(components);
+ } + }

View File

@ -7,10 +7,10 @@ Co-authored-by: Fruxz <cedricspitzer@outlook.de>
diff --git a/src/main/java/com/destroystokyo/paper/Title.java b/src/main/java/com/destroystokyo/paper/Title.java diff --git a/src/main/java/com/destroystokyo/paper/Title.java b/src/main/java/com/destroystokyo/paper/Title.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a580b4e923 index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb902cb35d8c
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/Title.java +++ b/src/main/java/com/destroystokyo/paper/Title.java
@@ -0,0 +1,417 @@ @@ -0,0 +1,420 @@
+package com.destroystokyo.paper; +package com.destroystokyo.paper;
+ +
+import net.md_5.bungee.api.chat.BaseComponent; +import net.md_5.bungee.api.chat.BaseComponent;
@ -34,7 +34,10 @@ index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a5
+ * Represents a title to may be sent to a {@link Player}. + * Represents a title to may be sent to a {@link Player}.
+ * + *
+ * <p>A title can be sent without subtitle text.</p> + * <p>A title can be sent without subtitle text.</p>
+ *
+ * @deprecated use {@link net.kyori.adventure.title.Title}
+ */ + */
+@Deprecated
+public final class Title { +public final class Title {
+ +
+ /** + /**
@ -429,7 +432,7 @@ index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a5
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f00255725c9bd 100644 index d504299c0e1dfec3f191dc10ebebbc595130e417..57b8b776a9c882c7dc7b790c4cb5b1515e71d45b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -2,6 +2,7 @@ package org.bukkit.entity;
@ -440,7 +443,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -512,6 +513,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -638,6 +639,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components); spigot().sendMessage(position, components);
} }
@ -450,7 +453,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * + *
+ * @param header content for the top of the player list + * @param header content for the top of the player list
+ * @param footer content for the bottom of the player list + * @param footer content for the bottom of the player list
+ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)}
+ */ + */
+ @Deprecated
+ public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent[] header, @Nullable net.md_5.bungee.api.chat.BaseComponent[] footer); + public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent[] header, @Nullable net.md_5.bungee.api.chat.BaseComponent[] footer);
+ +
+ /** + /**
@ -458,7 +463,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * + *
+ * @param header content for the top of the player list + * @param header content for the top of the player list
+ * @param footer content for the bottom of the player list + * @param footer content for the bottom of the player list
+ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)}
+ */ + */
+ @Deprecated
+ public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable net.md_5.bungee.api.chat.BaseComponent footer); + public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable net.md_5.bungee.api.chat.BaseComponent footer);
+ +
+ /** + /**
@ -467,7 +474,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * @param fadeInTicks ticks to fade-in + * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible + * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out + * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #updateTitle(Title)} + * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks); + public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks);
@ -475,7 +482,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ /** + /**
+ * Update the subtitle of titles displayed to the player + * Update the subtitle of titles displayed to the player
+ * + *
+ * @deprecated Use {@link #updateTitle(Title)} + * @param subtitle Subtitle to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle); + public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle);
@ -483,7 +491,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ /** + /**
+ * Update the subtitle of titles displayed to the player + * Update the subtitle of titles displayed to the player
+ * + *
+ * @deprecated Use {@link #updateTitle(Title)} + * @param subtitle Subtitle to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle); + public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle);
@ -491,7 +500,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ /** + /**
+ * Show the given title to the player, along with the last subtitle set, using the last set times + * Show the given title to the player, along with the last subtitle set, using the last set times
+ * + *
+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} + * @param title Title to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title); + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title);
@ -499,7 +509,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ /** + /**
+ * Show the given title to the player, along with the last subtitle set, using the last set times + * Show the given title to the player, along with the last subtitle set, using the last set times
+ * + *
+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} + * @param title Title to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title); + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title);
@ -512,7 +523,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * @param fadeInTicks ticks to fade-in + * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible + * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out + * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} + * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
@ -525,7 +536,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * @param fadeInTicks ticks to fade-in + * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible + * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out + * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} + * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated + @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
@ -537,7 +548,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * + *
+ * @param title the title to send + * @param title the title to send
+ * @throws NullPointerException if the title is null + * @throws NullPointerException if the title is null
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated
+ void sendTitle(@NotNull Title title); + void sendTitle(@NotNull Title title);
+ +
+ /** + /**
@ -547,12 +560,17 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025
+ * + *
+ * @param title the title to send + * @param title the title to send
+ * @throws NullPointerException if title is null + * @throws NullPointerException if title is null
+ * @deprecated use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */ + */
+ @Deprecated
+ void updateTitle(@NotNull Title title); + void updateTitle(@NotNull Title title);
+ +
+ /** + /**
+ * Hide any title that is currently visible to the player + * Hide any title that is currently visible to the player
+ *
+ * @deprecated use {@link #clearTitle()}
+ */ + */
+ @Deprecated
+ public void hideTitle(); + public void hideTitle();
// Paper end // Paper end

View File

@ -5,15 +5,24 @@ Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99d8369f52 100644 index 2588edf75483855e0c843834f39ca371770730b9..6aa795fe79ceca03c1725c36f2b0d3a63acd134e 100644
--- a/src/main/java/org/bukkit/command/CommandSender.java --- a/src/main/java/org/bukkit/command/CommandSender.java
+++ b/src/main/java/org/bukkit/command/CommandSender.java +++ b/src/main/java/org/bukkit/command/CommandSender.java
@@ -99,4 +99,30 @@ public interface CommandSender extends Permissible { @@ -1,6 +1,9 @@
@NotNull package org.bukkit.command;
Spigot spigot();
// Spigot end import java.util.UUID;
+import net.kyori.adventure.audience.MessageType;
+import net.kyori.adventure.identity.Identity;
+import net.kyori.adventure.text.Component;
import org.bukkit.Server;
import org.bukkit.permissions.Permissible;
import org.jetbrains.annotations.NotNull;
@@ -117,5 +120,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity identity, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
this.sendMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(message));
}
+ +
+ // Paper start
+ /** + /**
+ * Sends the component to the sender + * Sends the component to the sender
+ * + *
@ -21,7 +30,9 @@ index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99
+ * the component will be sent as legacy text.</p> + * the component will be sent as legacy text.</p>
+ * + *
+ * @param component the component to send + * @param component the component to send
+ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead
+ */ + */
+ @Deprecated
+ default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ this.sendMessage(component.toLegacyText()); + this.sendMessage(component.toLegacyText());
+ } + }
@ -33,9 +44,11 @@ index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99
+ * the components will be sent as legacy text.</p> + * the components will be sent as legacy text.</p>
+ * + *
+ * @param components the components to send + * @param components the components to send
+ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead
+ */ + */
+ @Deprecated
+ default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ this.sendMessage(new net.md_5.bungee.api.chat.TextComponent(components).toLegacyText()); + this.sendMessage(new net.md_5.bungee.api.chat.TextComponent(components).toLegacyText());
+ } + }
+ // Paper end // Paper end
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffdb690533a 100644 index 57b8b776a9c882c7dc7b790c4cb5b1515e71d45b..a7cdc67738dc2b7f9a67118bb0b5372ae16966e7 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1022,7 +1022,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1163,7 +1163,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The * @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value. * length restriction is an implementation specific arbitrary value.
@ -18,11 +18,11 @@ index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffd
public void setResourcePack(@NotNull String url); public void setResourcePack(@NotNull String url);
/** /**
@@ -1468,6 +1470,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1625,6 +1627,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
public void openBook(@NotNull ItemStack book); return net.kyori.adventure.text.event.HoverEvent.showEntity(this.getType().getKey(), this.getUniqueId(), this.displayName());
}
+ // Paper start +
+ /** + /**
+ * Request that the player's client download and switch resource packs. + * Request that the player's client download and switch resource packs.
+ * <p> + * <p>
@ -76,11 +76,9 @@ index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffd
+ * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} + * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
+ */ + */
+ boolean hasResourcePack(); + boolean hasResourcePack();
+ // Paper end // Paper end
+
// Spigot start
public class Spigot extends Entity.Spigot {
// Spigot start
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
index b98195650d49d78ec35970ca0376b6289b861e4b..4c2102a11c3d682d98f0db4ccafa35231e66bcdd 100644 index b98195650d49d78ec35970ca0376b6289b861e4b..4c2102a11c3d682d98f0db4ccafa35231e66bcdd 100644
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods. Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 58fc279186e01a4703102227f387e96272fcf0a7..e040e0e37276295a0b7404357679e80fbbb618a3 100644 index a6565a93848213a39694dc84be75aebcc327b1b8..aa893ec821f7c54ecf430b4b95aa52ccbfebf898 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -128,6 +128,17 @@ @@ -150,6 +150,17 @@
<version>9.0</version> <version>9.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index dcb3af5a6d4fedcb805928223e40c74fbea894a0..ffa6be2424774960e36288d02f06d591e30d49d0 100644 index 22b83b142de97dcba28fa9a49730de7880d0b5d2..945d75525465739dd30610dff985ea0fb0f1c8df 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1626,6 +1626,13 @@ public final class Bukkit { @@ -1740,6 +1740,13 @@ public final class Bukkit {
public static org.bukkit.command.CommandMap getCommandMap() { public static org.bukkit.command.CommandMap getCommandMap() {
return server.getCommandMap(); return server.getCommandMap();
} }
@ -24,10 +24,10 @@ index dcb3af5a6d4fedcb805928223e40c74fbea894a0..ffa6be2424774960e36288d02f06d591
@NotNull @NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 00738355e42704de583b60833d4fb39a8728e762..7b2eb7b8a77a4ca8ae6e4e8c66597f83627bd199 100644 index 9ce9b4ce2da6c57c62607502ae2042e30fc26d88..f69c30ebea9c9e9add0b6c97994be0ce64a80ad3 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1432,4 +1432,6 @@ public interface Server extends PluginMessageRecipient { @@ -1538,4 +1538,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull @NotNull
Spigot spigot(); Spigot spigot();
// Spigot end // Spigot end

View File

@ -7,12 +7,15 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf960346721701 index 0000000000000000000000000000000000000000..d67dade3af3fb0f8b7e5c267087abf6320b433e7
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
@@ -0,0 +1,222 @@ @@ -0,0 +1,248 @@
+package com.destroystokyo.paper.event.player; +package com.destroystokyo.paper.event.player;
+ +
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.apache.commons.lang.Validate; +import org.apache.commons.lang.Validate;
+import org.bukkit.event.Cancellable; +import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event; +import org.bukkit.event.Event;
@ -40,7 +43,7 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603
+ @Nullable private UUID uniqueId; + @Nullable private UUID uniqueId;
+ @Nullable private String propertiesJson; + @Nullable private String propertiesJson;
+ private boolean failed; + private boolean failed;
+ private String failMessage = "If you wish to use IP forwarding, please enable it in your BungeeCord config as well!"; + private Component failMessage = Component.text("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!", NamedTextColor.YELLOW);
+ +
+ /** + /**
+ * Creates a new {@link PlayerHandshakeEvent}. + * Creates a new {@link PlayerHandshakeEvent}.
@ -208,7 +211,7 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603
+ * @return the message to display to the client + * @return the message to display to the client
+ */ + */
+ @NotNull + @NotNull
+ public String getFailMessage() { + public Component failMessage() {
+ return this.failMessage; + return this.failMessage;
+ } + }
+ +
@ -217,9 +220,32 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603
+ * + *
+ * @param failMessage the message to display to the client + * @param failMessage the message to display to the client
+ */ + */
+ public void failMessage(@NotNull Component failMessage) {
+ this.failMessage = failMessage;
+ }
+
+ /**
+ * Gets the message to display to the client when authentication fails.
+ *
+ * @return the message to display to the client
+ * @deprecated use {@link #failMessage()}
+ */
+ @NotNull
+ @Deprecated
+ public String getFailMessage() {
+ return LegacyComponentSerializer.legacySection().serialize(this.failMessage());
+ }
+
+ /**
+ * Sets the message to display to the client when authentication fails.
+ *
+ * @param failMessage the message to display to the client
+ * @deprecated use {@link #failMessage(Component)}
+ */
+ @Deprecated
+ public void setFailMessage(@NotNull String failMessage) { + public void setFailMessage(@NotNull String failMessage) {
+ Validate.notEmpty(failMessage, "fail message cannot be null or empty"); + Validate.notEmpty(failMessage, "fail message cannot be null or empty");
+ this.failMessage = failMessage; + this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
+ } + }
+ +
+ @NotNull + @NotNull

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index ffa6be2424774960e36288d02f06d591e30d49d0..84ac91aa533f9c3e5c1e9107404fda5ec519ca02 100644 index 945d75525465739dd30610dff985ea0fb0f1c8df..555ef4c187ce0c83cc29af145694ec9c448d452e 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1633,6 +1633,15 @@ public final class Bukkit { @@ -1747,6 +1747,15 @@ public final class Bukkit {
public static void reloadPermissions() { public static void reloadPermissions() {
server.reloadPermissions(); server.reloadPermissions();
} }
@ -26,10 +26,10 @@ index ffa6be2424774960e36288d02f06d591e30d49d0..84ac91aa533f9c3e5c1e9107404fda5e
@NotNull @NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 7b2eb7b8a77a4ca8ae6e4e8c66597f83627bd199..75800dc49b66c240da92430f1defc9f63966e0b6 100644 index f69c30ebea9c9e9add0b6c97994be0ce64a80ad3..9d81f25e39d345b797f73855a802b186d77f6d12 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1434,4 +1434,6 @@ public interface Server extends PluginMessageRecipient { @@ -1540,4 +1540,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
// Spigot end // Spigot end
void reloadPermissions(); // Paper void reloadPermissions(); // Paper

View File

@ -5,10 +5,18 @@ Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb232915991f9ff 100644 index a7cdc67738dc2b7f9a67118bb0b5372ae16966e7..a94d7fcb841c9ddae7d5521c2a2fed382b4d2aed 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -484,6 +484,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3,6 +3,7 @@ package org.bukkit.entity;
import java.net.InetSocketAddress;
import java.util.UUID;
import com.destroystokyo.paper.Title; // Paper
+import net.kyori.adventure.text.Component;
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -606,6 +607,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);
// Paper start // Paper start
@ -19,7 +27,9 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291
+ * Use Section symbols for legacy color codes to send formatting. + * Use Section symbols for legacy color codes to send formatting.
+ * + *
+ * @param message The message to send + * @param message The message to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */ + */
+ @Deprecated
+ public void sendActionBar(@NotNull String message); + public void sendActionBar(@NotNull String message);
+ +
+ /** + /**
@ -29,20 +39,24 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291
+ * + *
+ * @param alternateChar Alternate symbol such as '&' + * @param alternateChar Alternate symbol such as '&'
+ * @param message The message to send + * @param message The message to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */ + */
+ @Deprecated
+ public void sendActionBar(char alternateChar, @NotNull String message); + public void sendActionBar(char alternateChar, @NotNull String message);
+ +
+ /** + /**
+ * Sends an Action Bar message to the client. + * Sends an Action Bar message to the client.
+ * + *
+ * @param message The components to send + * @param message The components to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */ + */
+ @Deprecated
+ public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message); + public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message);
+ +
/** /**
* Sends the component to the player * Sends the component to the player
* *
@@ -507,9 +534,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -633,9 +667,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends an array of components as a single message to the specified screen position of this player * Sends an array of components as a single message to the specified screen position of this player
* *
@ -54,27 +68,19 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components); spigot().sendMessage(position, components);
} }
@@ -1593,9 +1622,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1752,6 +1788,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends the component to the specified screen position of this player * Sends the component to the specified screen position of this player
* *
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client. + * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
* @param position the screen position * @param position the screen position
* @param component the components to send * @param component the components to send
*/ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ @Deprecated @@ -1764,6 +1801,7 @@ 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 component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1603,9 +1634,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends an array of components as a single message to the specified screen position of this player * Sends an array of components as a single message to the specified screen position of this player
* *
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client. + * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
* @param position the screen position * @param position the screen position
* @param components the components to send * @param components the components to send
*/ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ @Deprecated
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.");
}

View File

@ -7,12 +7,12 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index b8a33ac504da73ec990550bdd23e4548f6ccba95..5432b2713ab110a1d41bdf7372a5807426ab5443 100644 index 6b5dbe4ea711807a1944cfe2aae2ce415d4f2638..789e070f6aee83e4b6426def784e05df98e1bc65 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable; @@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;
*/ */
public interface World extends PluginMessageRecipient, Metadatable { public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
+ // Paper start + // Paper start
+ /** + /**

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 84ac91aa533f9c3e5c1e9107404fda5ec519ca02..777352a820b21bc013b671b62f89ae4c6418e3cb 100644 index 555ef4c187ce0c83cc29af145694ec9c448d452e..2527e896a4409326ea2612723b829696d44fc199 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1642,6 +1642,16 @@ public final class Bukkit { @@ -1756,6 +1756,16 @@ public final class Bukkit {
public static boolean reloadCommandAliases() { public static boolean reloadCommandAliases() {
return server.reloadCommandAliases(); return server.reloadCommandAliases();
} }
@ -27,10 +27,10 @@ index 84ac91aa533f9c3e5c1e9107404fda5ec519ca02..777352a820b21bc013b671b62f89ae4c
@NotNull @NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 75800dc49b66c240da92430f1defc9f63966e0b6..02c1d054744cb0564c6593938af278e6388adfb4 100644 index 9d81f25e39d345b797f73855a802b186d77f6d12..7d94242b2f8ecb537b3140f9d6f706d3e266c456 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1436,4 +1436,14 @@ public interface Server extends PluginMessageRecipient { @@ -1542,4 +1542,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
void reloadPermissions(); // Paper void reloadPermissions(); // Paper
boolean reloadCommandAliases(); // Paper boolean reloadCommandAliases(); // Paper

View File

@ -1,102 +0,0 @@
From 0000000000000000000000000000000000000000 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
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fd235f7ac71b0243d2189e89efb232915991f9ff..b422abde1a504aa36c726e1c0597da11c1b6afd0 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -499,7 +499,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
- * @param alternateChar Alternate symbol such as '&'
+ * @param alternateChar Alternate symbol such as '&amp;'
* @param message The message to send
*/
public void sendActionBar(char alternateChar, @NotNull String message);
@@ -573,6 +573,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -581,6 +582,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -589,6 +591,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
*
+ * @param title Title to set
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
@@ -597,6 +600,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
*
+ * @param title Title to set
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
index 1cb70b5c8776863f44f1c4cdde152c35cb51edb5..da26531c42abb074c805352e0f8467a970195a01 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
@@ -43,7 +43,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
* {@link Player#setBedSpawnLocation(Location)}.
*
* @return true if the spawn location will be changed
+ * @deprecated NOT IMPLEMENTED <!-- paper -->
*/
+ @Deprecated // Paper
public boolean shouldSetSpawnLocation() {
return setBedSpawn;
}
@@ -59,7 +61,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
* {@link Player#setBedSpawnLocation(Location)}.
*
* @param setBedSpawn true to change the new spawn location
+ * @deprecated NOT IMPLEMENTED <!-- paper -->
*/
+ @Deprecated // Paper
public void setSpawnLocation(boolean setBedSpawn) {
this.setBedSpawn = setBedSpawn;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
*
* @return Location the player moved to
*/
- @Nullable
+ @NotNull // Paper
public Location getTo() {
return to;
}
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory {
*
* @return the ItemStack in the given slot
*/
- @NotNull
+ @Nullable
public ItemStack getItem(@NotNull EquipmentSlot slot);
/**

View File

@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 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
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a94d7fcb841c9ddae7d5521c2a2fed382b4d2aed..9cf7adf244335ac7dccbdf11f605a8c6910f7414 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -624,7 +624,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
- * @param alternateChar Alternate symbol such as '&'
+ * @param alternateChar Alternate symbol such as '&amp;'
* @param message The message to send
* @deprecated use {@link #sendActionBar(Component)}
*/
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
*
* @return Location the player moved to
*/
- @Nullable
+ @NotNull // Paper
public Location getTo() {
return to;
}
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory {
*
* @return the ItemStack in the given slot
*/
- @NotNull
+ @Nullable
public ItemStack getItem(@NotNull EquipmentSlot slot);
/**

View File

@ -6,12 +6,14 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a776359f4d index 0000000000000000000000000000000000000000..4643b7e640e5c1b53de8ee575b3a760fa9b1d2e8
--- /dev/null --- /dev/null
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java +++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
@@ -0,0 +1,82 @@ @@ -0,0 +1,114 @@
+package org.bukkit.event.command; +package org.bukkit.event.command;
+ +
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.bukkit.command.CommandSender; +import org.bukkit.command.CommandSender;
+import org.bukkit.event.HandlerList; +import org.bukkit.event.HandlerList;
+import org.bukkit.event.Event; +import org.bukkit.event.Event;
@ -26,9 +28,14 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7
+ private static final HandlerList handlers = new HandlerList(); + private static final HandlerList handlers = new HandlerList();
+ @NotNull private CommandSender sender; + @NotNull private CommandSender sender;
+ @NotNull private String commandLine; + @NotNull private String commandLine;
+ @Nullable private String message; + @Nullable private Component message;
+ +
+ @Deprecated
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) { + public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) {
+ this(sender, commandLine, message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message));
+ }
+
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final Component message) {
+ super(false); + super(false);
+ this.sender = sender; + this.sender = sender;
+ this.commandLine = commandLine; + this.commandLine = commandLine;
@ -62,12 +69,37 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7
+ * <p> + * <p>
+ * + *
+ * @return Unknown command message + * @return Unknown command message
+ * @deprecated use {@link #message()}
+ */ + */
+ @Nullable + @Nullable
+ @Deprecated
+ public String getMessage() { + public String getMessage() {
+ return message; + return this.message == null ? null : LegacyComponentSerializer.legacySection().serialize(this.message);
+ } + }
+ +
+ /**
+ * Sets message that will be returned
+ * <p>
+ * Set to null to avoid any message being sent
+ *
+ * @param message the message to be returned, or null
+ * @deprecated use {@link #message(Component)}
+ */
+ @Deprecated
+ public void setMessage(@Nullable String message) {
+ this.message(message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message));
+ }
+
+ /**
+ * Gets message that will be returned
+ * <p>
+ *
+ * @return Unknown command message
+ */
+ @Nullable
+ public Component message() {
+ return this.message;
+ }
+ +
+ /** + /**
+ * Sets message that will be returned + * Sets message that will be returned
@ -76,7 +108,7 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7
+ * + *
+ * @param message the message to be returned, or null + * @param message the message to be returned, or null
+ */ + */
+ public void setMessage(@Nullable String message) { + public void message(@Nullable Component message) {
+ this.message = message; + this.message = message;
+ } + }
+ +

View File

@ -267,10 +267,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 777352a820b21bc013b671b62f89ae4c6418e3cb..c7019397923f9f9349bb5fdd15455f2dbf99bfd5 100644 index 2527e896a4409326ea2612723b829696d44fc199..f5d3a7370390871d1b6075f32846d1a942b05b7f 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1652,6 +1652,40 @@ public final class Bukkit { @@ -1766,6 +1766,40 @@ public final class Bukkit {
public static boolean suggestPlayerNamesWhenNullTabCompletions() { public static boolean suggestPlayerNamesWhenNullTabCompletions() {
return server.suggestPlayerNamesWhenNullTabCompletions(); return server.suggestPlayerNamesWhenNullTabCompletions();
} }
@ -312,10 +312,10 @@ index 777352a820b21bc013b671b62f89ae4c6418e3cb..c7019397923f9f9349bb5fdd15455f2d
@NotNull @NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 02c1d054744cb0564c6593938af278e6388adfb4..66d0a3c6de2ea3c0a2fe3cd160a52f0cabe58ef3 100644 index 7d94242b2f8ecb537b3140f9d6f706d3e266c456..38d138b217734e598581ed14065ff2015135ee9a 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -1445,5 +1445,33 @@ public interface Server extends PluginMessageRecipient { @@ -1551,5 +1551,33 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return true if player names should be suggested * @return true if player names should be suggested
*/ */
boolean suggestPlayerNamesWhenNullTabCompletions(); boolean suggestPlayerNamesWhenNullTabCompletions();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 7c3100d44ca42fe9c9ffedad321be9f2e446491a..a73af8caad4014fecbca9c1c09cb519cb1fc3eb1 100644 index e9d0d507b47b0347b975b1a83f5ae70dca5587b8..feb9507a972bf797144a01adeeaac83ec2bd165a 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -613,5 +613,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -619,5 +619,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/ */
@Nullable @Nullable
Location getOrigin(); Location getOrigin();

View File

@ -7,14 +7,14 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations. to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 4ff149fd98895dd8ba45939a37c223b1f8d7281f..bb3f7cdc13dc015f88d3eaf5997f391528599d2a 100644 index 3dba4c361993e143e511b4f108ac0b444a84d964..30ab5d38197bccfc06f6f5554b162f8bdbfe2a45 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java --- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -141,4 +141,17 @@ public interface ItemFactory { @@ -151,5 +151,17 @@ public interface ItemFactory {
@Deprecated */
@NotNull @NotNull
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException; net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op);
+ // Paper start +
+ /** + /**
+ * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks. + * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks.
+ * + *
@ -26,13 +26,13 @@ index 4ff149fd98895dd8ba45939a37c223b1f8d7281f..bb3f7cdc13dc015f88d3eaf5997f3915
+ */ + */
+ @NotNull + @NotNull
+ ItemStack ensureServerConversions(@NotNull ItemStack item); + ItemStack ensureServerConversions(@NotNull ItemStack item);
+ // Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b064f3b81 100644 index 4b20b557eaa958cf1ad1baf8d6cc17f38b180ff1..c31f667c466ba80bd88ae560d14dbd18a84118b4 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
} }
} }
@ -41,12 +41,11 @@ index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b
} }
/** /**
@@ -595,4 +595,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -602,5 +602,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
public net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op) {
return true; return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op);
} }
+ +
+ // Paper start
+ /** + /**
+ * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks. + * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks.
+ * + *
@ -59,5 +58,5 @@ index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b
+ public ItemStack ensureServerConversions() { + public ItemStack ensureServerConversions() {
+ return Bukkit.getServer().getItemFactory().ensureServerConversions(this); + return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
+ } + }
+ // Paper end // Paper end
} }

View File

@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar. You must replace the language file embedded in the server jar.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index bb3f7cdc13dc015f88d3eaf5997f391528599d2a..3cada34873e6da92363c8d920f3bbbd0670a32e0 100644 index 30ab5d38197bccfc06f6f5554b162f8bdbfe2a45..3578f491a053154789ad696e93c70fdde74912e6 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java --- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -153,5 +153,16 @@ public interface ItemFactory { @@ -163,5 +163,16 @@ public interface ItemFactory {
*/ */
@NotNull @NotNull
ItemStack ensureServerConversions(@NotNull ItemStack item); ItemStack ensureServerConversions(@NotNull ItemStack item);
@ -29,10 +29,10 @@ index bb3f7cdc13dc015f88d3eaf5997f391528599d2a..3cada34873e6da92363c8d920f3bbbd0
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 07aa65d1a2056422b7b5ec98be970d5b064f3b81..e9ba311522a50572e6f1cb4554ba8e24a55cbb8a 100644 index c31f667c466ba80bd88ae560d14dbd18a84118b4..77d6b2ed68d8ce30b5cadb156941d2d1f7dcf5b1 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java --- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -609,5 +609,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @@ -615,5 +615,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
public ItemStack ensureServerConversions() { public ItemStack ensureServerConversions() {
return Bukkit.getServer().getItemFactory().ensureServerConversions(this); return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
} }

View File

@ -9,10 +9,10 @@ Allows you to do dynamic whitelisting and change of kick message
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a488535e84b9e index 0000000000000000000000000000000000000000..c6f5e2b5459368ad1e4db9929ca14568a25793fa
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
@@ -0,0 +1,117 @@ @@ -0,0 +1,142 @@
+/* +/*
+ * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License + * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License
+ * + *
@ -39,6 +39,8 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885
+package com.destroystokyo.paper.event.profile; +package com.destroystokyo.paper.event.profile;
+ +
+import com.destroystokyo.paper.profile.PlayerProfile; +import com.destroystokyo.paper.profile.PlayerProfile;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.bukkit.event.Event; +import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList; +import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
@ -49,7 +51,6 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885
+ * + *
+ * Plugins may override/control the servers whitelist with this event, + * Plugins may override/control the servers whitelist with this event,
+ * and dynamically change the kick message. + * and dynamically change the kick message.
+ *
+ */ + */
+public class ProfileWhitelistVerifyEvent extends Event { +public class ProfileWhitelistVerifyEvent extends Event {
+ private static final HandlerList handlers = new HandlerList(); + private static final HandlerList handlers = new HandlerList();
@ -57,9 +58,14 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885
+ private final boolean whitelistEnabled; + private final boolean whitelistEnabled;
+ private boolean whitelisted; + private boolean whitelisted;
+ private final boolean isOp; + private final boolean isOp;
+ @Nullable private String kickMessage; + @Nullable private Component kickMessage;
+ +
+ @Deprecated
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) { + public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) {
+ this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
+ }
+
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable Component kickMessage) {
+ this.profile = profile; + this.profile = profile;
+ this.whitelistEnabled = whitelistEnabled; + this.whitelistEnabled = whitelistEnabled;
+ this.whitelisted = whitelisted; + this.whitelisted = whitelisted;
@ -69,16 +75,35 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885
+ +
+ /** + /**
+ * @return the currently planned message to send to the user if they are not whitelisted + * @return the currently planned message to send to the user if they are not whitelisted
+ * @deprecated use {@link #kickMessage()}
+ */ + */
+ @Deprecated
+ @Nullable + @Nullable
+ public String getKickMessage() { + public String getKickMessage() {
+ return kickMessage; + return this.kickMessage == null ? null : LegacyComponentSerializer.legacySection().serialize(kickMessage);
+ }
+
+ /**
+ * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
+ * @deprecated Use {@link #kickMessage(Component)}
+ */
+ @Deprecated
+ public void setKickMessage(@Nullable String kickMessage) {
+ this.kickMessage(kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
+ }
+
+ /**
+ * @return the currently planned message to send to the user if they are not whitelisted
+ */
+ @Nullable
+ public Component kickMessage() {
+ return this.kickMessage;
+ } + }
+ +
+ /** + /**
+ * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default + * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
+ */ + */
+ public void setKickMessage(@Nullable String kickMessage) { + public void kickMessage(@Nullable Component kickMessage) {
+ this.kickMessage = kickMessage; + this.kickMessage = kickMessage;
+ } + }
+ +

View File

@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction. several layers of logging abstraction.
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index e040e0e37276295a0b7404357679e80fbbb618a3..7747189d49727eea039f3994e186b34480025144 100644 index aa893ec821f7c54ecf430b4b95aa52ccbfebf898..78d13b0487ea6876b19e07d186f273dedefda9bf 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -109,6 +109,13 @@ @@ -131,6 +131,13 @@
<version>20.1.0</version> <version>20.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -57,15 +57,15 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
+ +
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index b422abde1a504aa36c726e1c0597da11c1b6afd0..7295e8c12cb1333da4f954b2c77e5794141839f8 100644 index 9cf7adf244335ac7dccbdf11f605a8c6910f7414..04f1a6513711dde8576c9b5c2b04619c56b48d8a 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable; @@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
/** /**
* Represents a player, connected or not * Represents a player, connected or not
*/ */
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient { -public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, com.destroystokyo.paper.network.NetworkClient { // Paper - Extend NetworkClient +public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, com.destroystokyo.paper.network.NetworkClient { // Paper
/** // Paper start
* Gets the "friendly" name to display of this player. This may include @Override

View File

@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added. Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7295e8c12cb1333da4f954b2c77e5794141839f8..86a7ba58ef26ef0053c516408b47f7ba4cb0b80b 100644 index 04f1a6513711dde8576c9b5c2b04619c56b48d8a..02f1c1646be730fc70f235e79323963d90c2cda8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -738,12 +738,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -882,12 +882,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void resetPlayerWeather(); public void resetPlayerWeather();

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login. This will allow you to change the players name or skin on login.
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a06208270200f576c02 100644 index 992d1025ca02020e87a9ab5db83d249427f41d69..a40b57edb1aeff71fc0b9767d410950da5c06283 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -2,6 +2,9 @@ package org.bukkit.event.player; @@ -2,6 +2,9 @@ package org.bukkit.event.player;
@ -22,7 +22,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020
@@ -15,9 +18,9 @@ public class AsyncPlayerPreLoginEvent extends Event { @@ -15,9 +18,9 @@ public class AsyncPlayerPreLoginEvent extends Event {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private Result result; private Result result;
private String message; private net.kyori.adventure.text.Component message; // Paper
- private final String name; - private final String name;
+ //private String name; // Paper - Not used anymore + //private String name; // Paper - Not used anymore
private final InetAddress ipAddress; private final InetAddress ipAddress;
@ -62,7 +62,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020
+ this.profile = profile; + this.profile = profile;
+ // Paper end + // Paper end
this.result = Result.ALLOWED; this.result = Result.ALLOWED;
this.message = ""; this.message = net.kyori.adventure.text.Component.empty(); // Paper
- this.name = name; - this.name = name;
+ //this.name = name; // Paper - Not used anymore + //this.name = name; // Paper - Not used anymore
this.ipAddress = ipAddress; this.ipAddress = ipAddress;
@ -71,7 +71,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020
} }
/** /**
@@ -140,7 +168,7 @@ public class AsyncPlayerPreLoginEvent extends Event { @@ -193,7 +221,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
*/ */
@NotNull @NotNull
public String getName() { public String getName() {
@ -80,7 +80,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020
} }
/** /**
@@ -160,7 +188,7 @@ public class AsyncPlayerPreLoginEvent extends Event { @@ -213,7 +241,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
*/ */
@NotNull @NotNull
public UUID getUniqueId() { public UUID getUniqueId() {

View File

@ -8,10 +8,10 @@ and allows full control of the response sent to the client.
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803efb236855e index 0000000000000000000000000000000000000000..baac2e4f090a490372ef4aed92c8a5771955e921
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
@@ -0,0 +1,323 @@ @@ -0,0 +1,334 @@
+package com.destroystokyo.paper.event.server; +package com.destroystokyo.paper.event.server;
+ +
+import static java.util.Objects.requireNonNull; +import static java.util.Objects.requireNonNull;
@ -55,6 +55,7 @@ index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803ef
+ private boolean originalPlayerCount = true; + private boolean originalPlayerCount = true;
+ private Object[] players; + private Object[] players;
+ +
+ @Deprecated
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers, + public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) { + @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
+ super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers); + super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
@ -65,6 +66,16 @@ index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803ef
+ setServerIcon(favicon); + setServerIcon(favicon);
+ } + }
+ +
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
+ super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
+ this.client = client;
+ this.numPlayers = numPlayers;
+ this.version = version;
+ this.protocolVersion = protocolVersion;
+ setServerIcon(favicon);
+ }
+
+ /** + /**
+ * Returns the {@link StatusClient} pinging the server. + * Returns the {@link StatusClient} pinging the server.
+ * + *

View File

@ -6,18 +6,18 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in. This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 86a7ba58ef26ef0053c516408b47f7ba4cb0b80b..7d3bf348e4a4b0b68042df4d72a98285c0e0da94 100644 index 02f1c1646be730fc70f235e79323963d90c2cda8..34a810ad1b259ada407785dd7083f1fef20d7495 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -4,6 +4,7 @@ import java.net.InetSocketAddress;
import java.net.InetSocketAddress;
import java.util.UUID; import java.util.UUID;
import com.destroystokyo.paper.Title; // Paper import com.destroystokyo.paper.Title; // Paper
import net.kyori.adventure.text.Component;
+import com.destroystokyo.paper.profile.PlayerProfile; // Paper +import com.destroystokyo.paper.profile.PlayerProfile; // Paper
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -1578,6 +1579,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1738,6 +1739,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/ */
boolean hasResourcePack(); boolean hasResourcePack();

View File

@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index c7019397923f9f9349bb5fdd15455f2dbf99bfd5..9ea3d8695dbfbfffb02919531a86b713cade7bec 100644 index f5d3a7370390871d1b6075f32846d1a942b05b7f..2d7f8e128e23934a8fe26baf19198b7ffc8447bb 100644
--- a/src/main/java/org/bukkit/Bukkit.java --- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java
@@ -498,6 +498,20 @@ public final class Bukkit { @@ -504,6 +504,20 @@ public final class Bukkit {
return server.getPlayer(id); return server.getPlayer(id);
} }
@ -34,10 +34,10 @@ index c7019397923f9f9349bb5fdd15455f2dbf99bfd5..9ea3d8695dbfbfffb02919531a86b713
* Gets the plugin manager for interfacing with plugins. * Gets the plugin manager for interfacing with plugins.
* *
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 66d0a3c6de2ea3c0a2fe3cd160a52f0cabe58ef3..89deb6890e008832df06c4b6392ffb32d88a9c2d 100644 index 38d138b217734e598581ed14065ff2015135ee9a..01657abaff86cf7bb3ffb857024c5032781b8660 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -423,6 +423,18 @@ public interface Server extends PluginMessageRecipient { @@ -429,6 +429,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@Nullable @Nullable
public Player getPlayer(@NotNull UUID id); public Player getPlayer(@NotNull UUID id);

View File

@ -74,12 +74,12 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958
/** /**
* Checks if this player is whitelisted or not * Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7d3bf348e4a4b0b68042df4d72a98285c0e0da94..1ba7e5c66159d8ff208f3e796a3e6569e060967c 100644 index 34a810ad1b259ada407785dd7083f1fef20d7495..443f657dcd7906d48fe656bce601ff5a2365bd3d 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -4,6 +4,10 @@ import java.net.InetSocketAddress; @@ -5,6 +5,10 @@ import java.util.UUID;
import java.util.UUID;
import com.destroystokyo.paper.Title; // Paper import com.destroystokyo.paper.Title; // Paper
import net.kyori.adventure.text.Component;
import com.destroystokyo.paper.profile.PlayerProfile; // Paper import com.destroystokyo.paper.profile.PlayerProfile; // Paper
+import java.util.Date; // Paper +import java.util.Date; // Paper
+import org.bukkit.BanEntry; // Paper +import org.bukkit.BanEntry; // Paper
@ -88,7 +88,7 @@ index 7d3bf348e4a4b0b68042df4d72a98285c0e0da94..1ba7e5c66159d8ff208f3e796a3e6569
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -485,6 +489,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -608,6 +612,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map); public void sendMap(@NotNull MapView map);
// Paper start // Paper start

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591345411e6 100644 index 789e070f6aee83e4b6426def784e05df98e1bc65..96e985eb98ab620e315aec13222b8f0334e5fe0a 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
@ -19,7 +19,7 @@ index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -635,6 +638,256 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -635,6 +638,256 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@NotNull @NotNull
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes); public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
@ -277,7 +277,7 @@ index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591
* Get a list of all players in this World * Get a list of all players in this World
* *
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index 16352c7dab042c5042020a06208270200f576c02..e5b811229830e4d55b08ab18bedec1494ff342ac 100644 index a40b57edb1aeff71fc0b9767d410950da5c06283..184d9462ebbc500d8b81aaf14fe138d247bf2470 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -42,8 +42,7 @@ public class AsyncPlayerPreLoginEvent extends Event { @@ -42,8 +42,7 @@ public class AsyncPlayerPreLoginEvent extends Event {

View File

@ -515,10 +515,10 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217
* Options which can be applied to redstone dust particles - a particle * Options which can be applied to redstone dust particles - a particle
* color and size. * color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 4bffb3cadebb2081e8caae6b9d127591345411e6..994e289fcbfef03a56d005f9d1b91151f2cecfaa 100644 index 96e985eb98ab620e315aec13222b8f0334e5fe0a..1473b1ef341f13fbd634b81a058bf3148de7b2c6 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2551,7 +2551,57 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -2550,7 +2550,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
*/ */

Some files were not shown because too many files have changed in this diff Show More