From 28e5b32d7bf422623548778e91b3b4cadabd522c Mon Sep 17 00:00:00 2001 From: tanyaofei Date: Sat, 27 Jul 2024 23:03:42 +0800 Subject: [PATCH] devtools --- .../core/{FakeplayerGuiceModule.java => GuiceModule.java} | 7 ++++--- .../java/io/github/hello09x/fakeplayer/core/Main.java | 2 +- .../hello09x/fakeplayer/core/command/CommandRegistry.java | 2 +- .../hello09x/fakeplayer/core/command/CommandSupports.java | 2 +- .../fakeplayer/core/command/impl/AbstractCommand.java | 4 ++-- .../fakeplayer/core/command/impl/ActionCommand.java | 2 +- .../hello09x/fakeplayer/core/command/impl/CmdCommand.java | 2 +- .../fakeplayer/core/command/impl/ConfigCommand.java | 2 +- .../fakeplayer/core/command/impl/DistanceCommand.java | 2 +- .../fakeplayer/core/command/impl/ExpmeCommand.java | 4 ++-- .../fakeplayer/core/command/impl/InvseeCommand.java | 2 +- .../fakeplayer/core/command/impl/KillCommand.java | 2 +- .../fakeplayer/core/command/impl/ListCommand.java | 2 +- .../fakeplayer/core/command/impl/ReloadCommand.java | 2 +- .../fakeplayer/core/command/impl/RideCommand.java | 2 +- .../fakeplayer/core/command/impl/SelectCommand.java | 2 +- .../hello09x/fakeplayer/core/command/impl/SetCommand.java | 2 +- .../fakeplayer/core/command/impl/SkinCommand.java | 2 +- .../fakeplayer/core/command/impl/SleepCommand.java | 2 +- .../fakeplayer/core/command/impl/SpawnCommand.java | 2 +- .../fakeplayer/core/command/impl/StatusCommand.java | 2 +- .../fakeplayer/core/command/impl/TeleportCommand.java | 2 +- .../hello09x/fakeplayer/core/entity/FakePlayer.java | 8 ++++---- .../fakeplayer/core/listener/FakeplayerListener.java | 4 ++-- .../fakeplayer/core/listener/ReplenishListener.java | 3 ++- .../fakeplayer/core/manager/FakeplayerManager.java | 4 ++-- .../fakeplayer/core/manager/invsee/AbstractInvsee.java | 4 ++-- .../fakeplayer/core/manager/invsee/DefaultInvseeImpl.java | 2 +- .../fakeplayer/core/manager/naming/NameManager.java | 2 +- .../hello09x/fakeplayer/v1_20_R1/spi/NMSServerImpl.java | 2 +- .../hello09x/fakeplayer/v1_20_R2/spi/NMSServerImpl.java | 2 +- .../fakeplayer/v1_20_R3_R4/spi/NMSServerImpl.java | 2 +- .../fakeplayer/v1_20_R5_R6/spi/NMSServerImpl.java | 2 +- .../hello09x/fakeplayer/v1_21_R1/spi/NMSServerImpl.java | 2 +- 34 files changed, 46 insertions(+), 44 deletions(-) rename fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/{FakeplayerGuiceModule.java => GuiceModule.java} (91%) diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/FakeplayerGuiceModule.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/GuiceModule.java similarity index 91% rename from fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/FakeplayerGuiceModule.java rename to fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/GuiceModule.java index 5ee3585..ec83c1f 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/FakeplayerGuiceModule.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/GuiceModule.java @@ -3,9 +3,9 @@ package io.github.hello09x.fakeplayer.core; import com.google.inject.AbstractModule; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.devtools.database.jdbc.JdbcTemplate; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.api.spi.NMSBridge; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; import io.github.hello09x.fakeplayer.core.manager.invsee.DefaultInvseeImpl; @@ -17,7 +17,7 @@ import javax.sql.DataSource; import java.io.File; import java.util.ServiceLoader; -public class FakeplayerGuiceModule extends AbstractModule { +public class GuiceModule extends AbstractModule { @Override @@ -42,6 +42,7 @@ public class FakeplayerGuiceModule extends AbstractModule { config.setDriverClassName("org.sqlite.JDBC"); config.setMaximumPoolSize(1); config.setJdbcUrl("jdbc:sqlite:" + new File(Main.getInstance().getDataFolder(), "data.db").getAbsolutePath()); + config.setConnectionTimeout(1000L); return new HikariDataSource(config); } diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/Main.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/Main.java index d67474e..ecfb4c2 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/Main.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/Main.java @@ -25,7 +25,7 @@ public final class Main extends RegistrablePlugin { @Override public void onLoad() { instance = this; - injector = Guice.createInjector(new FakeplayerGuiceModule()); + injector = Guice.createInjector(new GuiceModule()); } @Override diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandRegistry.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandRegistry.java index 7df3be8..b3e3cac 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandRegistry.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandRegistry.java @@ -4,7 +4,7 @@ import com.google.inject.Inject; import com.google.inject.Singleton; import dev.jorel.commandapi.CommandPermission; import io.github.hello09x.bedrock.command.Usage; -import io.github.hello09x.devtools.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; import io.github.hello09x.fakeplayer.api.spi.Action; import io.github.hello09x.fakeplayer.core.command.impl.*; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandSupports.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandSupports.java index 7325ca1..5ebb5d0 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandSupports.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/CommandSupports.java @@ -5,7 +5,7 @@ import dev.jorel.commandapi.arguments.Argument; import dev.jorel.commandapi.arguments.ArgumentSuggestions; import dev.jorel.commandapi.arguments.CustomArgument; import dev.jorel.commandapi.arguments.StringArgument; -import io.github.hello09x.devtools.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; import io.github.hello09x.fakeplayer.api.spi.Action; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.command.impl.ActionCommand; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/AbstractCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/AbstractCommand.java index 2f84c99..6927c1e 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/AbstractCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/AbstractCommand.java @@ -4,8 +4,8 @@ import com.google.inject.Inject; import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.api.spi.NMSBridge; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ActionCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ActionCommand.java index d326609..c03ff3b 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ActionCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ActionCommand.java @@ -5,7 +5,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; import dev.jorel.commandapi.executors.CommandExecutor; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.api.spi.Action; import io.github.hello09x.fakeplayer.core.manager.action.ActionManager; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/CmdCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/CmdCommand.java index 337de5d..ab7661b 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/CmdCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/CmdCommand.java @@ -5,7 +5,7 @@ import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; import dev.jorel.commandapi.wrappers.CommandResult; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.command.Permission; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ConfigCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ConfigCommand.java index 31ec5b8..c977d6a 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ConfigCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ConfigCommand.java @@ -6,7 +6,7 @@ import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; import io.github.hello09x.bedrock.util.Components; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.manager.UserConfigManager; import io.github.hello09x.fakeplayer.core.repository.model.Config; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/DistanceCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/DistanceCommand.java index 0ecff6f..8bf8118 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/DistanceCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/DistanceCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.util.Mth; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.entity.Player; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ExpmeCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ExpmeCommand.java index 273d3c2..87bb93b 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ExpmeCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ExpmeCommand.java @@ -4,8 +4,8 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; -import io.github.hello09x.devtools.utils.ExperienceUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.utils.ExperienceUtils; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/InvseeCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/InvseeCommand.java index c737e42..8c2f407 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/InvseeCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/InvseeCommand.java @@ -4,7 +4,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/KillCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/KillCommand.java index 9f3d05c..878e0ab 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/KillCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/KillCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ListCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ListCommand.java index 888a6b2..ddbd758 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ListCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ListCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.executors.CommandArguments; import io.github.hello09x.bedrock.page.Page; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.command.Permission; import io.github.hello09x.fakeplayer.core.util.Mth; import org.apache.commons.lang3.StringUtils; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ReloadCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ReloadCommand.java index 4ac3926..5868ba6 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ReloadCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/ReloadCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Inject; import com.google.inject.Singleton; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/RideCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/RideCommand.java index 77c210d..ce5ff18 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/RideCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/RideCommand.java @@ -4,7 +4,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SelectCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SelectCommand.java index 0f3f57e..1adc258 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SelectCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SelectCommand.java @@ -2,7 +2,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SetCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SetCommand.java index 7839cf6..1be9271 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SetCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SetCommand.java @@ -4,7 +4,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.CommandAPI; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.repository.model.Config; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.command.CommandSender; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SkinCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SkinCommand.java index a0bc064..e1d4a81 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SkinCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SkinCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.util.Skins; import org.apache.commons.lang3.mutable.MutableInt; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SleepCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SleepCommand.java index 1f9fd3b..beec7ef 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SleepCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SleepCommand.java @@ -3,7 +3,7 @@ package io.github.hello09x.fakeplayer.core.command.impl; import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; -import io.github.hello09x.devtools.utils.BlockUtils; +import io.github.hello09x.devtools.core.utils.BlockUtils; import org.bukkit.block.data.type.Bed; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SpawnCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SpawnCommand.java index d6a87c5..242b37e 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SpawnCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/SpawnCommand.java @@ -4,7 +4,7 @@ import com.google.common.base.Throwables; import com.google.inject.Singleton; import dev.jorel.commandapi.executors.CommandArguments; import io.github.hello09x.bedrock.command.MessageException; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.util.Mth; import net.kyori.adventure.text.Component; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/StatusCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/StatusCommand.java index f15d524..9662788 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/StatusCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/StatusCommand.java @@ -4,7 +4,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; import io.github.hello09x.bedrock.io.Experiences; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.core.command.Permission; import io.github.hello09x.fakeplayer.core.repository.model.Config; import io.github.hello09x.fakeplayer.core.util.Mth; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/TeleportCommand.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/TeleportCommand.java index 7623d0f..17254b2 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/TeleportCommand.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/command/impl/TeleportCommand.java @@ -4,7 +4,7 @@ import com.google.inject.Singleton; import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException; import dev.jorel.commandapi.executors.CommandArguments; import io.github.hello09x.bedrock.util.Teleportor; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/entity/FakePlayer.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/entity/FakePlayer.java index 9e898da..78422a8 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/entity/FakePlayer.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/entity/FakePlayer.java @@ -2,10 +2,10 @@ package io.github.hello09x.fakeplayer.core.entity; import io.github.hello09x.bedrock.command.MessageException; import io.github.hello09x.bedrock.task.CompletableTask; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.transaction.TranslatorUtils; -import io.github.hello09x.devtools.utils.EntityUtils; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.utils.EntityUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.event.FakePlayerSpawnEvent; import io.github.hello09x.fakeplayer.api.spi.Action; import io.github.hello09x.fakeplayer.api.spi.NMSBridge; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/FakeplayerListener.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/FakeplayerListener.java index 4751cd5..e2bdcef 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/FakeplayerListener.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/FakeplayerListener.java @@ -3,8 +3,8 @@ package io.github.hello09x.fakeplayer.core.listener; import com.google.common.base.Throwables; import com.google.inject.Inject; import com.google.inject.Singleton; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.utils.ComponentUtils; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.utils.ComponentUtils; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; import io.github.hello09x.fakeplayer.core.constant.FakePlayerStatus; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/ReplenishListener.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/ReplenishListener.java index 8d7eb25..e26e55d 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/ReplenishListener.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/listener/ReplenishListener.java @@ -4,7 +4,7 @@ package io.github.hello09x.fakeplayer.core.listener; import com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent; import com.google.inject.Inject; import com.google.inject.Singleton; -import io.github.hello09x.devtools.utils.BlockUtils; +import io.github.hello09x.devtools.core.utils.BlockUtils; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.command.Permission; import io.github.hello09x.fakeplayer.core.manager.FakeplayerManager; @@ -225,6 +225,7 @@ public class ReplenishListener implements Listener { return; } } + target.closeInventory(InventoryCloseEvent.Reason.PLAYER); }, 20); return; } diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/FakeplayerManager.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/FakeplayerManager.java index cb4e9f3..3bc5d67 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/FakeplayerManager.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/FakeplayerManager.java @@ -4,8 +4,8 @@ import com.google.inject.Inject; import com.google.inject.Singleton; import io.github.hello09x.bedrock.command.MessageException; import io.github.hello09x.bedrock.util.AddressUtils; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.transaction.TranslatorUtils; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.TranslatorUtils; import io.github.hello09x.fakeplayer.api.spi.Action; import io.github.hello09x.fakeplayer.api.spi.NMSBridge; import io.github.hello09x.fakeplayer.core.Main; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/AbstractInvsee.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/AbstractInvsee.java index 1699583..383417d 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/AbstractInvsee.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/AbstractInvsee.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.core.manager.invsee; -import io.github.hello09x.devtools.transaction.PluginTranslator; -import io.github.hello09x.devtools.utils.ComponentUtils; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.utils.ComponentUtils; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.entity.Player; import org.bukkit.inventory.InventoryView; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/DefaultInvseeImpl.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/DefaultInvseeImpl.java index 76f3e86..cb69811 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/DefaultInvseeImpl.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/invsee/DefaultInvseeImpl.java @@ -1,6 +1,6 @@ package io.github.hello09x.fakeplayer.core.manager.invsee; -import io.github.hello09x.devtools.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/naming/NameManager.java b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/naming/NameManager.java index ab13768..de0e28f 100644 --- a/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/naming/NameManager.java +++ b/fakeplayer-core/src/main/java/io/github/hello09x/fakeplayer/core/manager/naming/NameManager.java @@ -2,7 +2,7 @@ package io.github.hello09x.fakeplayer.core.manager.naming; import com.google.inject.Inject; import com.google.inject.Singleton; -import io.github.hello09x.devtools.transaction.PluginTranslator; +import io.github.hello09x.devtools.core.transaction.PluginTranslator; import io.github.hello09x.fakeplayer.core.Main; import io.github.hello09x.fakeplayer.core.config.FakeplayerConfig; import io.github.hello09x.fakeplayer.core.manager.naming.exception.IllegalCustomNameException; diff --git a/fakeplayer-v1_20_R1/src/main/java/io/github/hello09x/fakeplayer/v1_20_R1/spi/NMSServerImpl.java b/fakeplayer-v1_20_R1/src/main/java/io/github/hello09x/fakeplayer/v1_20_R1/spi/NMSServerImpl.java index 6934771..0eb7093 100644 --- a/fakeplayer-v1_20_R1/src/main/java/io/github/hello09x/fakeplayer/v1_20_R1/spi/NMSServerImpl.java +++ b/fakeplayer-v1_20_R1/src/main/java/io/github/hello09x/fakeplayer/v1_20_R1/spi/NMSServerImpl.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.v1_20_R1.spi; import com.mojang.authlib.GameProfile; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.spi.NMSServer; import io.github.hello09x.fakeplayer.api.spi.NMSServerPlayer; import lombok.Getter; diff --git a/fakeplayer-v1_20_R2/src/main/java/io/github/hello09x/fakeplayer/v1_20_R2/spi/NMSServerImpl.java b/fakeplayer-v1_20_R2/src/main/java/io/github/hello09x/fakeplayer/v1_20_R2/spi/NMSServerImpl.java index c51ec4a..e953f6e 100644 --- a/fakeplayer-v1_20_R2/src/main/java/io/github/hello09x/fakeplayer/v1_20_R2/spi/NMSServerImpl.java +++ b/fakeplayer-v1_20_R2/src/main/java/io/github/hello09x/fakeplayer/v1_20_R2/spi/NMSServerImpl.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.v1_20_R2.spi; import com.mojang.authlib.GameProfile; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.spi.NMSServer; import io.github.hello09x.fakeplayer.api.spi.NMSServerPlayer; import lombok.Getter; diff --git a/fakeplayer-v1_20_R3_R4/src/main/java/io/github/hello09x/fakeplayer/v1_20_R3_R4/spi/NMSServerImpl.java b/fakeplayer-v1_20_R3_R4/src/main/java/io/github/hello09x/fakeplayer/v1_20_R3_R4/spi/NMSServerImpl.java index 5b4d65e..101700f 100644 --- a/fakeplayer-v1_20_R3_R4/src/main/java/io/github/hello09x/fakeplayer/v1_20_R3_R4/spi/NMSServerImpl.java +++ b/fakeplayer-v1_20_R3_R4/src/main/java/io/github/hello09x/fakeplayer/v1_20_R3_R4/spi/NMSServerImpl.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.v1_20_R3_R4.spi; import com.mojang.authlib.GameProfile; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.spi.NMSServer; import io.github.hello09x.fakeplayer.api.spi.NMSServerPlayer; import lombok.Getter; diff --git a/fakeplayer-v1_20_R5_R6/src/main/java/io/github/hello09x/fakeplayer/v1_20_R5_R6/spi/NMSServerImpl.java b/fakeplayer-v1_20_R5_R6/src/main/java/io/github/hello09x/fakeplayer/v1_20_R5_R6/spi/NMSServerImpl.java index 19cbaa5..2e5370b 100644 --- a/fakeplayer-v1_20_R5_R6/src/main/java/io/github/hello09x/fakeplayer/v1_20_R5_R6/spi/NMSServerImpl.java +++ b/fakeplayer-v1_20_R5_R6/src/main/java/io/github/hello09x/fakeplayer/v1_20_R5_R6/spi/NMSServerImpl.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.v1_20_R5_R6.spi; import com.mojang.authlib.GameProfile; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.spi.NMSServer; import io.github.hello09x.fakeplayer.api.spi.NMSServerPlayer; import lombok.Getter; diff --git a/fakeplayer-v1_21_R1/src/main/java/io/github/hello09x/fakeplayer/v1_21_R1/spi/NMSServerImpl.java b/fakeplayer-v1_21_R1/src/main/java/io/github/hello09x/fakeplayer/v1_21_R1/spi/NMSServerImpl.java index 1e7f7f2..c3a818e 100644 --- a/fakeplayer-v1_21_R1/src/main/java/io/github/hello09x/fakeplayer/v1_21_R1/spi/NMSServerImpl.java +++ b/fakeplayer-v1_21_R1/src/main/java/io/github/hello09x/fakeplayer/v1_21_R1/spi/NMSServerImpl.java @@ -1,7 +1,7 @@ package io.github.hello09x.fakeplayer.v1_21_R1.spi; import com.mojang.authlib.GameProfile; -import io.github.hello09x.devtools.utils.WorldUtils; +import io.github.hello09x.devtools.core.utils.WorldUtils; import io.github.hello09x.fakeplayer.api.spi.NMSServer; import io.github.hello09x.fakeplayer.api.spi.NMSServerPlayer; import lombok.Getter;