Skip to content

Commit

Permalink
Fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Nov 28, 2024
1 parent 59c5940 commit 3c7dc3e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 deletions.
23 changes: 5 additions & 18 deletions patches/plugins/0001-Replace-Scheduler-Bukkit-to-Folia.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
From c7c8126d0d20652d1705fe19085235b335179378 Mon Sep 17 00:00:00 2001
From e8f86d8c5895c1c42e1c7a988f39db1da1809f7a Mon Sep 17 00:00:00 2001
From: Euphyllia Bierque <bierque.euphyllia@gmail.com>
Date: Thu, 28 Nov 2024 09:00:25 +0100
Date: Thu, 28 Nov 2024 09:17:04 +0100
Subject: [PATCH 1/5] Replace Scheduler Bukkit to Folia

---
.../bukkit/BukkitRegionContainer.java | 2 +-
.../worldguard/bukkit/WorldGuardPlugin.java | 27 ++++++++++++++-----
.../listener/EventAbstractionListener.java | 4 +--
.../bukkit/listener/PlayerMoveListener.java | 2 +-
.../bukkit/session/BukkitSessionManager.java | 24 ++++++++++-------
.../bukkit/session/BukkitSessionManager.java | 18 ++++++++-----
.../bukkit/util/report/SchedulerReport.java | 12 ++++-----
6 files changed, 45 insertions(+), 26 deletions(-)
6 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitRegionContainer.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitRegionContainer.java
index 79d7b344..3ecd1724 100644
Expand Down Expand Up @@ -125,7 +125,7 @@ index 7b95a574..83d73366 100644
}
}
diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/session/BukkitSessionManager.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/session/BukkitSessionManager.java
index df589cbc..6fb366a1 100644
index df589cbc..696c2d2a 100644
--- a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/session/BukkitSessionManager.java
+++ b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/session/BukkitSessionManager.java
@@ -49,11 +49,13 @@ public class BukkitSessionManager extends AbstractSessionManager implements Runn
Expand Down Expand Up @@ -160,19 +160,6 @@ index df589cbc..6fb366a1 100644
}
}

@@ -88,8 +92,10 @@ public boolean hasBypass(LocalPlayer player, World world) {

public void shutdown() {
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
- LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
- get(localPlayer).uninitialize(localPlayer);
+ player.getScheduler().run(WorldGuardPlugin.inst(), scheduledTask -> {
+ LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
+ get(localPlayer).uninitialize(localPlayer);
+ }, null);
}
}
}
diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/util/report/SchedulerReport.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/util/report/SchedulerReport.java
index d897162c..ccf7e463 100644
--- a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/util/report/SchedulerReport.java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 79db375a5334b163b240d609e597820884cb3797 Mon Sep 17 00:00:00 2001
From be2dd277dd176dbeae4221b167190f780f449487 Mon Sep 17 00:00:00 2001
From: Euphyllia Bierque <bierque.euphyllia@gmail.com>
Date: Thu, 28 Nov 2024 09:00:25 +0100
Date: Thu, 28 Nov 2024 09:17:05 +0100
Subject: [PATCH 2/5] EntityTeleport to EntityTeleportAsync

---
Expand Down
4 changes: 2 additions & 2 deletions patches/plugins/0003-Add-Folia-Supported.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 1c49a843eb0b55781e5e65efff4d8e66707126b9 Mon Sep 17 00:00:00 2001
From 8e2bdf3b4c5d9ca0ecd975939882c1d18dffa993 Mon Sep 17 00:00:00 2001
From: Euphyllia Bierque <bierque.euphyllia@gmail.com>
Date: Thu, 28 Nov 2024 09:00:25 +0100
Date: Thu, 28 Nov 2024 09:17:05 +0100
Subject: [PATCH 3/5] Add Folia Supported

---
Expand Down
4 changes: 2 additions & 2 deletions patches/plugins/0004-Move-canceltask-first.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0840df3dc90d5f43f541d6e359684f07d96a2590 Mon Sep 17 00:00:00 2001
From ab4ce6deb04d33d8a770fbb224048394fa71bde3 Mon Sep 17 00:00:00 2001
From: Euphyllia Bierque <bierque.euphyllia@gmail.com>
Date: Thu, 28 Nov 2024 09:00:25 +0100
Date: Thu, 28 Nov 2024 09:17:05 +0100
Subject: [PATCH 4/5] Move canceltask first

---
Expand Down
4 changes: 2 additions & 2 deletions patches/plugins/0005-Test-EntityCombustByEntityEvent.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 2007e68acee470efa29216cc084b5c92565fc6ec Mon Sep 17 00:00:00 2001
From 01ffe8bade036a84244e4724138c9f584a98fe20 Mon Sep 17 00:00:00 2001
From: Euphyllia Bierque <bierque.euphyllia@gmail.com>
Date: Thu, 28 Nov 2024 09:00:25 +0100
Date: Thu, 28 Nov 2024 09:17:05 +0100
Subject: [PATCH 5/5] Test EntityCombustByEntityEvent

---
Expand Down

0 comments on commit 3c7dc3e

Please sign in to comment.