Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix command sender check #164

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions patches/server/0003-Threaded-Regions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21666,7 +21666,7 @@ index 1d7c663fa0e550bd0cfb9a4b83ccd7e2968666f0..f3df9c9b6cff85565514f990597f3fe5
LevelChunkTicks<T> levelChunkTicks = this.allContainers.get(l);
if (levelChunkTicks == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bbc51ebf0dc0801ace9d5e7875fb2fe100b286bc..7ced957b11deb6643bff6547257f449c56038d74 100644
index bbc51ebf0dc0801ace9d5e7875fb2fe100b286bc..541915675dd3ad832992360283e3ba1b3cc62e27 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -311,7 +311,7 @@ public final class CraftServer implements Server {
Expand Down Expand Up @@ -21715,7 +21715,7 @@ index bbc51ebf0dc0801ace9d5e7875fb2fe100b286bc..7ced957b11deb6643bff6547257f449c
+ null,
+ 1L
+ );
+ } else if (sender instanceof ConsoleCommandSender console) {
+ } else if (sender instanceof ConsoleCommandSender || sender instanceof io.papermc.paper.commands.FeedbackForwardingSender) {
+ io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(() -> {
+ CraftServer.this.dispatchCommand(sender, commandLine);
+ });
Expand All @@ -21735,7 +21735,7 @@ index bbc51ebf0dc0801ace9d5e7875fb2fe100b286bc..7ced957b11deb6643bff6547257f449c
+ // 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) {
+ io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Dispatching command async");
+ } else {
+ // huh?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Throw UnsupportedOperationException() for broken APIs


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7ced957b11deb6643bff6547257f449c56038d74..4b43134f38ba203a309a412055461b57934da8f9 100644
index 541915675dd3ad832992360283e3ba1b3cc62e27..bc778637c7d4371cafa9bcda67f8965f57cc66d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1268,6 +1268,7 @@ public final class CraftServer implements Server {
Expand Down