2016-06-23 04:43:02 +02:00
|
|
|
From 720fe6133fb0d2a4f19f6fc93bb8cae93d00b570 Mon Sep 17 00:00:00 2001
|
2016-04-06 08:10:26 +02:00
|
|
|
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
|
2016-05-30 18:50:57 +02:00
|
|
|
index d6fef83..35364c7 100644
|
2016-04-06 08:10:26 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-30 18:50:57 +02:00
|
|
|
@@ -318,4 +318,9 @@ public class PaperWorldConfig {
|
2016-04-06 08:10:26 +02:00
|
|
|
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
|
2016-06-16 00:43:51 +02:00
|
|
|
index 06c4f12..2538cc5 100644
|
2016-04-06 08:10:26 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2016-06-16 00:43:51 +02:00
|
|
|
@@ -1346,7 +1346,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
2016-04-06 08:10:26 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
- s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage());
|
2016-04-08 00:31:06 +02:00
|
|
|
+ // Paper Start - (Meh) Support for vanilla world scoreboard name coloring
|
|
|
|
+ String displayName = event.getPlayer().getDisplayName();
|
2016-04-06 08:10:26 +02:00
|
|
|
+ if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) {
|
2016-06-09 05:57:14 +02:00
|
|
|
+ displayName = ScoreboardTeam.getPlayerDisplayName(this.player.aQ(), player.getDisplayName());
|
2016-04-06 08:10:26 +02:00
|
|
|
+ }
|
2016-04-08 00:31:06 +02:00
|
|
|
+
|
|
|
|
+ s = String.format(event.getFormat(), displayName, event.getMessage());
|
2016-04-06 08:10:26 +02:00
|
|
|
+ // Paper end
|
2016-04-08 00:31:06 +02:00
|
|
|
minecraftServer.console.sendMessage(s);
|
2016-04-06 08:10:26 +02:00
|
|
|
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
|
|
|
|
for (Object recipient : minecraftServer.getPlayerList().players) {
|
|
|
|
--
|
2016-06-23 04:18:41 +02:00
|
|
|
2.9.0
|
2016-04-06 08:10:26 +02:00
|
|
|
|