9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00
Files
Leaf/leaf-server/paper-patches/features/0010-Fix-Pufferfish-and-Purpur-patches.patch
2025-07-12 16:03:27 +08:00

42 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 29 Apr 2024 14:18:58 -0400
Subject: [PATCH] Fix Pufferfish and Purpur patches
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
index f5302d038e4bb731075dccde4015627dc9e7b420..afaff6dcfe2044c465693dd0971d07644470ba8a 100644
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
@@ -32,9 +32,11 @@ public record ServerBuildInfoImpl(
private static final String BRAND_PAPER_NAME = "Paper";
private static final String BRAND_GALE_NAME = "Gale"; // Gale - branding changes
- // Leaf start - Rebrand
+ // Leaf start - Rebrand & Fix Pufferfish and Purpur patches
+ private static final String BRAND_PUFFERFISH_NAME = "Pufferfish";
+ private static final String BRAND_PURPUR_NAME = "Purpur";
private static final String BRAND_LEAF_NAME = "Leaf";
- // Leaf end - Rebrand
+ // Leaf end - Rebrand & Fix Pufferfish and Purpur patches
private static final String BUILD_DEV = "DEV";
@@ -65,11 +67,13 @@ public record ServerBuildInfoImpl(
@Override
public boolean isBrandCompatible(final @NotNull Key brandId) {
- // Leaf start - Rebrand
+ // Leaf start - Rebrand & Fix Pufferfish and Purpur patches
return brandId.equals(this.brandId)
|| brandId.equals(BRAND_PAPER_ID)
- || brandId.equals(BRAND_GALE_ID); // Gale - branding changes
- // Leaf end - Rebrand
+ || brandId.equals(BRAND_GALE_ID) // Gale - branding changes
+ || brandId.equals(BRAND_PUFFERFISH_ID)
+ || brandId.equals(BRAND_PURPUR_ID);
+ // Leaf end - Rebrand & Fix Pufferfish and Purpur patches
}
@Override