9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00

Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@479a7d8 Updated Upstream (Paper)
PurpurMC/Purpur@5d3572d Updated Upstream (Paper)
PurpurMC/Purpur@9ace81b update paperweight version
PurpurMC/Purpur@818fa0d Updated Upstream (Paper)
This commit is contained in:
NONPLAYT
2024-05-12 17:34:16 +03:00
parent e1f80bb9ac
commit 3bceb4deea
5 changed files with 49 additions and 11 deletions

View File

@@ -25,7 +25,7 @@
In normal case, you can download the latest JAR file from releases tab [here](https://github.com/DivineMC/DivineMC/releases/latest)
**Please note:** Java >= 17 is required.
**Please note:** Java >= 21 is required.
## 📦 Building
In order to distribute and use this server software, you need a paperclip file:

View File

@@ -3,7 +3,7 @@ import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
plugins {
java
`maven-publish`
id("io.papermc.paperweight.patcher") version "1.6.3"
id("io.papermc.paperweight.patcher") version "1.7.1"
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"

View File

@@ -1,7 +1,7 @@
group = space.bxteam.divinemc
version = 1.20.6-R0.1-SNAPSHOT
purpurRef = e1603ae33f4d4fa00d7a166335160d8a5b97496d
purpurRef = 818fa0d596d3d539cfb4402fc4b58c6037769c5c
org.gradle.caching = true
org.gradle.parallel = true

View File

@@ -7,10 +7,10 @@ This is fully rewritten reload command. Reloading in Bukkit VERY, VERY UNSTABLE
Read this article why reload is VERY UNSAFE in Bukkit: https://madelinemiller.dev/blog/problem-with-reload/
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index 3ec32b46264cfff857b50129b5e0fa5584943ec6..9cf8ed9c4c42f9469bd06b2eb43b51621a5883c4 100644
index bdfe68b386b5ca2878475e548d3c9a3808fce848..ce4aa866eacd5c07f915986cee740edf007e6978 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -1,60 +1,32 @@
@@ -1,13 +1,10 @@
package org.bukkit.command.defaults;
-import java.util.Arrays;
@@ -18,16 +18,14 @@ index 3ec32b46264cfff857b50129b5e0fa5584943ec6..9cf8ed9c4c42f9469bd06b2eb43b5162
import java.util.List;
-import org.bukkit.Bukkit;
-import org.bukkit.ChatColor;
+
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
+import net.kyori.adventure.text.format.NamedTextColor; // DivineMC
+
public class ReloadCommand extends BukkitCommand {
public ReloadCommand(@NotNull String name) {
super(name);
@@ -15,7 +12,7 @@ public class ReloadCommand extends BukkitCommand {
this.description = "Reloads the server configuration and plugins";
this.usageMessage = "/reload [permissions|commands|confirm]"; // Paper
this.setPermission("bukkit.command.reload");
@@ -35,7 +33,8 @@ index 3ec32b46264cfff857b50129b5e0fa5584943ec6..9cf8ed9c4c42f9469bd06b2eb43b5162
+ this.setAliases(List.of("rl"));
}
@Override
@org.jetbrains.annotations.ApiStatus.Internal // Paper
@@ -25,48 +22,12 @@ public class ReloadCommand extends BukkitCommand {
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { // Paper
if (!testPermission(sender)) return true;
@@ -68,7 +67,16 @@ index 3ec32b46264cfff857b50129b5e0fa5584943ec6..9cf8ed9c4c42f9469bd06b2eb43b5162
-
- Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues when using some plugins.");
- Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server.");
- // Paper start - lifecycle events
- try {
- Bukkit.reload();
- } catch (final IllegalStateException ex) {
- if (ex.getMessage().equals(RELOADING_DISABLED_MESSAGE)) {
- Command.broadcastCommandMessage(sender, ChatColor.RED + RELOADING_DISABLED_MESSAGE);
- return true;
- }
- }
- // Paper end - lifecycle events
- Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
-
+ // DivineMC start - Disable reload command by default

View File

@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sat, 11 May 2024 03:54:59 +0300
Subject: [PATCH] Fix chat signing
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
index 300929a406905f5ff1ede664d5b99fb0938d4d2e..0dd426f37cca522934f2d0fa8d9fd6df2442c31d 100644
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
@@ -50,18 +50,7 @@ public class SignedMessageChain {
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.OUT_OF_ORDER_CHAT, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
} else {
SignedMessageChain.this.lastTimeStamp = body.timeStamp();
- PlayerChatMessage playerChatMessage = new PlayerChatMessage(signedMessageLink, signature, body, null, FilterMask.PASS_THROUGH);
- if (!playerChatMessage.verify(signatureValidator)) {
- this.setChainBroken();
- throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.INVALID_SIGNATURE);
- } else {
- if (playerChatMessage.hasExpiredServer(Instant.now())) {
- SignedMessageChain.LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", body.content());
- }
-
- SignedMessageChain.this.nextLink = signedMessageLink.advance();
- return playerChatMessage;
- }
+ return new PlayerChatMessage(signedMessageLink, signature, body, null, FilterMask.PASS_THROUGH); // DivineMC - Fix chat signing
}
}
}