diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 359bb53..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# 默认忽略的文件
-/shelf/
-/workspace.xml
diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml
deleted file mode 100644
index 9ce56c5..0000000
--- a/.idea/checkstyle-idea.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- 10.12.3
- JavaOnly
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index c2b3945..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/discord.xml b/.idea/discord.xml
new file mode 100644
index 0000000..104c42f
--- /dev/null
+++ b/.idea/discord.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/easycode.ignore b/.idea/easycode.ignore
new file mode 100644
index 0000000..be585df
--- /dev/null
+++ b/.idea/easycode.ignore
@@ -0,0 +1,13 @@
+node_modules/
+dist/
+vendor/
+cache/
+.*/
+*.min.*
+*.test.*
+*.spec.*
+*.bundle.*
+*.bundle-min.*
+*.*.js
+*.*.ts
+*.log
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index aa00ffa..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
deleted file mode 100644
index 4a2aa3a..0000000
--- a/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 3767da3..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 070c640..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 2b63946..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java b/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
index 670a74e..54c7918 100644
--- a/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
+++ b/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
@@ -2,8 +2,6 @@
import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.event.PacketListenerPriority;
-import com.github.retrooper.packetevents.protocol.entity.type.EntityType;
-import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.ticxo.modelengine.api.ModelEngineAPI;
@@ -18,6 +16,7 @@
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
+import re.imc.geysermodelengine.commands.ReloadCommand;
import re.imc.geysermodelengine.listener.ModelListener;
import re.imc.geysermodelengine.listener.MountPacketListener;
import re.imc.geysermodelengine.model.BedrockMountControl;
@@ -118,6 +117,7 @@ public void onEnable() {
}, 10, entityPositionUpdatePeriod, TimeUnit.MILLISECONDS);
+ getCommand("geysermodelengine").setExecutor(new ReloadCommand(this));
Bukkit.getPluginManager().registerEvents(new ModelListener(), this);
Bukkit.getScheduler()
.runTaskLater(GeyserModelEngine.getInstance(), () -> {
diff --git a/src/main/java/re/imc/geysermodelengine/commands/ReloadCommand.java b/src/main/java/re/imc/geysermodelengine/commands/ReloadCommand.java
new file mode 100644
index 0000000..660948d
--- /dev/null
+++ b/src/main/java/re/imc/geysermodelengine/commands/ReloadCommand.java
@@ -0,0 +1,31 @@
+package re.imc.geysermodelengine.commands;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import re.imc.geysermodelengine.GeyserModelEngine;
+
+public class ReloadCommand implements CommandExecutor {
+
+ private final GeyserModelEngine plugin;
+
+ public ReloadCommand(GeyserModelEngine plugin) {
+ this.plugin = plugin;
+ }
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
+
+ if (sender instanceof Player && !sender.hasPermission("geysermodelengine.reload")) {
+ sender.sendMessage("§cYou don't have permission to use this command.");
+ return true;
+ }
+
+ plugin.reloadConfig();
+ plugin.onEnable();
+
+ sender.sendMessage("§aGeyserModelEngine configuration reloaded!");
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/re/imc/geysermodelengine/model/EntityTask.java b/src/main/java/re/imc/geysermodelengine/model/EntityTask.java
index becbe52..44345a0 100644
--- a/src/main/java/re/imc/geysermodelengine/model/EntityTask.java
+++ b/src/main/java/re/imc/geysermodelengine/model/EntityTask.java
@@ -4,13 +4,10 @@
import com.google.common.cache.CacheBuilder;
import com.ticxo.modelengine.api.animation.BlueprintAnimation;
import com.ticxo.modelengine.api.animation.handler.AnimationHandler;
-import com.ticxo.modelengine.api.entity.CullType;
import com.ticxo.modelengine.api.generator.blueprint.BlueprintBone;
import com.ticxo.modelengine.api.model.ActiveModel;
import com.ticxo.modelengine.api.model.ModeledEntity;
-import com.ticxo.modelengine.api.model.bone.BoneBehaviorTypes;
import com.ticxo.modelengine.api.model.bone.ModelBone;
-import com.ticxo.modelengine.api.model.bone.type.Mount;
import com.ticxo.modelengine.api.model.render.DisplayRenderer;
import lombok.Getter;
import lombok.Setter;
@@ -18,7 +15,6 @@
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
-import org.bukkit.scheduler.BukkitRunnable;
import org.geysermc.floodgate.api.FloodgateApi;
import org.joml.Vector3f;
import re.imc.geysermodelengine.GeyserModelEngine;
diff --git a/src/main/java/re/imc/geysermodelengine/model/ModelEntity.java b/src/main/java/re/imc/geysermodelengine/model/ModelEntity.java
index d8d41e1..0bb73fe 100644
--- a/src/main/java/re/imc/geysermodelengine/model/ModelEntity.java
+++ b/src/main/java/re/imc/geysermodelengine/model/ModelEntity.java
@@ -2,10 +2,8 @@
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
import com.google.common.collect.Sets;
-import com.ticxo.modelengine.api.entity.BukkitEntity;
import com.ticxo.modelengine.api.model.ActiveModel;
import com.ticxo.modelengine.api.model.ModeledEntity;
-import io.github.retrooper.packetevents.util.SpigotConversionUtil;
import lombok.Getter;
import org.bukkit.Location;
import org.bukkit.entity.Player;
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 5c607b9..8f31d29 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -7,4 +7,8 @@ authors:
api-version: '1.19'
depend:
- ModelEngine
- - floodgate
\ No newline at end of file
+ - floodgate
+commands:
+ geysermodelengine:
+ usage: /geysermodelengine reload
+ permission: geysermodelengine.reload
\ No newline at end of file