tcoad

/announce opens a INVENTORY GUI.

The player can enter their announcement text using a sign input INVENTORY GUI.

After entering the text, it asks which color style to use:

  1. Red → Blue

Bold Gradient from red to blue

  1. Blue → Red

Bold Gradient from blue to red

  1. White → Purple

Bold Gradient from white to purple After selecting a style, the announcement is broadcast to the server using the chosen gradient.

/dashsword — gives the player a DashSword.

Name: DashSword Name is bold.

Name has a red → purple gradient.

Crouch + right-click activates the dash.

Launches the player 60–90 blocks by default in the direction they're looking.

Supports:

Forward Backward Left Right Up Down /dashsword config — configure launch distance and cooldown.

DashSword has its own independent cooldown from DashMace.

/dashmace — gives the player a DashMace.

Name: DashMace Name is bold.

Name has a white → gray gradient.

Crouch + right-click launches the player.

Launch direction follows exactly where the player is looking:

Forward Backward Left Right Up Down Default launch distance: 60–90 blocks. /dashmace config — configure:

Launch distance Cooldown DashMace has its own independent cooldown from DashSword

Custom axe named CobWeb Axe Name is bold Name has a white → gray gradient.

Crouch + right-click activates its ability.

Removes all cobwebs within a 30-block radius of the player.

Default cooldown: 20 seconds. /cobaxe — gives the player a CobWeb Axe. /cobweb axe config — configure:

Cooldown Radius

The killstreak increases by 1 for every kill.

The killstreak resets/disappears when the player dies. /killstreak — shows the player's current killstreak. /killstreak config — allows admins to enable/disable the killstreak popups.

Killstreak Milestones

Milestones:

3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 100, 150, 200 kills

When a player reaches a milestone:

Only that player sees a large popup.

Example: 3 KILLSTREAK !

The text has a gradient red → blue → purple.

The player receives 5 KillTokens for every milestone reached.

The reward is given once per milestone per killstreak.

If they die and build a new streak, they can earn the milestones again.

/role create <role> — creates a new custom role. /role add <player> <role> — gives a player the specified role. /role remove <player> <role> — removes the role from a player. /role config — opens a INVENTORY GUI to configure roles:

Color of the role/name Boldness on/off Permissions — choose which Minecraft commands that role can use Add/remove commands from the role's permission list Roles should be saved permanently.

Players can have multiple roles.

Role formatting should apply to player names/chat where appropriate.

Make sure /role commands have appropriate admin permissions..

👑 Only players with the Owner/owner role can use /giveaway create. /giveaway create opens a INVENTORY GUI.

The Owner places the item to give away inside the INVENTORY GUI.

The Owner clicks Start.

A large screen popup appears with a white → red → white color animation.

Players enter by using /giveaway.

The giveaway lasts 24 hours.

After 24 hours, one random player who entered wins.

The winner receives the exact item that was placed in the giveaway INVENTORY GUI.

Announce the winner to the server. 🟦 Item: Nether Star 🏷️ Name: KillTokens 🎨 Name color: gradient/shade red → icy blue ⚔️ On kill: Player receives 1 KillToken 🧪 Replacement: If the player has a Strength II potion, the KillToken replaces that potion instead of adding another item. 📦 No Strength II potion: The KillToken is simply added to their inventory. 🔢 Amount can be configured later if needed.

Kodari AI
KodariAug 18 at 7:22 pm 5
MinecraftUtilitySuite
A comprehensive Minecraft plugin suite featuring gradient-styled custom items (DashSword, DashMace, CobWeb Axe) with unique crouch-right-click abilities, a killstreak system with milestone rewards and KillTokens, custom role management with permissions and chat formatting, and a 24-hour giveaway system with animated announcements. All features include configurable settings and persistent data storage.
  1. Set up the Kotlin/Paper plugin build, manifest, plugin metadata, and defaults.

  2. Implement custom items and independent dash/cobweb abilities with configurable cooldowns and distances.

  3. Implement announcements, killstreaks/KillTokens, persistent roles, and role GUI configuration.

  4. Implement owner-gated giveaway creation, GUI item placement, 24-hour expiry, persistence, and winner handling.

Implemented the new Kotlin/Paper plugin project with:

  • /announce sign-based input and three gradient styles.

  • DashSword, DashMace, and CobWeb Axe custom items with independent cooldowns.

  • Configurable dash distance, cooldowns, cobweb radius, and killstreak popups.

  • Killstreak milestones with gradient titles and KillToken rewards.

  • Strength II potion replacement when awarding KillTokens.

  • Persistent multi-role system with chat formatting, colors, boldness, and command permissions.

  • Role configuration inventory GUI with command add/remove support.

  • Owner-role-gated giveaway creation GUI.

  • 24-hour persistent giveaways with random winners, exact item rewards, offline winner delivery, and animated announcements.

  • Gradle Kotlin build, Paper API dependency, plugin.yml, config.yml, and manifest.kod.

tcoad

The compilation failed with this error:

code
[ERROR] Kotlin compilation failed
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:23:13: error: syntax error: Call has no callee.
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:23:19: error: syntax error: Expecting an element.
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:27:13: error: syntax error: Call has no callee.
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:27:19: error: syntax error: Expecting an element.
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:31:13: error: syntax error: Call has no callee.
src/main/kotlin/com/kodari/serverfeatures/DashManager.kt:31:19: error: syntax error: Expecting an element.
src/main/kotlin/com/kodari/serverfeatures/ItemFactory.kt:18:5: error: function declaration must have a name.
src/main/kotlin/com/kodari/serverfeatures/ItemFactory.kt:18:9: error: syntax error: Expecting function name or receiver type.
src/main/kotlin/com/kodari/serverfeatures/KillStreakManager.kt:72:36: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'PotionData?'.
src/main/kotlin/com/kodari/serverfeatures/RoleManager.kt:188:101: error: argument type mismatch: actual type is 'Boolean', but 'String' was expected.

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariAug 18 at 7:23 pm 1
  1. Correct the Kotlin syntax errors in DashManager and ItemFactory.

  2. Fix nullable potion access in KillStreakManager and the role formatting argument mismatch.

  3. Apply the corrected artifact without changing unrelated behavior.

Created the corrected artifact and fixed all reported compilation errors:

  • Renamed the invalid Kotlin is function to hasId and updated all usages.

  • Fixed nullable PotionData access in KillStreakManager.

  • Corrected the GradientUtil.gradient call to use bold = role.bold.

Updated files:

  • DashManager.kt

  • ItemFactory.kt

  • KillStreakManager.kt

  • RoleManager.kt

tcoad

where can i download it

Kodari AI
KodariAug 18 at 7:31 pm 1

There isn’t currently a downloadable .jar attached—the corrected source project files were updated in the workspace.

You can download the files from the file attachments shown in the previous response. To use the plugin, compile the project with Gradle:

Shell
./gradlew build

The compiled JAR will be located at:

Plain Text
build/libs/

If your interface does not show downloadable file attachments, the project needs to be exported or packaged as a ZIP first.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle.kts
manifest.kod
settings.gradle.kts
Code
14 1,062
src/main/kotlin/com/kodari/serverfeatures/RoleManager.kt
package com.kodari.serverfeatures

import org.bukkit.Bukkit
import org.bukkit.ChatColor
import org.bukkit.Material
import org.bukkit.configuration.file.YamlConfiguration
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
import org.bukkit.event.player.AsyncPlayerChatEvent
import org.bukkit.event.player.PlayerJoinEvent
import org.bukkit.event.player.PlayerQuitEvent
import org.bukkit.event.inventory.InventoryClickEvent
import org.bukkit.inventory.ItemStack
import org.bukkit.plugin.java.JavaPlugin
import java.io.File
import java.util.UUID

data class KodariRole(
    val name: String,
    var startColor: String = "#ffffff",
    var endColor: String = "#777777",
    var bold: Boolean = true,
    val commands: MutableSet<String> = mutableSetOf()
)

class RoleManager(private val plugin: JavaPlugin) : Listener {
    private val file = File(plugin.dataFolder, "roles.yml")
    private val data = YamlConfiguration.loadConfiguration(file)
    private val roles = mutableMapOf<String, KodariRole>()
    private val playerRoles = mutableMapOf<UUID, MutableSet<String>>()
    private val attachments = mutableMapOf<UUID, org.bukkit.permissions.PermissionAttachment>()
    private val pendingCommands = mutableMapOf<UUID, String>()
    private val pendingCommandRemovals = mutableSetOf<UUID>()

    init {
        data.getConfigurationSection("roles")?.getKeys(false)?.forEach { key ->
            roles[key.lowercase()] = KodariRole(
                key,
                data.getString("roles.$key.start", "#ffffff")!!,
                data.getString("roles.$key.end", "#777777")!!,
                data.getBoolean("roles.$key.bold", true),
                data.getStringList("roles.$key.commands").map { it.lowercase() }.toMutableSet()
            )
        }
        data.getConfigurationSection("players")?.getKeys(false)?.forEach { raw ->
            val uuid = runCatching { UUID.fromString(raw) }.getOrNull() ?: return@forEach
            playerRoles[uuid] = data.getStringList("players.$raw").map { it.lowercase() }.toMutableSet()
        }
        if (!roles.containsKey("owner")) {
            roles["owner"] = KodariRole("Owner", "#ffd700", "#ff2020")
            save()
        }
    }

    fun create(name: String): Boolean {
        val key = name.lowercase()
        if (!key.matches(Regex("[a-z0-9_-]+")) || roles.containsKey(key)) return false
        roles[key] = KodariRole(name)
        save()
        return true
    }

    fun role(name: String): KodariRole? = roles[name.lowercase()]
    fun roleNames(): List<String> = roles.values.map { it.name }.sorted()

    fun add(player: Player, roleName: String): Boolean {
        val role = role(roleName) ?: return false
        val assigned = playerRoles.getOrPut(player.uniqueId) { mutableSetOf() }
        if (!assigned.add(role.name.lowercase())) return false
        updateAttachment(player)
        save()
        return true
    }

    fun remove(player: Player, roleName: String): Boolean {
        val assigned = playerRoles[player.uniqueId] ?: return false
        if (!assigned.remove(roleName.lowercase())) return false
        updateAttachment(player)
        save()
        return true
    }

    fun hasRole(player: Player, roleName: String): Boolean = playerRoles[player.uniqueId]?.any { it.equals(roleName, true) } == true

    fun configure(player: Player) {
        val inventory = Bukkit.createInventory(null, 54, "Role Configuration")
        roleNames().take(54).forEachIndexed { index, name ->
            inventory.setItem(index, named(Material.NAME_TAG, "§e$name", listOf("§7Click to edit this role.")))
        }
        player.openInventory(inventory)
    }

    private fun edit(player: Player, role: KodariRole) {
        val inventory = Bukkit.createInventory(null, 9, "Role: ${role.name}")
        inventory.setItem(0, named(Material.RED_DYE, GradientUtil.gradient("Red → Blue", "#ff2020", "#2020ff"), emptyList()))
        inventory.setItem(1, named(Material.PURPLE_DYE, GradientUtil.gradient("White → Purple", "#ffffff", "#9b00ff"), emptyList()))
        inventory.setItem(2, named(Material.GOLD_INGOT, "§eBold: ${if (role.bold) "ON" else "OFF"}", emptyList()))
        inventory.setItem(4, named(Material.WRITABLE_BOOK, "§aAdd command", listOf("§7Type a command in chat.")))
        inventory.setItem(5, named(Material.BOOK, "§bCommands", role.commands.map { "§f/$it" }))
        inventory.setItem(8, named(Material.ARROW, "§cBack", emptyList()))
        player.openInventory(inventory)
    }

