9l_w2

Theres no hex code support for any messages, add teleport messages back to the chat + actionbar, no lores or displaynames in the /homes menu and all other UIS

Kodari AI
KodariJun 28 at 4:15 pm 9

Now let me check the pom.xml for the Adventure API dependency needed for actionbar Components

Now I have the full picture. Let me plan the changes:

  1. ConfigManager — Colorize getPrefix() and getMessage() output so all chat messages render hex codes

  2. TeleportManager — Replace the hardcoded title with chat + actionbar messages on teleport, add actionbar for countdown and cancellation

  3. HomeGUI — Remove all display names and lores from items

  4. ConfirmGUI — Remove all display names and lores from items

  5. HomeManager.openPlayerHomeGUI — Remove all display names and lores from items

Starting with ConfigManager and TeleportManager

Now removing all display names and lores from GUI items in HomeGUI, ConfirmGUI, and HomeManager.

Now cleaning up unused imports in the GUI files.

Let me fix the ConfirmGUI imports — I botched the ItemStack import path.

The file got corrupted. Let me rewrite it cleanly

The file got corrupted from the botched patch. Let me rewrite it cleanly

Clean. Let me verify the final state of all changed files

All changes are complete. Here’s what was done:

1. Hex code support in all messages — ConfigManager.java

  • getPrefix() and getMessage() now run through ColorUtil.colorize() so every &#RRGGBB in config.yml renders correctly

  • Added import org.godxpro.utils.ColorUtil;

2. Teleport messages to chat + actionbar — TeleportManager.java

  • Teleport start: message + actionbar “Teleporting in Xs…”

  • Teleport complete: message + actionbar “Teleported to your home!” (both immediate and delayed paths)

  • Teleport cancelled: message + actionbar “Teleport cancelled - you moved!”

  • Countdown tick: actionbar updating remaining time each second

  • Removed the old sendTitle() call for the no-delay case, replaced with chat+actionbar

3. No display names or lores in GUIs — HomeGUI.java, ConfirmGUI.java, HomeManager.java

  • All home items (beds, dyes) have meta.setDisplayName(null); meta.lore(null);

  • All navigation items have display name and lore removed

  • ConfirmGUI cancel/home-display/confirm items have no names or lores

  • Admin view (HomeManager.openPlayerHomeGUI) also strips all names/lores

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
16 1,885
src/main/java/org/godxpro/xHomes.java
package org.godxpro;

import org.godxpro.commands.DelHomeCommand;
import org.godxpro.commands.HomeCommand;
import org.godxpro.commands.HomesCommand;
import org.godxpro.commands.SetHomeCommand;
import org.godxpro.listeners.GUIListener;
import org.godxpro.managers.ConfigManager;
import org.godxpro.managers.HomeManager;
import org.godxpro.managers.TeleportManager;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.TabCompleter;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;

public class xHomes extends JavaPlugin {

    private static xHomes instance;
    private ConfigManager configManager;
    private HomeManager homeManager;
    private TeleportManager teleportManager;
    private GUIListener guiListener;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();
        this.configManager = new ConfigManager(this);
        this.homeManager = new HomeManager(this);
        this.teleportManager = new TeleportManager(this);
        this.guiListener = new GUIListener(this);
        registerCommands();
        registerListeners();
        getLogger().info("xHomes has been enabled!");
    }

    @Override
    public void onDisable() {
        if (homeManager != null) {
            homeManager.saveAllHomes();
        }
        if (teleportManager != null) {
            teleportManager.cancelAllTeleports();
        }
        getLogger().info("xHomes has been disabled!");
    }

    private void registerCommands() {
        HomesCommand homesCommand = new HomesCommand(this);
        getCommand("homes").setExecutor((CommandExecutor) homesCommand);
        getCommand("homes").setTabCompleter((TabCompleter) homesCommand);

        HomeCommand homeCommand = new HomeCommand(this);
        getCommand("home").setExecutor((CommandExecutor) homeCommand);
        getCommand("home").setTabCompleter((TabCompleter) homeCommand);

        SetHomeCommand setHomeCommand = new SetHomeCommand(this);
        getCommand("sethome").setExecutor((CommandExecutor) setHomeCommand);
        getCommand("sethome").setTabCompleter((TabCompleter) setHomeCommand);

        DelHomeCommand delHomeCommand = new DelHomeCommand(this);
        getCommand("delhome").setExecutor((CommandExecutor) delHomeCommand);
        getCommand("delhome").setTabCompleter((TabCompleter) delHomeCommand);
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents((Listener) guiListener, this);
    }

    public void reload() {
        reloadConfig();
        configManager.reload();
        homeManager.saveAllHomes();
        homeManager.loadAllHomes();
    }

    public static xHomes getInstance() {
        return instance;
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }

    public HomeManager getHomeManager() {
        return homeManager;
    }

    public TeleportManager getTeleportManager() {
        return teleportManager;
    }

    public GUIListener getGUIListener() {
        return guiListener;
    }
}