mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@ca8da0e3 Commands PaperMC/Paper@e0437448 /net/minecraft/world/entity/decoration/ PaperMC/Paper@d251511d net\minecraft\worldntity\projectile\ PaperMC/Paper@62c4dda5 /net/minecraft/world/entity/monster PaperMC/Paper@4a821685 ServerPlayer, ServerLevel, ServerEntity PaperMC/Paper@6d71abd2 Other random classes PaperMC/Paper@f44197c4 net/minecraft/world/entity/item PaperMC/Paper@2f152e01 Fix some compile errors PaperMC/Paper@92ece7b6 Fix dropped diff PaperMC/Paper@8c974745 readd dropped ack diff
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
|
||||
From: File <noreply+automated@papermc.io>
|
||||
Date: Sun, 20 Apr 1997 06:37:42 -0700
|
||||
Subject: [PATCH] purpur File Patches
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java
|
||||
index cb63e4c264a31788cd1405428af70f7a018910e9..4d06587cd55af988eecdda5186577ab72ca3d533 100644
|
||||
--- a/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -455,6 +455,19 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
@@ -540,6 +553,30 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
}
|
||||
}
|
||||
|
||||
+ // 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;
|
||||
boolean flag1 = allowLogging && this.source.shouldInformAdmins() && !this.silent;
|
||||
Reference in New Issue
Block a user