mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 17:52:28 +01:00
SPIGOT-7127: /say doesn't work from console
By: md_5 <git@md-5.net>
This commit is contained in:
parent
cb4c71bc0d
commit
0b6cdcc0c4
1 changed files with 8 additions and 3 deletions
|
@ -342,11 +342,11 @@
|
|||
+ this.connection.acceptConnections();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
+ protected void forceDifficulty() {}
|
||||
|
||||
- this.readScoreboard(worldpersistentdata);
|
||||
- this.commandStorage = new PersistentCommandStorage(worldpersistentdata);
|
||||
+ protected void forceDifficulty() {}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ public void initWorld(WorldServer worldserver, IWorldDataServer iworlddataserver, SaveData saveData, GeneratorSettings generatorsettings) {
|
||||
+ boolean flag = generatorsettings.isDebug();
|
||||
|
@ -712,7 +712,7 @@
|
|||
private void startMetricsRecordingTick() {
|
||||
if (this.willStartRecordingMetrics) {
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(SystemUtils.timeSource, this.isDedicatedServer()), SystemUtils.timeSource, SystemUtils.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
@@ -1912,8 +2223,25 @@
|
||||
@@ -1912,8 +2223,30 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -723,6 +723,11 @@
|
|||
public ChatDecorator getChatDecorator() {
|
||||
- return ChatDecorator.PLAIN;
|
||||
+ return (entityplayer, ichatbasecomponent) -> {
|
||||
+ // SPIGOT-7127: Console /say and similar
|
||||
+ if (entityplayer == null) {
|
||||
+ return CompletableFuture.completedFuture(ichatbasecomponent);
|
||||
+ }
|
||||
+
|
||||
+ return CompletableFuture.supplyAsync(() -> {
|
||||
+ AsyncPlayerChatPreviewEvent event = new AsyncPlayerChatPreviewEvent(true, entityplayer.getBukkitEntity(), CraftChatMessage.fromComponent(ichatbasecomponent), new LazyPlayerSet(this));
|
||||
+ String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
||||
|
|
Loading…
Reference in a new issue