This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PaperMC/Folia@480ce47 Fix command sender check
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Bierque Jason <bierquejason@gmail.com> | ||
Date: Sat, 21 Oct 2023 19:50:16 +0200 | ||
Subject: [PATCH] Fix Folia PR : | ||
https://github.com/PaperMC/Folia/pull/164/commits/480ce47ff596e6d95889ee45f8ff5ab27e2ef3b1 | ||
Fix command sender check | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
index cf922f625f92839480ef842722dc9024ce8d21de..73c015acc0c1801316192f1186375b9f90a506c8 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
@@ -1024,7 +1024,7 @@ public final class CraftServer implements Server { | ||
null, | ||
1L | ||
); | ||
- } else if (sender instanceof ConsoleCommandSender console) { | ||
+ } else if (sender instanceof ConsoleCommandSender || sender instanceof io.papermc.paper.commands.FeedbackForwardingSender) { // TenseiMC | ||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(() -> { | ||
CraftServer.this.dispatchCommand(sender, commandLine); | ||
}); | ||
@@ -1044,7 +1044,7 @@ public final class CraftServer implements Server { | ||
// Folia start - region threading | ||
if ((sender instanceof Entity entity)) { | ||
io.papermc.paper.util.TickThread.ensureTickThread(((org.bukkit.craftbukkit.entity.CraftEntity)entity).getHandle(), "Dispatching command async"); | ||
- } else if (sender instanceof ConsoleCommandSender console) { | ||
+ } else if (sender instanceof ConsoleCommandSender || sender instanceof io.papermc.paper.commands.FeedbackForwardingSender) { // TenseiMC | ||
io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Dispatching command async"); | ||
} else { | ||
// huh? |