mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-04-07 12:35:53 +02:00
feat: Add support for issuer with queued command
This commit is contained in:
parent
1c89b6458f
commit
706338bb0c
@ -7,6 +7,7 @@
|
||||
|
||||
package com.onarandombox.MultiverseCore.commandtools.queue;
|
||||
|
||||
import co.aikar.commands.BukkitCommandIssuer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -26,6 +27,18 @@ public class QueuedCommand {
|
||||
private final int validDuration;
|
||||
private BukkitTask expireTask;
|
||||
|
||||
public QueuedCommand(BukkitCommandIssuer issuer, Runnable action) {
|
||||
this(issuer.getIssuer(), action, DEFAULT_PROMPT_MESSAGE, DEFAULT_VALID_TIME);
|
||||
}
|
||||
|
||||
public QueuedCommand(BukkitCommandIssuer issuer, Runnable action, String prompt) {
|
||||
this(issuer.getIssuer(), action, prompt, DEFAULT_VALID_TIME);
|
||||
}
|
||||
|
||||
public QueuedCommand(BukkitCommandIssuer issuer, Runnable action, int validDuration) {
|
||||
this(issuer.getIssuer(), action, DEFAULT_PROMPT_MESSAGE, validDuration);
|
||||
}
|
||||
|
||||
public QueuedCommand(CommandSender sender, Runnable action) {
|
||||
this(sender, action, DEFAULT_PROMPT_MESSAGE, DEFAULT_VALID_TIME);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user