refactor: 更新 bukkit api 至 1.19.2
This commit is contained in:
@@ -20,6 +20,9 @@ public final class CoreBukkitAPI extends CoreAPI {
|
||||
FileConfiguration config = plugin.getConfig();
|
||||
|
||||
ConfigurationSection datasourceConfig = config.getConfigurationSection("datasource");
|
||||
if (datasourceConfig == null) {
|
||||
throw new IllegalArgumentException("配置文件中未找到 datasource 节点!");
|
||||
}
|
||||
HikariConfig hikariConfig = new HikariConfig();
|
||||
hikariConfig.setDriverClassName(datasourceConfig.getString("driver"));
|
||||
hikariConfig.setJdbcUrl(datasourceConfig.getString("url"));
|
||||
|
@@ -99,14 +99,21 @@ public class ParentCommand extends ChildCommand {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void hook(@NotNull PluginCommand command) {
|
||||
public void hook(PluginCommand command) {
|
||||
if (command == null) {
|
||||
return;
|
||||
}
|
||||
command.setExecutor(this);
|
||||
command.setTabCompleter(this);
|
||||
plugin.getLogger().info("已注册指令 " + getUsage() + ".");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (!hasPermission(sender)) {
|
||||
CoreMessage.COMMAND_NOT_HAS_PERMISSION.show(sender);
|
||||
return true;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
sender.sendMessage("§e==================== [" + name + "使用帮助] ====================");
|
||||
Map<String, String> helpMap = getCommandHelp(sender);
|
||||
@@ -122,16 +129,21 @@ public class ParentCommand extends ChildCommand {
|
||||
return true;
|
||||
}
|
||||
for (ChildCommand childCommand : childCommands) {
|
||||
if (childCommand.getName().equalsIgnoreCase(args[0])) {
|
||||
if (!childCommand.getName().equalsIgnoreCase(args[0])) {
|
||||
continue;
|
||||
}
|
||||
if (childCommand instanceof ParentCommand || childCommand.hasPermission(sender)) {
|
||||
return childCommand.onCommand(sender, command, label, Arrays.copyOfRange(args, 1, args.length));
|
||||
}
|
||||
CoreMessage.COMMAND_NOT_HAS_PERMISSION.show(sender);
|
||||
return true;
|
||||
}
|
||||
CoreMessage.COMMAND_NOT_FOUND.show(sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
if (args.length == 0) {
|
||||
return childCommands.stream()
|
||||
.map(ChildCommand::getName)
|
||||
|
@@ -35,14 +35,14 @@ public class GCCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
System.gc();
|
||||
sender.sendMessage("§a已发送 GC 信号.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public class InfoModeCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (!(sender instanceof Player)) {
|
||||
CoreMessage.COMMAND_MUST_USED_BY_PLAYER.show(sender);
|
||||
return true;
|
||||
@@ -75,7 +75,7 @@ public class InfoModeCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ public class YamlCommand extends ChildCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(@NotNull CommandSender sender) {
|
||||
return true;
|
||||
return sender.hasPermission("hamster.core.admin");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,9 +47,9 @@ public class YamlCommand extends ChildCommand {
|
||||
return "将当前信息保存至 yaml 中";
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"deprecation", "ConstantConditions"})
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
YamlConfiguration config = new YamlConfiguration();
|
||||
config.set("mc-version", BukkitUtils.getMCVersion());
|
||||
config.set("nms-version", BukkitUtils.getNMSVersion());
|
||||
@@ -70,10 +70,10 @@ public class YamlCommand extends ChildCommand {
|
||||
lore.add("§e测试 lore 1");
|
||||
lore.add("§e测试 lore 2");
|
||||
lore.add("§e测试 lore 3");
|
||||
meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
|
||||
meta.setDisplayName("§a测试物品");
|
||||
meta.setLore(lore);
|
||||
meta.addItemFlags(ItemFlag.values());
|
||||
meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
|
||||
stack.setItemMeta(meta);
|
||||
config.set("test-item", stack);
|
||||
File dataFolder = new File(HamsterCorePlugin.getInstance().getDataFolder(), "yaml");
|
||||
@@ -91,7 +91,7 @@ public class YamlCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ public class LoreAddCommand extends ChildCommand {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (args.length < 1) {
|
||||
CoreMessage.COMMAND_LORE_EMPTY_INPUT.show(sender);
|
||||
return true;
|
||||
@@ -71,7 +71,7 @@ public class LoreAddCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ public class LoreClearCommand extends ChildCommand {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (!(sender instanceof Player)) {
|
||||
CoreMessage.COMMAND_MUST_USED_BY_PLAYER.show(sender);
|
||||
return true;
|
||||
@@ -67,7 +67,7 @@ public class LoreClearCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public class LoreNameCommand extends ChildCommand {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (args.length < 1) {
|
||||
CoreMessage.COMMAND_LORE_EMPTY_INPUT.show(sender);
|
||||
return true;
|
||||
@@ -65,7 +65,7 @@ public class LoreNameCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ public class LoreRemoveCommand extends ChildCommand {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (args.length < 1) {
|
||||
CoreMessage.COMMAND_LORE_REMOVE_NOT_INPUT_NUMBER.show(sender);
|
||||
return true;
|
||||
@@ -80,7 +80,7 @@ public class LoreRemoveCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ public class LoreSetCommand extends ChildCommand {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
if (args.length < 1) {
|
||||
CoreMessage.COMMAND_LORE_SET_NOT_INPUT_NUMBER.show(sender);
|
||||
return true;
|
||||
@@ -86,7 +86,7 @@ public class LoreSetCommand extends ChildCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ import cn.hamster3.mc.plugin.core.bukkit.command.ParentCommand;
|
||||
import cn.hamster3.mc.plugin.core.common.util.CommonUtils;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class ParentLoreCommand extends ParentCommand {
|
||||
public static final ParentLoreCommand INSTANCE = new ParentLoreCommand();
|
||||
@@ -19,7 +20,7 @@ public final class ParentLoreCommand extends ParentCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
CommonUtils.replaceColorCode(args);
|
||||
return super.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package cn.hamster3.mc.plugin.core.bukkit.constant;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public enum CoreMessage {
|
||||
COMMAND_NOT_FOUND,
|
||||
COMMAND_NOT_HAS_PERMISSION,
|
||||
COMMAND_MUST_USED_BY_PLAYER,
|
||||
|
||||
COMMAND_DEBUG_INFO_MODE_ON,
|
||||
@@ -29,8 +29,4 @@ public enum CoreMessage {
|
||||
public void show(CommandSender sender) {
|
||||
sender.sendMessage(name());
|
||||
}
|
||||
|
||||
public void show(Player player) {
|
||||
player.sendMessage(name());
|
||||
}
|
||||
}
|
||||
|
@@ -44,6 +44,9 @@ public class DebugListener implements Listener {
|
||||
}
|
||||
event.setCancelled(true);
|
||||
Block block = event.getClickedBlock();
|
||||
if (block == null) {
|
||||
return;
|
||||
}
|
||||
player.sendMessage("§e==============================");
|
||||
player.sendMessage(String.format("§a方块位置: %s %d %d %d",
|
||||
block.getWorld().getName(),
|
||||
|
@@ -9,8 +9,11 @@ import java.util.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ButtonGroup {
|
||||
@NotNull
|
||||
private final String name;
|
||||
@NotNull
|
||||
private final PageConfig config;
|
||||
@NotNull
|
||||
private final HashMap<Character, String> buttonNameMap;
|
||||
|
||||
/**
|
||||
@@ -19,7 +22,7 @@ public class ButtonGroup {
|
||||
* @param pageConfig Page 设定
|
||||
* @param config 按钮组设定
|
||||
*/
|
||||
public ButtonGroup(PageConfig pageConfig, ConfigurationSection config) {
|
||||
public ButtonGroup(@NotNull PageConfig pageConfig, @NotNull ConfigurationSection config) {
|
||||
this.config = pageConfig;
|
||||
name = config.getName();
|
||||
buttonNameMap = new HashMap<>();
|
||||
@@ -148,6 +151,7 @@ public class ButtonGroup {
|
||||
*
|
||||
* @return 按钮组名称
|
||||
*/
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -157,6 +161,7 @@ public class ButtonGroup {
|
||||
*
|
||||
* @return 把图形字符映射到按钮名称的表
|
||||
*/
|
||||
@NotNull
|
||||
public HashMap<Character, String> getButtonNameMap() {
|
||||
return buttonNameMap;
|
||||
}
|
||||
|
@@ -60,16 +60,20 @@ public class PageConfig implements InventoryHolder {
|
||||
|
||||
buttons = new HashMap<>();
|
||||
ConfigurationSection buttonsConfig = config.getConfigurationSection("buttons");
|
||||
if (buttonsConfig != null) {
|
||||
for (String key : buttonsConfig.getKeys(false)) {
|
||||
buttons.put(key, buttonsConfig.getItemStack(key));
|
||||
}
|
||||
}
|
||||
|
||||
buttonGroups = new ArrayList<>();
|
||||
ConfigurationSection buttonGroupsConfig = config.getConfigurationSection("groups");
|
||||
if (buttonGroupsConfig != null) {
|
||||
for (String key : buttonGroupsConfig.getKeys(false)) {
|
||||
buttonGroups.add(
|
||||
new ButtonGroup(this, buttonGroupsConfig.getConfigurationSection(key))
|
||||
);
|
||||
//noinspection ConstantConditions
|
||||
ButtonGroup buttonGroup = new ButtonGroup(this, buttonGroupsConfig.getConfigurationSection(key));
|
||||
buttonGroups.add(buttonGroup);
|
||||
}
|
||||
}
|
||||
|
||||
ButtonGroup group = getButtonGroup("default");
|
||||
@@ -84,15 +88,17 @@ public class PageConfig implements InventoryHolder {
|
||||
|
||||
buttonSounds = new HashMap<>();
|
||||
ConfigurationSection buttonSoundConfig = config.getConfigurationSection("sounds");
|
||||
if (buttonSoundConfig != null) {
|
||||
for (String key : buttonSoundConfig.getKeys(false)) {
|
||||
try {
|
||||
buttonSounds.put(key, Sound.valueOf(buttonSoundConfig.getString(key)));
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (Exception e) {
|
||||
HamsterCorePlugin.getInstance().getLogger().warning("初始化 PageConfig 时遇到了一个异常:");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取把 buttonName 映射到 展示物品 的表
|
||||
|
@@ -7,6 +7,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.HashMap;
|
||||
@@ -23,11 +24,14 @@ public class PageManager {
|
||||
throw new IllegalArgumentException(clazz.getName() + " 未被 @PluginPage 注解修饰!");
|
||||
}
|
||||
PluginPage annotation = clazz.getAnnotation(PluginPage.class);
|
||||
String value = annotation.value();
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin(value);
|
||||
String pluginName = annotation.value();
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName);
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("未找到插件 " + pluginName + " !");
|
||||
}
|
||||
File pageFolder = new File(plugin.getDataFolder(), "pages");
|
||||
if (pageFolder.mkdirs()) {
|
||||
HamsterCorePlugin.getInstance().getLogger().info("为 " + value + " 创建页面配置文件夹...");
|
||||
HamsterCorePlugin.getInstance().getLogger().info("为 " + pluginName + " 创建页面配置文件夹...");
|
||||
}
|
||||
String pageFileName = clazz.getSimpleName() + ".yml";
|
||||
File pageFile = new File(pageFolder, pageFileName);
|
||||
@@ -37,8 +41,13 @@ public class PageManager {
|
||||
PAGE_CONFIG.put(clazz.getName(), pageConfig);
|
||||
return pageConfig;
|
||||
}
|
||||
InputStream resource = plugin.getResource("/" + pageFileName);
|
||||
if (resource == null) {
|
||||
throw new IllegalArgumentException("在插件 " + pluginName + " 的文件内部未找到 " + pageFileName + " !");
|
||||
}
|
||||
try {
|
||||
Files.copy(plugin.getResource("/" + pageFileName), pageFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
Files.copy(resource, pageFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
resource.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@@ -82,6 +82,7 @@ public final class BukkitUtils {
|
||||
try {
|
||||
stack = new ItemStack(Material.valueOf("PLAYER_HEAD"));
|
||||
} catch (IllegalArgumentException e) {
|
||||
//noinspection deprecation
|
||||
stack = new ItemStack(Material.valueOf("SKULL_ITEM"), 1, (short) 3);
|
||||
}
|
||||
SkullMeta meta = (SkullMeta) stack.getItemMeta();
|
||||
@@ -110,8 +111,10 @@ public final class BukkitUtils {
|
||||
stack = new ItemStack(Material.valueOf("SKULL_ITEM"), 1, (short) 3);
|
||||
}
|
||||
SkullMeta meta = (SkullMeta) stack.getItemMeta();
|
||||
if (meta != null) {
|
||||
meta.setOwner(name);
|
||||
stack.setItemMeta(meta);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -161,7 +164,7 @@ public final class BukkitUtils {
|
||||
}
|
||||
if (stack.hasItemMeta()) {
|
||||
ItemMeta meta = stack.getItemMeta();
|
||||
if (meta.hasDisplayName()) {
|
||||
if (meta != null && meta.hasDisplayName()) {
|
||||
return meta.getDisplayName();
|
||||
}
|
||||
}
|
||||
|
@@ -27,10 +27,10 @@ public abstract class CoreAPI {
|
||||
}
|
||||
|
||||
public void reportError(@NotNull String apiKey, @NotNull String projectID, @NotNull Throwable exception) {
|
||||
|
||||
// todo
|
||||
}
|
||||
|
||||
public void reportFile(@NotNull String apiKey, @NotNull String projectID, @NotNull String filename, byte @NotNull [] bytes) {
|
||||
|
||||
// todo
|
||||
}
|
||||
}
|
||||
|
@@ -8,14 +8,14 @@ import java.util.concurrent.TimeUnit;
|
||||
@SuppressWarnings("unused")
|
||||
public abstract class CountdownThread implements Runnable {
|
||||
private final long interval;
|
||||
private final long ticks;
|
||||
protected int tick;
|
||||
private final long totalTicks;
|
||||
private int nowTicks;
|
||||
private ScheduledFuture<?> future;
|
||||
|
||||
public CountdownThread(long interval, long ticks) {
|
||||
public CountdownThread(long interval, long totalTicks) {
|
||||
this.interval = interval;
|
||||
this.ticks = ticks;
|
||||
tick = 0;
|
||||
this.totalTicks = totalTicks;
|
||||
nowTicks = 0;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
@@ -28,7 +28,7 @@ public abstract class CountdownThread implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (tick == ticks) {
|
||||
if (nowTicks == totalTicks) {
|
||||
try {
|
||||
onFinish();
|
||||
} catch (Exception e) {
|
||||
@@ -38,11 +38,11 @@ public abstract class CountdownThread implements Runnable {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
onTick(tick);
|
||||
onTick(nowTicks);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
tick++;
|
||||
nowTicks++;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,12 +50,35 @@ public abstract class CountdownThread implements Runnable {
|
||||
*
|
||||
* @param tick 时间刻度,以 0 开始,到 interval-1 结束
|
||||
*/
|
||||
protected void onTick(int tick) {
|
||||
}
|
||||
protected abstract void onTick(int tick);
|
||||
|
||||
protected abstract void onFinish();
|
||||
|
||||
public void cancel() {
|
||||
future.cancel(false);
|
||||
}
|
||||
|
||||
protected abstract void onFinish();
|
||||
public long getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public long getTotalTicks() {
|
||||
return totalTicks;
|
||||
}
|
||||
|
||||
public int getNowTicks() {
|
||||
return nowTicks;
|
||||
}
|
||||
|
||||
public void setNowTicks(int nowTicks) {
|
||||
this.nowTicks = nowTicks;
|
||||
}
|
||||
|
||||
public ScheduledFuture<?> getFuture() {
|
||||
return future;
|
||||
}
|
||||
|
||||
public void setFuture(ScheduledFuture<?> future) {
|
||||
this.future = future;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user