mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Add support for Folia.
- Added a new Scheduler class to managing all scheduling.
This commit is contained in:
Generated
+4
-10
@@ -14,6 +14,7 @@
|
||||
<module name="acf" />
|
||||
<module name="acf-velocity" />
|
||||
<module name="acf-core" />
|
||||
<module name="acf-folia" />
|
||||
<module name="acf-brigadier" />
|
||||
<module name="acf-example" />
|
||||
<module name="acf-bukkit" />
|
||||
@@ -22,16 +23,7 @@
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="acf" target="1.8" />
|
||||
<module name="acf-brigadier" target="1.8" />
|
||||
<module name="acf-bukkit" target="1.8" />
|
||||
<module name="acf-bungee" target="1.8" />
|
||||
<module name="acf-core" target="1.8" />
|
||||
<module name="acf-example" target="1.8" />
|
||||
<module name="acf-jda" target="1.8" />
|
||||
<module name="acf-paper" target="1.8" />
|
||||
<module name="acf-parent" target="1.8" />
|
||||
<module name="acf-sponge" target="1.8" />
|
||||
<module name="acf-velocity" target="1.8" />
|
||||
<module name="commands" target="1.8" />
|
||||
<module name="example-plugin" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
@@ -42,11 +34,13 @@
|
||||
<module name="acf-bukkit" options="-parameters" />
|
||||
<module name="acf-bungee" options="-parameters" />
|
||||
<module name="acf-core" options="-parameters" />
|
||||
<module name="acf-folia" options="-parameters" />
|
||||
<module name="acf-jda" options="-parameters" />
|
||||
<module name="acf-paper" options="-parameters" />
|
||||
<module name="acf-parent" options="" />
|
||||
<module name="acf-parent" options="-parameters" />
|
||||
<module name="acf-sponge" options="-parameters" />
|
||||
<module name="acf-velocity" options="-parameters" />
|
||||
<module name="act-folia" options="-parameters" />
|
||||
<module name="example-plugin" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
|
||||
Generated
+2
@@ -14,6 +14,8 @@
|
||||
<file url="file://$PROJECT_DIR$/example" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/example/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/example/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/folia/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/folia/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/jda" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/jda/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/jda/src/main/resources" charset="UTF-8" />
|
||||
|
||||
@@ -55,7 +55,7 @@ class ACFBukkitListener implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
if (this.manager.autoDetectFromClient) {
|
||||
this.manager.readPlayerLocale(player);
|
||||
this.plugin.getServer().getScheduler().runTaskLater(this.plugin, () -> manager.readPlayerLocale(player), 20);
|
||||
this.manager.getScheduler().createDelayedTask(this.plugin, () -> manager.readPlayerLocale(player), 20);
|
||||
} else {
|
||||
this.manager.setIssuerLocale(player, this.manager.getLocales().getDefaultLocale());
|
||||
this.manager.notifyLocaleChange(this.manager.getCommandIssuer(player), null, this.manager.getLocales().getDefaultLocale());
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2023 Daniel Ennis (Aikar) - MIT License
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package co.aikar.commands;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
public class ACFBukkitScheduler {
|
||||
|
||||
private int localeTask;
|
||||
|
||||
public void registerSchedulerDependencies(BukkitCommandManager manager) {
|
||||
manager.registerDependency(BukkitScheduler.class, Bukkit.getScheduler());
|
||||
}
|
||||
|
||||
public void createDelayedTask(Plugin plugin, Runnable task, long delay) {
|
||||
Bukkit.getScheduler().runTaskLater(plugin, task, delay);
|
||||
}
|
||||
|
||||
public void createLocaleTask(Plugin plugin, Runnable task, long delay, long period) {
|
||||
this.localeTask = Bukkit.getScheduler().runTaskTimer(plugin, task, delay, period).getTaskId();
|
||||
}
|
||||
|
||||
public void cancelLocaleTask() {
|
||||
Bukkit.getScheduler().cancelTask(localeTask);
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class BukkitCommandManager extends CommandManager<
|
||||
private final CommandMap commandMap;
|
||||
@Deprecated
|
||||
private final TimingManager timingManager;
|
||||
private final BukkitTask localeTask;
|
||||
private final ACFBukkitScheduler scheduler;
|
||||
private final Logger logger;
|
||||
public final Integer mcMinorVersion;
|
||||
public final Integer mcPatchVersion;
|
||||
@@ -93,7 +93,12 @@ public class BukkitCommandManager extends CommandManager<
|
||||
protected boolean autoDetectFromClient = true;
|
||||
|
||||
public BukkitCommandManager(Plugin plugin) {
|
||||
this(plugin, new ACFBukkitScheduler());
|
||||
}
|
||||
|
||||
public BukkitCommandManager(Plugin plugin, ACFBukkitScheduler scheduler) {
|
||||
this.plugin = plugin;
|
||||
this.scheduler = scheduler;
|
||||
String prefix = this.plugin.getDescription().getPrefix();
|
||||
this.logger = Logger.getLogger(prefix != null ? prefix : this.plugin.getName());
|
||||
this.timingManager = TimingManager.of(plugin);
|
||||
@@ -122,7 +127,7 @@ public class BukkitCommandManager extends CommandManager<
|
||||
Bukkit.getPluginManager().registerEvents(new ACFBukkitListener(this, plugin), plugin);
|
||||
|
||||
getLocales(); // auto load locales
|
||||
this.localeTask = Bukkit.getScheduler().runTaskTimer(plugin, () -> {
|
||||
scheduler.createLocaleTask(plugin, ()->{
|
||||
if (this.cantReadLocale || !this.autoDetectFromClient) {
|
||||
return;
|
||||
}
|
||||
@@ -137,7 +142,7 @@ public class BukkitCommandManager extends CommandManager<
|
||||
registerDependency(JavaPlugin.class, plugin);
|
||||
registerDependency(PluginManager.class, Bukkit.getPluginManager());
|
||||
registerDependency(Server.class, Bukkit.getServer());
|
||||
registerDependency(BukkitScheduler.class, Bukkit.getScheduler());
|
||||
scheduler.registerSchedulerDependencies(this);
|
||||
registerDependency(ScoreboardManager.class, Bukkit.getScoreboardManager());
|
||||
registerDependency(ItemFactory.class, Bukkit.getItemFactory());
|
||||
registerDependency(PluginDescriptionFile.class, plugin.getDescription());
|
||||
@@ -331,7 +336,7 @@ public class BukkitCommandManager extends CommandManager<
|
||||
}
|
||||
} catch (Exception e) {
|
||||
cantReadLocale = true;
|
||||
this.localeTask.cancel();
|
||||
this.scheduler.cancelLocaleTask();
|
||||
this.log(LogLevel.INFO, "Can't read players locale, you will be unable to automatically detect players language. Only Bukkit 1.7+ is supported for this.", e);
|
||||
}
|
||||
}
|
||||
@@ -341,6 +346,10 @@ public class BukkitCommandManager extends CommandManager<
|
||||
return timingManager;
|
||||
}
|
||||
|
||||
public ACFBukkitScheduler getScheduler() {
|
||||
return scheduler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RootCommand createRootCommand(String cmd) {
|
||||
return new BukkitRootCommand(this, cmd);
|
||||
|
||||
@@ -101,7 +101,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.BukkitCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.FoliaCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<a href="BukkitRootCommand.html" title="class in co.aikar.commands">BukkitRootCommand</a> command)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
@@ -132,7 +132,7 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(co.aikar.commands.BukkitCommandManager,co.aikar.commands.BukkitRootCommand)">
|
||||
<section class="detail" id="<init>(co.aikar.commands.FoliaCommandManager,co.aikar.commands.BukkitRootCommand)">
|
||||
<h3>ACFBukkitHelpTopic</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/ACFBukkitHelpTopic.html#line-34">ACFBukkitHelpTopic</a></span><wbr><span class="parameters">(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<a href="BukkitRootCommand.html" title="class in co.aikar.commands">BukkitRootCommand</a> command)</span></div>
|
||||
|
||||
@@ -96,7 +96,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandCompletions</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandCompletions</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -123,7 +123,7 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(co.aikar.commands.BukkitCommandManager)">
|
||||
<section class="detail" id="<init>(co.aikar.commands.FoliaCommandManager)">
|
||||
<h3>BukkitCommandCompletions</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/BukkitCommandCompletions.html#line-45">BukkitCommandCompletions</a></span><wbr><span class="parameters">(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</span></div>
|
||||
</section>
|
||||
|
||||
@@ -96,7 +96,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandContexts</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandContexts</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -123,7 +123,7 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(co.aikar.commands.BukkitCommandManager)">
|
||||
<section class="detail" id="<init>(co.aikar.commands.FoliaCommandManager)">
|
||||
<h3>BukkitCommandContexts</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/BukkitCommandContexts.html#line-51">BukkitCommandContexts</a></span><wbr><span class="parameters">(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</span></div>
|
||||
</section>
|
||||
|
||||
@@ -73,7 +73,7 @@ loadScripts(document, 'script');</script>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
|
||||
<div class="inheritance">co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,<wbr><a href="BukkitCommandIssuer.html" title="class in co.aikar.commands">BukkitCommandIssuer</a>,<wbr>org.bukkit.ChatColor,<wbr><a href="BukkitMessageFormatter.html" title="class in co.aikar.commands">BukkitMessageFormatter</a>,<wbr><a href="BukkitCommandExecutionContext.html" title="class in co.aikar.commands">BukkitCommandExecutionContext</a>,<wbr><a href="BukkitConditionContext.html" title="class in co.aikar.commands">BukkitConditionContext</a>>
|
||||
<div class="inheritance">co.aikar.commands.BukkitCommandManager</div>
|
||||
<div class="inheritance">co.aikar.commands.FoliaCommandManager</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="class-description" id="class-description">
|
||||
|
||||
@@ -100,7 +100,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitLocales</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitLocales</a><wbr>(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -158,7 +158,7 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(co.aikar.commands.BukkitCommandManager)">
|
||||
<section class="detail" id="<init>(co.aikar.commands.FoliaCommandManager)">
|
||||
<h3>BukkitLocales</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/BukkitLocales.html#line-38">BukkitLocales</a></span><wbr><span class="parameters">(<a href="BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</span></div>
|
||||
</section>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) -->
|
||||
<title>Uses of Class co.aikar.commands.BukkitCommandManager (ACF (Bukkit) 0.5.1-SNAPSHOT API)</title>
|
||||
<title>Uses of Class co.aikar.commands.FoliaCommandManager (ACF (Bukkit) 0.5.1-SNAPSHOT API)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="description" content="use: package: co.aikar.commands, class: BukkitCommandManager">
|
||||
@@ -48,7 +48,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Uses of Class co.aikar.commands.BukkitCommandManager" class="title">Uses of Class<br>co.aikar.commands.BukkitCommandManager</h1>
|
||||
<h1 title="Uses of Class co.aikar.commands.FoliaCommandManager" class="title">Uses of Class<br>co.aikar.commands.FoliaCommandManager</h1>
|
||||
</div>
|
||||
<div class="caption"><span>Packages that use <a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a></span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
@@ -68,17 +68,17 @@ loadScripts(document, 'script');</script>
|
||||
<div class="table-header col-second">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color"><code> </code></div>
|
||||
<div class="col-second even-row-color"><code><a href="../ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<div class="col-second even-row-color"><code><a href="../ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<a href="../BukkitRootCommand.html" title="class in co.aikar.commands">BukkitRootCommand</a> command)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><code> </code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="../BukkitCommandCompletions.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandCompletions</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="../BukkitCommandCompletions.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandCompletions</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><code> </code></div>
|
||||
<div class="col-second even-row-color"><code><a href="../BukkitCommandContexts.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandContexts</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="../BukkitCommandContexts.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandContexts</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><code> </code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="../BukkitLocales.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitLocales</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="../BukkitLocales.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitLocales</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager)</code></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -90,7 +90,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="table-header col-second">Constructor</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color"><code> </code></div>
|
||||
<div class="col-second even-row-color"><code><a href="../ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<div class="col-second even-row-color"><code><a href="../ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic</a><wbr>(<a href="../BukkitCommandManager.html" title="class in co.aikar.commands">BukkitCommandManager</a> manager,
|
||||
<a href="../BukkitRootCommand.html" title="class in co.aikar.commands">BukkitRootCommand</a> command)</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-summary-item-name odd-row-color"><a href="co/aikar/commands/ACFBukkitUtil.html#sendMsg(org.bukkit.command.CommandSender,java.lang.String)">co.aikar.commands.ACFBukkitUtil.sendMsg<wbr>(CommandSender, String)</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-summary-item-name even-row-color"><a href="co/aikar/commands/BukkitCommandManager.html#unregisterCommand(co.aikar.commands.BukkitRootCommand)">co.aikar.commands.BukkitCommandManager.unregisterCommand<wbr>(BukkitRootCommand)</a></div>
|
||||
<div class="col-summary-item-name even-row-color"><a href="co/aikar/commands/BukkitCommandManager.html#unregisterCommand(co.aikar.commands.BukkitRootCommand)">co.aikar.commands.FoliaCommandManager.unregisterCommand<wbr>(BukkitRootCommand)</a></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="deprecation-comment">Use unregisterCommand(BaseCommand) - this will be visibility reduced later.</div>
|
||||
</div>
|
||||
|
||||
@@ -55,7 +55,7 @@ loadScripts(document, 'script');</script>
|
||||
<dl class="index">
|
||||
<dt><a href="co/aikar/commands/ACFBukkitHelpTopic.html" class="type-name-link" title="class in co.aikar.commands">ACFBukkitHelpTopic</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic(BukkitCommandManager, BukkitRootCommand)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/ACFBukkitHelpTopic.html" title="class in co.aikar.commands">ACFBukkitHelpTopic</a></dt>
|
||||
<dt><a href="co/aikar/commands/ACFBukkitHelpTopic.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager,co.aikar.commands.BukkitRootCommand)" class="member-name-link">ACFBukkitHelpTopic(BukkitCommandManager, BukkitRootCommand)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/ACFBukkitHelpTopic.html" title="class in co.aikar.commands">ACFBukkitHelpTopic</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/ACFBukkitUtil.html" class="type-name-link" title="class in co.aikar.commands">ACFBukkitUtil</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
@@ -74,11 +74,11 @@ loadScripts(document, 'script');</script>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandCompletions.html" class="type-name-link" title="class in co.aikar.commands">BukkitCommandCompletions</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandCompletions.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandCompletions(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitCommandCompletions.html" title="class in co.aikar.commands">BukkitCommandCompletions</a></dt>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandCompletions.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandCompletions(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitCommandCompletions.html" title="class in co.aikar.commands">BukkitCommandCompletions</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandContexts.html" class="type-name-link" title="class in co.aikar.commands">BukkitCommandContexts</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandContexts.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitCommandContexts(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitCommandContexts.html" title="class in co.aikar.commands">BukkitCommandContexts</a></dt>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandContexts.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitCommandContexts(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitCommandContexts.html" title="class in co.aikar.commands">BukkitCommandContexts</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitCommandExecutionContext.html" class="type-name-link" title="class in co.aikar.commands">BukkitCommandExecutionContext</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
@@ -92,7 +92,7 @@ loadScripts(document, 'script');</script>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitLocales.html" class="type-name-link" title="class in co.aikar.commands">BukkitLocales</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitLocales.html#%3Cinit%3E(co.aikar.commands.BukkitCommandManager)" class="member-name-link">BukkitLocales(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitLocales.html" title="class in co.aikar.commands">BukkitLocales</a></dt>
|
||||
<dt><a href="co/aikar/commands/BukkitLocales.html#%3Cinit%3E(co.aikar.commands.FoliaCommandManager)" class="member-name-link">BukkitLocales(BukkitCommandManager)</a> - Constructor for class co.aikar.commands.<a href="co/aikar/commands/BukkitLocales.html" title="class in co.aikar.commands">BukkitLocales</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="co/aikar/commands/BukkitMessageFormatter.html" class="type-name-link" title="class in co.aikar.commands">BukkitMessageFormatter</a> - Class in <a href="co/aikar/commands/package-summary.html">co.aikar.commands</a></dt>
|
||||
<dd> </dd>
|
||||
|
||||
@@ -72,7 +72,7 @@ loadScripts(document, 'script');</script>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
|
||||
<div class="inheritance">co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,<wbr>co.aikar.commands.BukkitCommandIssuer,<wbr>org.bukkit.ChatColor,<wbr>co.aikar.commands.BukkitMessageFormatter,<wbr>co.aikar.commands.BukkitCommandExecutionContext,<wbr>co.aikar.commands.BukkitConditionContext>
|
||||
<div class="inheritance">co.aikar.commands.BukkitCommandManager
|
||||
<div class="inheritance">co.aikar.commands.FoliaCommandManager
|
||||
<div class="inheritance">co.aikar.commands.PaperCommandManager</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@ loadScripts(document, 'script');</script>
|
||||
<section class="class-description" id="class-description">
|
||||
<hr>
|
||||
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name"><a href="../../../src-html/co/aikar/commands/PaperCommandManager.html#line-28">PaperCommandManager</a></span>
|
||||
<span class="extends-implements">extends co.aikar.commands.BukkitCommandManager</span></div>
|
||||
<span class="extends-implements">extends co.aikar.commands.FoliaCommandManager</span></div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
@@ -89,7 +89,7 @@ loadScripts(document, 'script');</script>
|
||||
<section class="field-summary" id="field-summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields-inherited-from-class-co.aikar.commands.BukkitCommandManager">Fields inherited from class co.aikar.commands.BukkitCommandManager</h3>
|
||||
<h3 id="fields-inherited-from-class-co.aikar.commands.FoliaCommandManager">Fields inherited from class co.aikar.commands.FoliaCommandManager</h3>
|
||||
<code>autoDetectFromClient, completions, contexts, issuersLocaleString, knownCommands, locales, mcMinorVersion, mcPatchVersion, plugin, registeredCommands</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields-inherited-from-class-co.aikar.commands.CommandManager">Fields inherited from class co.aikar.commands.CommandManager</h3>
|
||||
@@ -133,7 +133,7 @@ loadScripts(document, 'script');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-co.aikar.commands.BukkitCommandManager">Methods inherited from class co.aikar.commands.BukkitCommandManager</h3>
|
||||
<h3 id="methods-inherited-from-class-co.aikar.commands.FoliaCommandManager">Methods inherited from class co.aikar.commands.FoliaCommandManager</h3>
|
||||
<code>createCommandContext, createCompletionContext, createConditionContext, createRegisteredCommand, createRootCommand, getCommandIssuer, getCommandPrefix, getLocales, getPlugin, getRegisteredRootCommands, getTimings, handleUncaughtException, hasRegisteredCommands, isCommandIssuer, log, registerCommand, registerCommand, setPlayerLocale, unregisterCommand, unregisterCommand, unregisterCommands, usePerIssuerLocale</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-co.aikar.commands.CommandManager">Methods inherited from class co.aikar.commands.CommandManager</h3>
|
||||
@@ -182,7 +182,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">co.aikar.commands.CommandContexts<co.aikar.commands.BukkitCommandExecutionContext></span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/PaperCommandManager.html#line-59">getCommandContexts</a></span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>getCommandContexts</code> in class <code>co.aikar.commands.BukkitCommandManager</code></dd>
|
||||
<dd><code>getCommandContexts</code> in class <code>co.aikar.commands.FoliaCommandManager</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
@@ -192,7 +192,7 @@ loadScripts(document, 'script');</script>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">co.aikar.commands.CommandCompletions<co.aikar.commands.BukkitCommandCompletionContext></span> <span class="element-name"><a href="../../../src-html/co/aikar/commands/PaperCommandManager.html#line-67">getCommandCompletions</a></span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>getCommandCompletions</code> in class <code>co.aikar.commands.BukkitCommandManager</code></dd>
|
||||
<dd><code>getCommandCompletions</code> in class <code>co.aikar.commands.FoliaCommandManager</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
|
||||
@@ -74,7 +74,7 @@ loadScripts(document, 'script');</script>
|
||||
</li>
|
||||
<li class="circle">co.aikar.commands.CommandManager<IT,<wbr>I,<wbr>FT,<wbr>MF,<wbr>CEC,<wbr>CC>
|
||||
<ul>
|
||||
<li class="circle">co.aikar.commands.BukkitCommandManager
|
||||
<li class="circle">co.aikar.commands.FoliaCommandManager
|
||||
<ul>
|
||||
<li class="circle">co.aikar.commands.<a href="PaperCommandManager.html" class="type-name-link" title="class in co.aikar.commands">PaperCommandManager</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -78,7 +78,7 @@ loadScripts(document, 'script');</script>
|
||||
</li>
|
||||
<li class="circle">co.aikar.commands.CommandManager<IT,<wbr>I,<wbr>FT,<wbr>MF,<wbr>CEC,<wbr>CC>
|
||||
<ul>
|
||||
<li class="circle">co.aikar.commands.BukkitCommandManager
|
||||
<li class="circle">co.aikar.commands.FoliaCommandManager
|
||||
<ul>
|
||||
<li class="circle">co.aikar.commands.<a href="co/aikar/commands/PaperCommandManager.html" class="type-name-link" title="class in co.aikar.commands">PaperCommandManager</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2016-2017 Daniel Ennis (Aikar) - MIT License
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining
|
||||
~ a copy of this software and associated documentation files (the
|
||||
~ "Software"), to deal in the Software without restriction, including
|
||||
~ without limitation the rights to use, copy, modify, merge, publish,
|
||||
~ distribute, sublicense, and/or sell copies of the Software, and to
|
||||
~ permit persons to whom the Software is furnished to do so, subject to
|
||||
~ the following conditions:
|
||||
~
|
||||
~ The above copyright notice and this permission notice shall be
|
||||
~ included in all copies or substantial portions of the Software.
|
||||
~
|
||||
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
~ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
~ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
~ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
~ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
~ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>co.aikar</groupId>
|
||||
<artifactId>acf-parent</artifactId>
|
||||
<version><!--VERSION-->0.5.1-SNAPSHOT<!--VERSION--></version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>acf-folia</artifactId>
|
||||
<version><!--VERSION-->0.5.1-SNAPSHOT<!--VERSION--></version>
|
||||
|
||||
<name>ACF (Folia)</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>co.aikar</groupId>
|
||||
<artifactId>acf-paper</artifactId>
|
||||
<version><!--VERSION-->0.5.1-SNAPSHOT<!--VERSION--></version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>co.aikar</groupId>
|
||||
<artifactId>acf-brigadier</artifactId>
|
||||
<version><!--VERSION-->0.5.1-SNAPSHOT<!--VERSION--></version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.folia</groupId>
|
||||
<artifactId>folia-api</artifactId>
|
||||
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2023 Daniel Ennis (Aikar) - MIT License
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package co.aikar.commands;
|
||||
|
||||
import io.papermc.paper.threadedregions.scheduler.AsyncScheduler;
|
||||
import io.papermc.paper.threadedregions.scheduler.ScheduledTask;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class ACFFoliaScheduler extends ACFBukkitScheduler {
|
||||
|
||||
private ScheduledTask scheduledTask;
|
||||
|
||||
@Override
|
||||
public void registerSchedulerDependencies(BukkitCommandManager manager) {
|
||||
manager.registerDependency(AsyncScheduler.class, Bukkit.getAsyncScheduler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createDelayedTask(Plugin plugin, Runnable task, long delay) {
|
||||
//We divide by 20 because 20 ticks per second.
|
||||
Bukkit.getAsyncScheduler().runDelayed(plugin, (scheduledTask)-> task.run(), (delay / 20), TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createLocaleTask(Plugin plugin, Runnable task, long delay, long period) {
|
||||
//We divide by 20 because 20 ticks per second.
|
||||
this.scheduledTask = Bukkit.getAsyncScheduler().runAtFixedRate(plugin, (scheduledTask)-> task.run(), (delay/20), (period/20), TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelLocaleTask() {
|
||||
this.scheduledTask.cancel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2023 Daniel Ennis (Aikar) - MIT License
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package co.aikar.commands;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class FoliaCommandManager extends PaperCommandManager {
|
||||
|
||||
public FoliaCommandManager(Plugin plugin) {
|
||||
super(plugin, new ACFFoliaScheduler());
|
||||
}
|
||||
}
|
||||
@@ -64,5 +64,11 @@
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.folia</groupId>
|
||||
<artifactId>folia-api</artifactId>
|
||||
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -32,7 +32,11 @@ public class PaperCommandManager extends BukkitCommandManager {
|
||||
|
||||
// If we get anything Paper specific
|
||||
public PaperCommandManager(Plugin plugin) {
|
||||
super(plugin);
|
||||
this(plugin, new ACFBukkitScheduler());
|
||||
}
|
||||
|
||||
public PaperCommandManager(Plugin plugin, ACFBukkitScheduler scheduler) {
|
||||
super(plugin, scheduler);
|
||||
try {
|
||||
Class.forName("com.destroystokyo.paper.event.server.AsyncTabCompleteEvent");
|
||||
plugin.getServer().getPluginManager().registerEvents(new PaperAsyncTabCompleteHandler(this), plugin);
|
||||
|
||||
Reference in New Issue
Block a user