Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
v3.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Manered committed Jan 12, 2024
1 parent 58262d8 commit 9548f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.manere</groupId>
<artifactId>utils</artifactId>
<version>3.3.2</version>
<version>3.3.3</version>
<packaging>jar</packaging>

<name>Utils</name>
Expand Down
37 changes: 1 addition & 36 deletions src/main/java/dev/manere/utils/scheduler/SchedulerBase.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package dev.manere.utils.scheduler;

import dev.manere.utils.library.Utils;
import io.papermc.paper.threadedregions.scheduler.AsyncScheduler;
import io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler;
import io.papermc.paper.threadedregions.scheduler.RegionScheduler;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.jetbrains.annotations.NotNull;
Expand All @@ -17,11 +14,6 @@
* This class provides access to various Bukkit/Paper schedulers and Folia region-related schedulers.
*/
public abstract class SchedulerBase {
private final BukkitScheduler scheduler = Utils.plugin().getServer().getScheduler();
private final RegionScheduler regionScheduler = Utils.plugin().getServer().getRegionScheduler();
private final GlobalRegionScheduler globalRegionScheduler = Utils.plugin().getServer().getGlobalRegionScheduler();
private final AsyncScheduler asyncFoliaScheduler = Utils.plugin().getServer().getAsyncScheduler();

/**
* Executes a task using the Bukkit scheduler.
*
Expand Down Expand Up @@ -94,33 +86,6 @@ public abstract class SchedulerBase {
* @return The Bukkit scheduler.
*/
public final @NotNull BukkitScheduler scheduler() {
return scheduler;
}

/**
* Retrieves the region scheduler associated with this scheduler.
*
* @return The region scheduler.
*/
public final @NotNull RegionScheduler regionScheduler() {
return regionScheduler;
}

/**
* Retrieves the global region scheduler associated with this scheduler.
*
* @return The global region scheduler.
*/
public final @NotNull GlobalRegionScheduler globalRegionScheduler() {
return globalRegionScheduler;
}

/**
* Retrieves the asynchronous Folia scheduler associated with this scheduler.
*
* @return The asynchronous Folia scheduler.
*/
public final @NotNull AsyncScheduler asyncFoliaScheduler() {
return asyncFoliaScheduler;
return Utils.plugin().getServer().getScheduler();
}
}

0 comments on commit 9548f8a

Please sign in to comment.