rezn1kishere.com
📎 1 file 2,522 chars
📄
pasted-code-1791736980295.txt
txt 47 lines
▶
Create a complete, compiled Minecraft Paper plugin named **ZyrovexWitherCore** for **ZYROVEX SMP**, running Paper 1.21.11 with Java 21.

IMPORTANT: Give me a directly downloadable, ready-to-upload `.jar` file, not just source code.

### 🔥 1. Nether-only Wither summoning
- The Wither can only be summoned in the Nether.
- Prevent summoning in the Overworld and End, including attempts using dispensers.
- Show this message when summoning is blocked: `§cThe Wither can only be summoned in the Nether!`
- Do not interfere with other mobs or plugins.

### 💀 2. Unique Wither Core
- When the first Wither is killed anywhere on the server, it must drop exactly ONE unique trophy called `Wither Core`.
- Use a Wither Skeleton Skull as the actual item.
- Display name: `§5§lWither Core`
- Lore:
  - `§7The essence of the Wither`
  - `§8A one-of-a-kind Nether trophy`
  - `§5ZYROVEX SMP`
- Add a persistent data tag to identify the genuine trophy.
- Only the first eligible Wither death can award the trophy across the entire server.
- Once claimed, later Wither kills must not drop another Wither Core.
- Preserve normal Wither drops and experience.
- Save the claimed status persistently across restarts and crashes.
- Prevent duplicate drops from simultaneous Wither deaths.

### ⚙️ 3. Commands
Implement these commands:

- `/wither core status` — show whether the unique Wither Core has been claimed.
- `/wither core reset` — reset the claim status so the next Wither killed in the Nether can drop another Wither Core.
- `/wither core give ` — manually give the genuine trophy to a player.

All commands must work correctly, and administrative commands must require operator status or the permission `zyrovexwithercore.admin`.

**Reset behavior:** Resetting the claim status must NOT delete existing Wither Cores from inventories, chests, or the world. It only allows the next eligible Wither kill to award another trophy.

### 🛠️ 4. Technical requirements
- Compatible with Paper 1.21.11 and Java 21.
- Correct `plugin.yml` commands and permissions.
- Separate configuration file under `plugins/ZyrovexWitherCore/`.
- Do not conflict with my existing `ZyrovexWardenHeart` plugin.
- Provide clear startup logs and error handling.
- Compile and verify the JAR before providing it.
- Provide both the JAR and source ZIP.
- Tell me honestly which features have or have not been tested.

The finished plugin must be ready to upload directly to my server's `plugins` folder.
Kodari AI
KodariOct 11 at 4:48 pm 2
ZyrovexWitherCore
Nether-only Wither summoning enforcement with a unique one-time Wither Core trophy drop system. Prevents Wither spawning outside the Nether, tracks the first eligible Wither kill server-wide, and awards a persistent, data-tagged Wither Skeleton Skull trophy. Includes admin commands for status checking, claim resetting, and manual trophy granting, with configurable settings stored under plugins/ZyrovexWitherCore/.
  1. Create the Paper plugin entry point, Nether summon guard, trophy item, and persistent claim storage.

  2. Add /wither core admin commands plus plugin.yml and default configuration.

Implemented ZyrovexWitherCore with the Nether summon restriction, tagged Wither Core, persistent claim state, reset behavior, and /wither core admin commands.

I can’t provide a compiled JAR or source ZIP from this response, and I haven’t tested the plugin on a Paper server. To build and download the JAR in Kodari: click Compile in the top bar, click Compile in the window, then click Download after it succeeds. The source files are in the project workspace; no ZIP artifact was created.

rezn1kishere.com

Create ZyrovexTeams — Complete Minecraft Paper Plugin

Create a complete, fully functional Minecraft plugin named ZyrovexTeams for my SMP, ZYROVEX SMP.

Server version: Paper 1

Kodari AI
KodariOct 11 at 4:54 pm 1

Your request cuts off at “Server version: Paper 1…”. Please send the rest of the specification, including the full Paper version and the team features/commands you want.

rezn1kishere.com
📎 1 file 10,543 chars
📄
pasted-code-1791737715499.txt
txt 285 lines
▶
# Create ZyrovexTeams — Complete Minecraft Paper Plugin

Create a complete, fully functional Minecraft plugin named **ZyrovexTeams** for my SMP, **ZYROVEX SMP**.

**Server version:** Paper 1.21.11  
**Java version:** Java 21

**IMPORTANT:** Compile the plugin and provide a directly downloadable, ready-to-upload `.jar` file. Do not provide source code only. Also provide the source ZIP as a backup.

---

## 1. FIRST JOIN — CHOOSE YOUR TEAM

When a player joins the server for the first time, automatically open a beautiful Minecraft inventory GUI titled:

`§5§lCHOOSE YOUR DESTINY`

Give the player three team choices:

### 🌎 OVERWORLD TEAM
- Icon: Grass Block
- Color: Green
- Description: Build your empire in the Overworld.
- Team identifier: `OVERWORLD`

### 🔥 NETHER TEAM
- Icon: Netherrack
- Color: Red
- Description: Survive the dangerous Nether.
- Team identifier: `NETHER`

### 🌌 END TEAM
- Icon: End Stone
- Color: Dark Purple
- Description: Conquer the mysterious End.
- Team identifier: `END`

Each option must have a custom display name and colored lore.

The player must choose exactly one team before playing normally.

If the player closes the menu without choosing, reopen it. Prevent moving, taking, or placing items in the GUI. Secure it against shift-clicks, number keys, dragging, and other inventory exploits.

---

## 2. PERMANENT TEAM MEMBERSHIP

After a player chooses a team:

- Save their team permanently using their UUID.
- Immediately teleport them to their team's safe spawn.
- Overworld members spawn in the Overworld.
- Nether members spawn in the Nether.
- End members spawn in the End.
- Generate or configure safe spawn locations automatically if necessary.
- Never spawn players in lava, the void, suffocation blocks, or other dangerous locations.
- Save all team assignments across restarts and crashes.
- Do not reopen the first-join GUI for players who already have a team.
- On future joins, send players to their team's saved spawn.

Players cannot change teams freely after their initial selection. They must use the betrayal system or an authorized admin command.

---

## 3. BETRAYAL SYSTEM — THREE BETRAYALS PER PLAYER

Every player starts with exactly **3 betrayals**.

Create a `/team` GUI that displays:

- Current team.
- Current team leader.
- Number of remaining betrayals.
- A clearly visible `BETRAY` button.

### Betrayal process

1. The player clicks `BETRAY`.
2. Open a confirmation GUI with `CONFIRM` and `CANCEL`.
3. Show their current team and remaining betrayals.
4. After confirmation, open a new GUI showing the other two teams.
5. Do not show their current team as a selectable option.
6. When they select a different team, permanently save their new team.
7. Subtract exactly one betrayal.
8. Immediately teleport them to the new team's safe spawn.
9. Update their team information and leader status.
10. Send a message announcing their betrayal.

Example message:

`§cYou betrayed your team! §7You now belong to the §5END TEAM§7. Betrayals remaining: §e2/3`

After the third betrayal, disable the button and show:

`§cNO BETRAYALS LEFT`

Players cannot bypass the limit by dying, disconnecting, changing worlds, changing usernames, or restarting the server.

Save betrayal counts persistently using UUIDs.

Cancel duplicate clicks and prevent multiple betrayal counts from a single action.

---

## 4. TEAM LEADERS SYSTEM

Create a leader system with exactly one possible leader for each team.

There can be:
- One Overworld Leader.
- One Nether Leader.
- One End Leader.

A team may temporarily have no leader until an administrator appoints one.

### Admin commands

Implement:

- `/team leader  ` — appoint a player as the selected team's leader.
- `/team leader remove ` — remove the current leader of a team.
- `/team leader info ` — show the current leader of a team.

Valid team identifiers:

`overworld`, `nether`, `end`

Only server operators or players with the permission `zyrovexteams.admin` may use these commands.

### Leader assignment rules

- The player must belong to the team they are appointed to lead.
- If they belong to another team, refuse the assignment and explain that their team must be changed first.
- Never silently change a player's team just to make them a leader.
- Each team can have at most one leader.
- Appointing a new leader replaces the previous leader.
- Removing a leader does not change that player's team membership.
- If a leader betrays their team, automatically remove their leadership from the old team.
- Do not automatically appoint a replacement after a leader betrays.
- If a leader disconnects, preserve their leadership assignment.
- Persist leader assignments across restarts and crashes.

### Leader prefixes

Display the following prefixes in the team GUI and wherever supported by the plugin's own chat formatting:

- Overworld Leader: `§a[OVERWORLD LEADER]`
- Nether Leader: `§c[NETHER LEADER]`
- End Leader: `§5[END LEADER]`

Do not claim that chat prefixes will automatically appear in every other plugin's chat format. If integration with an existing chat plugin is required, explain it.

### Leader permissions

Team leaders may:

- View their team's roster.
- See their team's member count.
- Receive notifications when members join or leave their team.
- View their team's current leader information.

Team leaders must not be able to appoint leaders, change other players' teams, reset betrayal counts, or execute admin commands unless they separately have the admin permission.

---

## 5. TEAM INFORMATION AND SPAWN COMMANDS

Implement these commands:

- `/team` — open the team GUI.
- `/team info` — display the player's team, leader, and betrayals remaining.
- `/team spawn` — teleport to the current team's safe spawn.
- `/team setspawn` — set the spawn for the team corresponding to the dimension the administrator is currently standing in.
- `/team set  ` — administratively change a player's team.
- `/team betrayals  ` — administratively set a player's remaining betrayals, from 0 to 3.
- `/team reload` — reload configuration.
- `/team leader  ` — appoint a team leader.
- `/team leader remove ` — remove a team's leader.
- `/team leader info ` — show a team's leader.

### Admin command rules

- Administrative commands require OP status or `zyrovexteams.admin`.
- Administrative team changes do not consume betrayals.
- If a leader is administratively moved to another team, remove their leadership from the old team.
- If a team member is administratively moved to another team, update their saved team immediately.
- If an admin sets betrayals to zero, the player cannot betray unless an admin restores their count.
- Validate all command arguments and provide useful error messages.
- Ensure the command syntax does not conflict between subcommands.

---

## 6. SAFE DIMENSION TELEPORTATION

Teleport players to safe locations in their selected dimension.

### Overworld
- Spawn on a safe solid surface.
- Avoid lava, water traps, suffocation, and dangerous heights.

### Nether
- Spawn on a safe solid platform.
- Never spawn inside lava, fire, suffocating blocks, or dangerous drops.
- Do not place the player inside a Nether fortress or other dangerous structure by default.

### End
- Never spawn over the void.
- Ensure there is a safe solid platform beneath the player.
- Prefer a configurable platform at a safe distance from dangerous areas.
- Do not force players to spawn on the main End island if it would put them in danger.

If a dimension is unavailable or a spawn location is invalid, handle it safely and notify the administrator. Never silently teleport players into danger.

The `/team spawn` command must use the saved spawn for the player's team, not whichever world they are currently visiting.

---

## 7. GUI DESIGN AND SECURITY

Use attractive Minecraft inventory GUIs with:

- Clear team colors.
- Custom names and lore.
- Suitable Minecraft item icons.
- Confirmation screens for irreversible actions.
- Current team and leader information.
- Betrayal count display.
- Disabled or clearly marked unavailable actions.

Prevent:
- Item theft from menus.
- Item duplication.
- Shift-click exploits.
- Number-key swaps.
- Dragging items into menus.
- Double-click and rapid-click exploits.
- Betrayal confirmation being processed more than once.
- Players bypassing selection by closing menus.
- Ordinary players using administrative actions.

Cancel only the interactions needed to secure the plugin's own menus, and do not interfere with unrelated inventories.

---

## 8. DATA STORAGE AND RELIABILITY

- Use UUIDs to identify players.
- Persist team assignments, betrayal counts, leader assignments, and team spawn locations.
- Data must survive server restarts and crashes.
- Do not reset players' data when the plugin reloads.
- Handle missing or corrupt configuration safely.
- Provide helpful console logs.
- Avoid data loss when several players change teams simultaneously.
- Do not require paid dependencies.
- Do not require PlaceholderAPI or other plugins unless absolutely necessary.
- Keep all data and configuration under `plugins/ZyrovexTeams/`.

---

## 9. COMPATIBILITY

- Plugin name: `ZyrovexTeams`.
- Paper 1.21.11.
- Java 21.
- Correct `plugin.yml`.
- Register every command and permission correctly.
- Ensure the JAR contains the compiled classes and required resources.
- Do not interfere with my existing `ZyrovexWardenHeart` and `ZyrovexWitherCore` plugins.
- Use APIs compatible with Paper 1.21.11.

---

## 10. FINAL DELIVERABLES

Provide:

