chore: update .gitignore and build.gradle.kts for local server testing
- Added entries to .gitignore for local Paper test server and API documentation. - Included the run-paper plugin in build.gradle.kts for local server execution. - Configured runServer task with Minecraft version 1.21.4 for testing.
This commit is contained in:
parent
d1d2b93742
commit
2d79d2a91d
260 changed files with 4808 additions and 3847 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package com.loki.lochat.integrations;
|
||||
|
||||
import com.loki.lochat.util.FoliaUtil;
|
||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
|
@ -32,9 +31,24 @@ public class DiscordIntegration {
|
|||
* Загрузить конфигурацию
|
||||
*/
|
||||
private void loadConfig() {
|
||||
File configFile = new File(plugin.getDataFolder(), "config/discord.yml");
|
||||
// Создаём папку config если её нет
|
||||
File configFolder = new File(plugin.getDataFolder(), "config");
|
||||
if (!configFolder.exists()) {
|
||||
configFolder.mkdirs();
|
||||
}
|
||||
|
||||
File configFile = new File(configFolder, "discord.yml");
|
||||
if (!configFile.exists()) {
|
||||
plugin.saveResource("config/discord.yml", false);
|
||||
try {
|
||||
// Копируем из resources/config/discord.yml
|
||||
java.io.InputStream in = plugin.getResource("config/discord.yml");
|
||||
if (in != null) {
|
||||
java.nio.file.Files.copy(in, configFile.toPath());
|
||||
in.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().warning("Failed to copy config/discord.yml: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
config = YamlConfiguration.loadConfiguration(configFile);
|
||||
|
|
@ -278,4 +292,4 @@ public class DiscordIntegration {
|
|||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@ import org.bukkit.entity.Player;
|
|||
*/
|
||||
public class LibertyBansHook {
|
||||
|
||||
private final LoChat plugin;
|
||||
private final MuteService muteService;
|
||||
|
||||
public LibertyBansHook(LoChat plugin) {
|
||||
this.plugin = plugin;
|
||||
this.muteService = plugin.getServiceRegistry().get(MuteService.class);
|
||||
|
||||
// Проверяем наличие LibertyBans
|
||||
|
|
|
|||
|
|
@ -81,4 +81,4 @@ public class SkinsRestorerHook {
|
|||
// Используем стандартные сервисы для получения голов
|
||||
return "https://minotar.net/helm/" + playerName + "/8.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue