mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
46 lines
2.6 KiB
Diff
46 lines
2.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: dan28000 <84990628+dan28000@users.noreply.github.com>
|
|
Date: Mon, 6 Oct 2025 14:17:59 +0200
|
|
Subject: [PATCH] Configurable Files Locations
|
|
|
|
|
|
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
|
index eab5505b10c1044f864a7327b18f1389fd09765f..c16fabf873f69adee6ba6d6dbf9b07574e82a12d 100644
|
|
--- a/net/minecraft/server/players/PlayerList.java
|
|
+++ b/net/minecraft/server/players/PlayerList.java
|
|
@@ -99,10 +99,12 @@ import net.minecraft.world.scores.Team;
|
|
import org.slf4j.Logger;
|
|
|
|
public abstract class PlayerList {
|
|
- public static final File USERBANLIST_FILE = new File("banned-players.json");
|
|
- public static final File IPBANLIST_FILE = new File("banned-ips.json");
|
|
- public static final File OPLIST_FILE = new File("ops.json");
|
|
- public static final File WHITELIST_FILE = new File("whitelist.json");
|
|
+ // DivineMC start - Configurable Files Locations
|
|
+ public static File USERBANLIST_FILE = new File("banned-players.json");
|
|
+ public static File IPBANLIST_FILE = new File("banned-ips.json");
|
|
+ public static File OPLIST_FILE = new File("ops.json");
|
|
+ public static File WHITELIST_FILE = new File("whitelist.json");
|
|
+ // DivineMC end - Configurable Files Locations
|
|
public static final Component CHAT_FILTERED_FULL = Component.translatable("chat.filtered_full");
|
|
public static final Component DUPLICATE_LOGIN_DISCONNECT_MESSAGE = Component.translatable("multiplayer.disconnect.duplicate_login");
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
@@ -140,10 +142,17 @@ public abstract class PlayerList {
|
|
this.server = server;
|
|
this.registries = registries;
|
|
this.playerIo = playerIo;
|
|
+ // DivineMC start - Configurable Files Locations
|
|
+ USERBANLIST_FILE = (File) server.options.valueOf("banned-players");
|
|
+ IPBANLIST_FILE = (File) server.options.valueOf("banned-ips");
|
|
+ OPLIST_FILE = (File) server.options.valueOf("ops");
|
|
+ WHITELIST_FILE = (File) server.options.valueOf("whitelist");
|
|
+
|
|
this.whitelist = new UserWhiteList(WHITELIST_FILE, notificationService);
|
|
this.ops = new ServerOpList(OPLIST_FILE, notificationService);
|
|
this.bans = new UserBanList(USERBANLIST_FILE, notificationService);
|
|
this.ipBans = new IpBanList(IPBANLIST_FILE, notificationService);
|
|
+ // DivineMC end - Configurable Files Locations
|
|
}
|
|
|
|
abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor
|