mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-07 20:38:22 +02:00
18b4817a33
Use -1 to represent vanilla/unlimited. Updated PaperWorldConfig to also update the individual worlds limit if it was set to the new default value. Should hopefully help #235
44 lines
2.2 KiB
Diff
44 lines
2.2 KiB
Diff
From 697e05516b86feec6e9431909006d8900248bab9 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Wed, 6 Apr 2016 01:04:23 -0500
|
|
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 4f94b04..6a235d1 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -315,4 +315,9 @@ public class PaperWorldConfig {
|
|
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 8)) * 16);
|
|
log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16));
|
|
}
|
|
+
|
|
+ public boolean useVanillaScoreboardColoring;
|
|
+ private void useVanillaScoreboardColoring() {
|
|
+ useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 3d9a677..724569e 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1344,7 +1344,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|
return;
|
|
}
|
|
|
|
- s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage());
|
|
+ // Paper Start - (Meh) Support for vanilla world scoreboard name coloring
|
|
+ String displayName = event.getPlayer().getDisplayName();
|
|
+ if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) {
|
|
+ displayName = ScoreboardTeam.getPlayerDisplayName(this.player.aO(), player.getDisplayName());
|
|
+ }
|
|
+
|
|
+ s = String.format(event.getFormat(), displayName, event.getMessage());
|
|
+ // Paper end
|
|
minecraftServer.console.sendMessage(s);
|
|
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
|
|
for (Object recipient : minecraftServer.getPlayerList().players) {
|
|
--
|
|
2.8.2
|
|
|