geforkt von Mirrors/Paper
Move Adventure patch up
Dieser Commit ist enthalten in:
Ursprung
00bee38624
Commit
7c5b21d9d3
@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Server extends PluginMessageRecipient {
|
||||
public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
+ /**
|
||||
+ * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
|
@ -75,37 +75,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// workaround for https://github.com/gradle/gradle/issues/4046
|
||||
inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
|
||||
doLast {
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
-public class TimingsReportListener implements MessageCommandSender {
|
||||
+public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender { // Paper
|
||||
private final List<CommandSender> senders;
|
||||
private final Runnable onDone;
|
||||
private String timingsURL;
|
||||
@@ -0,0 +0,0 @@ public class TimingsReportListener implements MessageCommandSender {
|
||||
this.senders.add(Bukkit.getConsoleSender());
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
|
||||
+ net.kyori.adventure.audience.ForwardingAudience.super.sendMessage(source, message, type);
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterable<? extends net.kyori.adventure.audience.Audience> audiences() {
|
||||
+ return this.senders;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/chat/ChatRenderer.java b/src/main/java/io/papermc/paper/chat/ChatRenderer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
@ -844,8 +813,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
/**
|
||||
* Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Used for all administrative messages, such as an operator using a
|
||||
* command.
|
||||
* <p>
|
||||
@ -1149,8 +1116,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
||||
+ // Paper end
|
||||
|
||||
void reportTimings(); // Paper
|
||||
Material toLegacy(Material material);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Warning.java b/src/main/java/org/bukkit/Warning.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Warning.java
|
||||
@ -1317,10 +1284,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
protected String usageMessage;
|
||||
private String permission;
|
||||
- private String permissionMessage;
|
||||
- public org.spigotmc.CustomTimingsHandler timings; // Spigot
|
||||
+ private net.kyori.adventure.text.Component permissionMessage; // Paper
|
||||
public co.aikar.timings.Timing timings; // Paper
|
||||
@NotNull public String getTimingName() {return getName();} // Paper
|
||||
|
||||
protected Command(@NotNull String name) {
|
||||
this(name, "", "/" + name, new ArrayList<String>());
|
||||
@@ -0,0 +0,0 @@ public abstract class Command {
|
||||
|
||||
if (permissionMessage == null) {
|
||||
@ -1492,23 +1460,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/command/MessageCommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
|
||||
@@ -0,0 +0,0 @@ public interface MessageCommandSender extends CommandSender {
|
||||
default String getName() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ default net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component name() {
|
||||
+ throw new NotImplementedException();
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
@Override
|
||||
default boolean isOp() {
|
||||
diff --git a/src/main/java/org/bukkit/command/PluginCommandYamlParser.java b/src/main/java/org/bukkit/command/PluginCommandYamlParser.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/command/PluginCommandYamlParser.java
|
||||
@ -2166,7 +2117,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
|
@ -1893,13 +1893,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.command.RemoteConsoleCommandSender;
|
||||
+
|
||||
+import java.util.List;
|
||||
+import java.util.UUID;
|
||||
+
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+@SuppressWarnings("WeakerAccess")
|
||||
+public class TimingsReportListener implements MessageCommandSender {
|
||||
+public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender {
|
||||
+ private final List<CommandSender> senders;
|
||||
+ private final Runnable onDone;
|
||||
+ private String timingsURL;
|
||||
@ -1943,6 +1942,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
|
||||
+ net.kyori.adventure.audience.ForwardingAudience.super.sendMessage(source, message, type);
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterable<? extends net.kyori.adventure.audience.Audience> audiences() {
|
||||
+ return this.senders;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(@NotNull String message) {
|
||||
+ senders.forEach((sender) -> sender.sendMessage(message));
|
||||
+ }
|
||||
@ -2797,7 +2807,7 @@ diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Ser
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@ -2828,9 +2838,9 @@ diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukk
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||
@Deprecated
|
||||
public interface UnsafeValues {
|
||||
@@ -0,0 +0,0 @@ public interface UnsafeValues {
|
||||
net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
||||
// Paper end
|
||||
|
||||
+ void reportTimings(); // Paper
|
||||
Material toLegacy(Material material);
|
||||
@ -2883,8 +2893,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@ public abstract class Command {
|
||||
protected String usageMessage;
|
||||
private String permission;
|
||||
private String permissionMessage;
|
||||
- public org.spigotmc.CustomTimingsHandler timings; // Spigot
|
||||
private net.kyori.adventure.text.Component permissionMessage; // Paper
|
||||
+ public co.aikar.timings.Timing timings; // Paper
|
||||
+ @NotNull public String getTimingName() {return getName();} // Paper
|
||||
|
||||
@ -2981,6 +2990,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return Bukkit.getServer();
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ default net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component name() {
|
||||
+ throw new NotImplementedException();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ default String getName() {
|
||||
@ -3381,7 +3397,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
+
|
||||
|
@ -11,8 +11,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
" - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
|
||||
" - Server Name: " + timingsServerName);
|
||||
config.addDefault(path, def);
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
+
|
||||
+ public static boolean useDisplayNameInQuit = false;
|
||||
|
@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
}
|
||||
useDisplayNameInQuit = getBoolean("settings.use-display-name-in-quit-message", useDisplayNameInQuit);
|
||||
" - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
|
||||
" - Server Name: " + timingsServerName);
|
||||
}
|
||||
+
|
||||
+ public static boolean loadPermsBeforePlugins = true;
|
||||
|
@ -689,8 +689,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public class PaperConfig {
|
||||
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
config.addDefault(path, def);
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
useDisplayNameInQuit = getBoolean("settings.use-display-name-in-quit-message", useDisplayNameInQuit);
|
||||
}
|
||||
+
|
||||
+ public static String timingsServerName;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren