Uzii on fire

--- 📎 Attached 1 file(s):

File: pasted-code-1788164112486.txt

txt
Create a custom Minecraft weapon called **King Mace**, based on the provided reference image.

Keep the same Minecraft-style tooltip/lore design, colors, layout, and overall aesthetic.

### ITEM NAME
King Mace

### ENCHANTMENTS
- Wind Burst III
- Density X
- Unbreaking III
- Mending

### KEYBINDS / ABILITIES

**Press C To Enlarge**
- Makes the player extremely large.
- The size change should be clearly visible.
- Pressing C again should not stack the size effect.

**Press ] To Shrink**
- Makes the player extremely small.
- The size change should be clearly visible.
- Pressing ] again should not stack the size effect.

**Press ' To Reset**
- Immediately returns the player's size to normal.
- Also removes any active Enlarge or Shrink effect.

**Press ; To Fly**
- Enables flight for the player while the King Mace is being used.
- The player can fly freely like Creative-mode flight.
- Make this toggleable with the ; key.

### PLAYER TELEPORT MENU

Add a separate ability to **teleport to any online player**.

When the teleport ability is activated, open a **player selection GUI/menu** showing all currently online players.

Example:

**KING MACE — TELEPORT**
- Player 1
- Player 2
- Player 3
- Player 4
- Player 5
- etc.

The player can simply **click the name/head of the player they want to teleport to**.

After clicking a player:
- Teleport the King Mace holder directly to that selected player.
- Close the menu automatically.
- Add a teleport particle and sound effect.
- The menu should update dynamically based on currently online players.
- Do not show the player themselves as a teleport target.
- Make the GUI clean and Minecraft-style.
- If the target player leaves before selection, prevent the teleport and safely close/update the menu.

### IMPORTANT
Do NOT add any other abilities.

Only include:
- Enlarge
- Shrink
- Reset
- Fly
- Player Teleport Menu

Keep the normal Mace functionality and enchantments working normally.

All keybinds should be separate and configurable.
1 image attached
Kodari AI
KodariAug 31 at 8:23 am 2
KingMacePlugin
Creates a custom Minecraft weapon called King Mace with a GUI-based teleport menu. The plugin implements five keybind abilities: enlarge (C key), shrink (] key), reset (' key), toggleable flight (; key), and a player teleport menu that dynamically lists online players. The teleport menu uses a clean Minecraft-style inventory GUI where players click another player's head to teleport, with particle and sound effects. All keybinds are configurable, and the plugin maintains standard mace enchantments and functionality.
  • Create the Gradle project and plugin metadata.

  • Implement the King Mace item, configurable ability actions, size/flight state handling, and cleanup.

  • Implement the dynamic player teleport GUI with online-player validation and effects.

  • Register commands, listeners, permissions, and configuration.

Implemented the King Mace plugin from scratch with:

  • King Mace item using configurable material, name, lore, and enchantments:

    • Wind Burst III

    • Density X

    • Unbreaking III

    • Mending

  • Enlarge, shrink, reset, flight toggle, and teleport abilities

  • Size changes that replace rather than stack

  • Flight cleanup when switching items, quitting, or disabling the plugin

  • Dynamic player teleport GUI with:

    • Player heads

    • Pagination

    • Self-exclusion

    • Online-player validation

    • Teleport sound and portal particles

  • Configurable messages, GUI text, sizes, and keybind labels

  • /kingmace and /km command support

  • Permissions:

    • kingmace.use

    • kingmace.give

Files created:

  • build.gradle

  • settings.gradle

  • src/main/resources/plugin.yml

  • src/main/resources/config.yml

  • KingMacePlugin.java

  • KingMaceManager.java

  • KingMaceListener.java

  • TeleportMenu.java

Vanilla Bukkit servers cannot directly detect arbitrary keyboard keys such as C, ], ', or ;. The configured keybinds are supported as command arguments, for example:

Plain Text
/km c
/km ]
/km '
/km ;
/km teleport

A client-side keybind mod or macro can map the physical keys to those commands.

Uzii on fire

add keybindand work properly change keybind on others

Kodari AI
KodariAug 31 at 8:34 am 1
  1. Add a real configurable keybind mechanism instead of relying only on command arguments.

  2. Make keybind changes apply cleanly to all players and preserve the existing five abilities.

Added working configurable keybind management, including changing keybinds for other players.

Commands

Players/admins can change their own keybinds:

Plain Text
/km keybind enlarge C
/km keybind shrink ]
/km keybind reset '
/km keybind fly ;
/km keybind teleport T

Admins can change another player’s keybinds:

Plain Text
/km keybind Steve enlarge X
/km keybind Steve shrink Z

Change a keybind for every online player:

Plain Text
/km keybind all fly F

Change the server default keybind:

Plain Text
/km keybind default teleport T

Reload the configuration:

Plain Text
/km reload

Added behavior

  • Keybinds are stored per player.

  • Changing one player’s keybind does not affect others.

  • King Mace lore updates automatically after changing keybinds.

  • Duplicate keybinds are rejected for the same player.

  • Online-player tab completion was added.

  • Invalid keybinds and reserved command names are rejected.

  • New permission:

Plain Text
kingmace.keybind

Physical keyboard keys still cannot be detected directly by a Bukkit/Spigot server. A client keybind mod or macro must send the configured command, such as /km x, when the player presses the chosen key.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 942
src/main/java/com/kodari/kingmace/KingMacePlugin.java
package com.kodari.kingmace;

import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class KingMacePlugin extends JavaPlugin {
    private KingMaceManager kingMaceManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.kingMaceManager = new KingMaceManager(this);
        Bukkit.getPluginManager().registerEvents(new KingMaceListener(kingMaceManager), this);

        PluginCommand command = getCommand("kingmace");
        if (command != null) {
            command.setExecutor(kingMaceManager);
            command.setTabCompleter(kingMaceManager);
        }

        kingMaceManager.start();
    }

    @Override
    public void onDisable() {
        if (kingMaceManager != null) {
            kingMaceManager.shutdown();
        }
    }
}