    @EventHandler
    fun onClick(event: InventoryClickEvent) {
        val player = event.whoClicked as? Player ?: return
        val title = event.view.title
        if (title != "Role Configuration" && !title.startsWith("Role: ")) return
        event.isCancelled = true
        if (title == "Role Configuration") {
            val name = roleNames().getOrNull(event.rawSlot) ?: return
            role(name)?.let { edit(player, it) }
            return
        }
        val role = role(title.removePrefix("Role: ")) ?: return
        when (event.rawSlot) {
            0 -> {
                role.startColor = "#ff2020"
                role.endColor = "#2020ff"
                save()
                edit(player, role)
            }
            1 -> {
                role.startColor = "#ffffff"
                role.endColor = "#9b00ff"
                save()
                edit(player, role)
            }
            2 -> {
                role.bold = !role.bold
                save()
                edit(player, role)
            }
            4 -> {
                pendingCommands[player.uniqueId] = role.name.lowercase()
                pendingCommandRemovals.remove(player.uniqueId)
                player.closeInventory()
                player.sendMessage("§eType the command name to allow, or §f/cancel §eto stop.")
            }
            5 -> {
                pendingCommands[player.uniqueId] = role.name.lowercase()
                pendingCommandRemovals += player.uniqueId
                player.closeInventory()
                player.sendMessage("§eType the command name to remove, or §f/cancel §eto stop.")
            }
            8 -> configure(player)
        }
    }

    @EventHandler
    fun onChat(event: AsyncPlayerChatEvent) {
        val roleName = pendingCommands.remove(event.player.uniqueId) ?: return
        event.isCancelled = true
        val command = event.message.removePrefix("/").trim().lowercase().split(" ").firstOrNull().orEmpty()
        val remove = pendingCommandRemovals.remove(event.player.uniqueId)
        if (command.isEmpty() || command == "cancel") {
            event.player.sendMessage("§cRole command change cancelled.")
            return
        }
        plugin.server.scheduler.runTask(plugin, Runnable {
            val role = role(roleName)
            if (remove) role?.commands?.remove(command) else role?.commands?.add(command)
            save()
            event.player.sendMessage(if (remove) "§aRemoved /$command from role $roleName." else "§aAllowed /$command for role $roleName.")
            updateAttachment(event.player)
        })
    }

    @EventHandler
    fun onJoin(event: PlayerJoinEvent) = updateAttachment(event.player)

    @EventHandler
    fun onQuit(event: PlayerQuitEvent) {
        attachments.remove(event.player.uniqueId)?.remove()
    }

    @EventHandler
    fun onChatFormat(event: AsyncPlayerChatEvent) {
        if (pendingCommands.containsKey(event.player.uniqueId)) return
        event.format = "${formatName(event.player)}§f: %2\$s"
    }

    fun formatName(player: Player): String {
        val assigned = playerRoles[player.uniqueId]?.mapNotNull { roles[it] }.orEmpty()
        val role = assigned.firstOrNull() ?: return player.name
        val roleNames = assigned.joinToString(", ") { it.name }
        return GradientUtil.gradient("[$roleNames] ${player.name}", role.startColor, role.endColor, bold = role.bold)
    }

    private fun updateAttachment(player: Player) {
        attachments.remove(player.uniqueId)?.remove()
        val attachment = player.addAttachment(plugin)
        playerRoles[player.uniqueId].orEmpty().mapNotNull { roles[it] }.flatMap { it.commands }.forEach { command ->
            attachment.setPermission(command, true)
            attachment.setPermission("minecraft.command.$command", true)
        }
        attachments[player.uniqueId] = attachment
    }