Update config, override /locate

This commit is contained in:
dfsek
2020-10-28 02:19:46 -07:00
parent a942e0b844
commit 89bc05fde8
9 changed files with 58 additions and 48 deletions

View File

@@ -1,6 +1,7 @@
package com.dfsek.terra;
import com.dfsek.terra.command.TerraCommand;
import com.dfsek.terra.command.structure.LocateCommand;
import com.dfsek.terra.config.base.ConfigUtil;
import com.dfsek.terra.config.base.WorldConfig;
import com.dfsek.terra.config.lang.LangUtil;
@@ -46,6 +47,11 @@ public class Terra extends GaeaPlugin {
c.setExecutor(command);
c.setTabCompleter(command);
LocateCommand locate = new LocateCommand(command, false);
PluginCommand locatePl = Objects.requireNonNull(getCommand("locate"));
locatePl.setExecutor(locate);
locatePl.setTabCompleter(locate);
saveDefaultConfig();
Bukkit.getScheduler().scheduleAsyncRepeatingTask(this, TerraChunkGenerator::saveAll, ConfigUtil.dataSave, ConfigUtil.dataSave);
Bukkit.getPluginManager().registerEvents(new EventListener(this), this);