mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@4a903d81 Readd dropped diff PaperMC/Paper@4fe0ac24 Some more comments PaperMC/Paper@19a36413 Last per file patches PaperMC/Paper@e49b5e88 Fix compile issues: PaperMC/Paper@1b30919a Fix PaperMC/Paper@df964545 Fixup whatever happened here PaperMC/Paper@5933bd5b TrialSpawner compile fixes PaperMC/Paper@20136f71 Some initial adoption of ValueInput/Output PaperMC/Paper@a1bfc19a Some more compilation issues PaperMC/Paper@d16b93e6 Generator PaperMC/Paper@c34fb5f8 Test fixes PaperMC/Paper@f3bad8c8 Prepare work on feature patches PaperMC/Paper@ed3b39e9 14 first feature patches PaperMC/Paper@ff05a2df Hacky EAR 2.0 fixes
54 lines
2.0 KiB
Diff
54 lines
2.0 KiB
Diff
--- a/net/minecraft/commands/CommandSourceStack.java
|
|
+++ b/net/minecraft/commands/CommandSourceStack.java
|
|
@@ -457,6 +_,19 @@
|
|
}
|
|
// CraftBukkit end
|
|
|
|
+ // Purpur start - Gamemode extra permissions
|
|
+ public boolean testPermission(int i, String bukkitPermission) {
|
|
+ if (hasPermission(i, bukkitPermission)) {
|
|
+ return true;
|
|
+ }
|
|
+ net.kyori.adventure.text.Component permissionMessage = getLevel().getServer().server.permissionMessage();
|
|
+ if (!permissionMessage.equals(net.kyori.adventure.text.Component.empty())) {
|
|
+ sendFailure(io.papermc.paper.adventure.PaperAdventure.asVanilla(permissionMessage.replaceText(net.kyori.adventure.text.TextReplacementConfig.builder().matchLiteral("<permission>").replacement(bukkitPermission).build())));
|
|
+ }
|
|
+ return false;
|
|
+ }
|
|
+ // Purpur end - Gamemode extra permissions
|
|
+
|
|
public Vec3 getPosition() {
|
|
return this.worldPosition;
|
|
}
|
|
@@ -541,6 +_,30 @@
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ // Purpur start - Purpur config files
|
|
+ public void sendSuccess(@Nullable String message) {
|
|
+ sendSuccess(message, false);
|
|
+ }
|
|
+
|
|
+ public void sendSuccess(@Nullable String message, boolean broadcastToOps) {
|
|
+ if (message == null) {
|
|
+ return;
|
|
+ }
|
|
+ sendSuccess(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(message), broadcastToOps);
|
|
+ }
|
|
+
|
|
+ public void sendSuccess(@Nullable net.kyori.adventure.text.Component message) {
|
|
+ sendSuccess(message, false);
|
|
+ }
|
|
+
|
|
+ public void sendSuccess(@Nullable net.kyori.adventure.text.Component message, boolean broadcastToOps) {
|
|
+ if (message == null) {
|
|
+ return;
|
|
+ }
|
|
+ sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(message), broadcastToOps);
|
|
+ }
|
|
+ // Purpur end - Purpur config files
|
|
|
|
public void sendSuccess(Supplier<Component> messageSupplier, boolean allowLogging) {
|
|
boolean flag = this.source.acceptsSuccess() && !this.silent;
|