mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-09-14 19:36:45 +08:00
devtools
This commit is contained in:
parent
83c7f3031c
commit
28e5b32d7b
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user