kompletně funkční plugin
This commit is contained in:
@@ -4,8 +4,12 @@ import com.sk89q.worldguard.WorldGuard;
|
||||
import com.sk89q.worldguard.protection.flags.Flag;
|
||||
import com.sk89q.worldguard.protection.flags.StateFlag;
|
||||
import com.sk89q.worldguard.protection.flags.registry.FlagRegistry;
|
||||
import dev.trixinity.eventmanager.commands.ClearEventerCommand;
|
||||
import dev.trixinity.eventmanager.commands.EventCommand;
|
||||
import dev.trixinity.eventmanager.commands.EventerCommand;
|
||||
import dev.trixinity.eventmanager.commands.TrixinityCommand;
|
||||
import dev.trixinity.eventmanager.placeholders.TrixinityPlaceholderExpansion;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
/**
|
||||
@@ -18,9 +22,26 @@ public class TrixinityEventManager extends JavaPlugin {
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
|
||||
// Vytvoření výchozí konfigurace
|
||||
saveDefaultConfig();
|
||||
|
||||
// Registrace příkazů
|
||||
getCommand("trixinity").setExecutor(new TrixinityCommand());
|
||||
getCommand("event").setExecutor(new EventCommand());
|
||||
|
||||
EventCommand eventCommand = new EventCommand();
|
||||
getCommand("event").setExecutor(eventCommand);
|
||||
getCommand("event").setTabCompleter(eventCommand); // Přidání TabCompleter
|
||||
|
||||
getCommand("eventer").setExecutor(new EventerCommand());
|
||||
getCommand("cleareventer").setExecutor(new ClearEventerCommand());
|
||||
|
||||
// Registrace PlaceholderAPI expansion
|
||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
new TrixinityPlaceholderExpansion(this).register();
|
||||
getLogger().info("PlaceholderAPI expansion byla úspěšně zaregistrována!");
|
||||
} else {
|
||||
getLogger().warning("PlaceholderAPI není nainstalováno! Placeholders nebudou fungovat.");
|
||||
}
|
||||
|
||||
getLogger().info("TrixinityEventManager byl úspěšně spuštěn!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user