1. A compiled, ready-to-upload `ZyrovexTeams.jar`.
2. A source ZIP as a backup.
3. Clear installation instructions.
4. The commands and permissions list.
5. Confirmation of which features were tested and which were not.

Test first-join selection, safe teleportation to all three dimensions, permanent team assignments, betrayal limits, leader assignment and removal, leadership changes during betrayal, GUI security, admin permissions, and persistence across restarts wherever possible.

**Do not provide source code only. I need the actual compiled plugin JAR that I can upload directly to my Paper 1.21.11 server.**
Kodari AI
KodariOct 11 at 5:09 pm 3
  1. Inspect the current project structure and build setup.

  2. Implement persistent team, leader, betrayal, and safe-spawn systems.

  3. Add secure team GUIs, commands, configuration, and lifecycle handling.

  4. Leave the project ready for Kodari’s Compile flow; report what has and hasn’t been tested.

Implemented ZyrovexTeams in the workspace: persistent UUID-based teams, three betrayals per player, leader management, secure team GUIs, admin commands, and safe dimension spawns. The build is configured to produce ZyrovexTeams.jar and a source archive at build/distributions/ZyrovexTeams-source.zip. It is separate from your installed plugins, but this build has not been compiled or tested on a Paper server, and no JAR or ZIP is attached here.

Build and download the JAR: On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project. Click Compile in the window, then Download after it succeeds.

Commands

  • Players: /team, /team info, /team spawn

  • Admins: /team setspawn, /team set <player> <overworld|nether|end>, /team betrayals <player> <0-3>, /team reload

  • Leaders (admin-only management): /team leader <team> <player>, /team leader remove <team>, /team leader info <team>

Admin commands require OP or zyrovexteams.admin (default: OP). Leader prefixes are shown in this plugin’s team information and messages; they won’t automatically appear in other plugins’ chat formats.

The implementation includes configurable world names and an End platform location. I have not tested compilation, first-join selection, teleports, betrayals, permissions, leader changes, GUI security, or persistence across restarts on a live server.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
12 1,738
src/main/java/com/zyrovex/teams/ZyrovexTeamsPlugin.java
package com.zyrovex.teams;

import com.zyrovex.teams.command.TeamCommand;
import com.zyrovex.teams.data.TeamDataStore;
import com.zyrovex.teams.gui.TeamMenuService;
import com.zyrovex.teams.listener.TeamListener;
import com.zyrovex.teams.spawn.TeamSpawnService;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.nio.file.Path;
import java.util.UUID;
import java.util.logging.Level;

public final class ZyrovexTeamsPlugin extends JavaPlugin {
    private TeamDataStore dataStore;
    private TeamSpawnService spawnService;
    private TeamMenuService menuService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        dataStore = new TeamDataStore(Path.of(getDataFolder().getPath(), "data.yml"), getLogger());
        if (!dataStore.load()) {
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        spawnService = new TeamSpawnService(this, dataStore);
        try {
            spawnService.initialize();
        } catch (IllegalStateException exception) {
            getLogger().log(Level.SEVERE, "ZyrovexTeams could not prepare safe team worlds and spawns; disabling the plugin.", exception);
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        menuService = new TeamMenuService(this, dataStore);
        getServer().getPluginManager().registerEvents(new TeamListener(this, dataStore, menuService), this);
        TeamCommand executor = new TeamCommand(this, dataStore, menuService);
        if (getCommand("team") == null) {
            getLogger().severe("The /team command is missing from plugin.yml; disabling ZyrovexTeams.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        getCommand("team").setExecutor(executor);
        getCommand("team").setTabCompleter(executor);
        getLogger().info("ZyrovexTeams enabled. Team rosters: " + Team.values().length + "; persistent data: "
                + Path.of(getDataFolder().getPath(), "data.yml"));
    }

    @Override
    public void onDisable() {
        getLogger().info("ZyrovexTeams disabled.");
    }

    public TeamSpawnService getSpawnService() {
        return spawnService;
    }

    public void notifyTeamLeader(Team team, UUID excludedPlayer, String message) {
        UUID leaderId = dataStore.getLeader(team);
        if (leaderId == null || leaderId.equals(excludedPlayer)) {
            return;
        }
        Player leader = Bukkit.getPlayer(leaderId);
        if (leader != null) {
            leader.sendMessage(team.leaderPrefix() + " §7» " + message);
        }
    }
}