ace

Make a plugin called SuperSecretFeatures (it should display that name in the plugins list when "/plugins" is typed in chat). use command alias "/uze". When the command is sent, opens a GUI that lets you configure its modules. The plugin serves these options: visual configurable deathban, configurable plot armor, item preservation, plot armor scoreboard and configurable stasis chambers. Now we get into details. Visual configurable deathban: when a player dies, the chat will send a message "<player> has left the game" in yellow text (the text color and content are configurable). Also, after a player dies, it should play an entity.wither.spawn sound effect to every player (the sound effect is configurable and togglable). The player doesn't actually get banned: they can respawn as always. The deathban is visual only. It can be toggled on and off. Next feature is plot armor: this feature makes the player not take damage after he's left on half a heart (1 HP). No fatal damage can kill the player at any point, the player's

Kodari AI
KodariOct 28 at 1:19 pm 1

The generation was stopped before any content could be produced.

ace

Make a plugin called SuperSecretFeatures (it should display that name in the plugins list when "/plugins" is typed in chat). use command alias "/uze". When the command is sent, opens a GUI that lets you configure its modules. The plugin serves these options: visual configurable deathban, configurable plot armor, item preservation, plot armor scoreboard and configurable stasis chambers. Now we get into details. Visual configurable deathban: when a player dies, the chat will send a message "<player> has left the game" in yellow text (the text color and content are configurable). Also, after a player dies, it should play an entity.wither.spawn sound effect to every player (the sound effect is configurable and togglable). The player doesn't actually get banned: they can respawn as always. The deathban is visual only. It can be toggled on and off. This feature can be toggled on and off and configured in its GUI tab.

Next feature is plot armor: this toggleable feature makes the player not take damage after he's left on half a heart (1 HP). No fatal damage can kill the player at any point, the player's health won't bee able to get below half a heart of damage when the feature is on. If the player with plot armor toggled on was holding a totem in his main hand or offhand, the totem can be triggered, but the player still will be unable to die. This feature can be toggled on and off in its GUI tab.

Next feature is item preservation. When the feature is toggled on for the player and the player dies, his items will drop, but upon respawning he won't lose them. This means that his items will drop out of him and fall to the ground, but the player himself won't lose the items. This feature can be toggled on and off in its GUI tab.

Next feature is plot armor scoreboard: when toggled on, it displays a scoreboard for selected players that shows which of the players on the server have plot armor on, and who has it off. The scoreboard updates every time its values are changed, and only displays players that are on the server, clearing out those who are not present on the server. The scoreboard title is "Plot Armor", the value next to the player's name is "on" in green text if the player has plot armor enabled and "off" in red text if the plot armor for this player is disabled. This feature can be toggled on and off in its GUI tab.

The next feature is stasis chambers: this feature gives a player's ender pearl to an admin that executed the command in the GUI. When the admin selects a block and throws and ender pearl towards this block, the ender pearl disappears (it doesn't teleport anyone), the location is saved and the admin gets a fishing rod named with the chosen player's name, the location he will be teleported to and the fishing rod will have 1 durability point left. When the admin activates the fishing rod, the fishing rod breaks and the player that was selected in the GUI is teleported to the location that was previously chosen by the admin.

Now we get into details of the GUI: when the command "/uze" is typed in chat, it opens up a menu with 8 available tabs: First tab is called "Players" and has an icon of a player head (just a regular Steve head). When this tab is opened, it shows heads of every player that has ever been on the server (with nicknames shown when the heads are hovered over. Every head contains the skin of the player) (including the admin), no matter if they are on the server or not. When the player's head is clicked, it opens up a new menu with 6 buttons and stained glass panes below the buttons that show if the feature is on or off (the glass panes can either be green or red). The first button has a skull icon and corresponds to the Deathban feature. It's off by default. When it's clicked, it's toggled on. When it's clicked again, it's toggled off. The second button has an icon of the totem of undying and corresponds to the Plot armor Feature. It's off by default. Clicking the button toggles the feature on and off for the player. The third button has a diamond chestplate icon and corresponds to the Item Preservation feature. It's off by default. Clicking the button toggles it on and off. The fourth button has an item frame icon and corresponds to the Plot Armor Scoreboard feature. It's off by default. Clicking the button toggles visibility of the Plot Armor Scoreboard to the selected player. The fifth button has an ender pearl icon and corresponds to the Stasis chamber option. The glass pane below the button is red if the location for the stasis isn't set. The glass panel is green if the location is set. Clicking the button opens a menu with two options: one has an ender pearl icon and gives the admin an ender pearl that sets the location, and the other button has a fishing rod icon and gives the fishing rod with one durability that teleports the chosen player to the specified location. That's it for the Stasis Chamber feature. The sixth button in the "Players" tab has a command block icon and corresponds to the GUI access feature. It's off by default for every player. Clicking the button toggles the player's ability to access the plugin's GUI by typing "/uze". Now we're finished with the "Players" tab. The second tab has a skull icon and is named "Deathban". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head toggles the Deathban feature for the selected player. The third tab has an icon of the totem of undying and is named "Plot Armor". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head toggles the Plot Armor feature for the selected player The fourth tab has a diamond chestplate icon and is named "Item Preservation". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head toggles the Item Preservation feature for the selected player. The fifth tab has an icon of an item frame and is called "Plot Armor Scoreboard". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head toggles the visibility of the Plot Armor Scoreboard to the selected player. The sixth tab has an icon of the ender pearl and is named "Stasis Chamber". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head opens a menu with two options: one has an ender pearl icon and gives the admin an ender pearl that sets the location, and the other button has an icon of the fishing rod and gives the fishing rod with one durability point that teleports the chosen player to the specified location. The seventh tab has an icon of a command block and is named "GUI Access". Opening the tab shows every player's head with their set skin. Hovering over the head shows their nicknames. Clicking the head toggles the access of the selected player to the plugin's GUI. The seventh tab has a paper icon and is named "Reload". Clicking it reloads the plugin, updating the config.yml.

Kodari AI
KodariOct 28 at 2:39 pm 2
SuperSecretFeatures
A Minecraft plugin providing a configurable GUI-based system with six toggleable modules: visual deathban (fake leave message and wither sound on death), plot armor (prevents fatal damage below half a heart), item preservation (items drop but are retained on respawn), plot armor scoreboard (shows on/off status for online players), stasis chambers (admin sets a location with an ender pearl and teleports selected players via a one-durability fishing rod), and GUI access control. The /uze command opens a main menu with tabs for Players, individual feature toggles, and a Reload option. Player heads display skins and nicknames, with green/red glass panes indicating feature states.
  1. Add plugin metadata and defaults for the configurable death message and sound.

  2. Implement persistent per-player settings, GUI tabs, and access checks.

  3. Add death handling, plot-armor scoreboards, and stasis pearl/rod behavior.

Implemented SuperSecretFeatures, displayed under that name in /plugins, with /uze as an alias. Operators can open the GUI immediately; other players need GUI Access enabled for them.

The GUI includes the eight requested tabs, player-specific toggles, paginated player heads, and controls to edit the visual death message and sound. Settings persist in config.yml. Deathban is visual only; plot armor protects players from fatal damage while allowing a held totem to trigger; item preservation restores inventory after the items drop; and the scoreboard lists online players for selected viewers. Stasis pearls save a destination and provide a nearly-broken rod to teleport the selected player there.

The default death message is &e{player} has left the game, and the default sound is ENTITY_WITHER_SPAWN.

ace

Every time a feature is toggled for a player, all other admins see in chat which admin changed what feature and for which player. This announcement feature can be toggled off, but other admins can see when the announcement is toggled and by who.

Kodari AI
KodariOct 28 at 3:34 pm 1
  • Add a persisted, default-on admin announcement setting and a GUI toggle.

  • Announce player feature changes to other online operators; always announce changes to the announcement setting itself.

Added a default-on Feature announcements toggle to the main GUI. When enabled, other online operators see who changed which feature and for which player. Changing the announcement setting is announced to other operators even when turning announcements off; only operators can change it.

ace

there's an issue that when the player is at half a heart, he can't be attacked at all. He should be able to be attacked and knocked back with a sound and a damage tilt on his side, but without actually losing health past half a heart. When the player dies with item preservation on, the items should drop out of him, but shouldn't be removed from his inventory. Right now the plugin just does the keep inventory gamemode behavior, which shouldn't happen. The items will be duped since they fell out of the player but are still in his inventory, it's alright, and it's not a problem. Also please fix the issue where Feature announcements don't show messages in chat for admins that tell what feature was toggled to which player and by who.

Kodari AI
KodariOct 28 at 4:17 pm 2
  1. Fix plot armor so attacks still produce knockback, sound, and damage feedback while health stays at half a heart.

  2. Make item preservation drop items without using keep-inventory behavior or clearing inventory.

  3. Fix feature-change announcements to other admins.

  • Plot armor: Damage that would reduce health below 1 HP is blocked at half a heart, while the player still gets a hurt sound, damage tilt, and knockback from attacks.

  • Item preservation: Items are explicitly dropped when the world’s keepInventory rule would otherwise prevent drops, and restored to the player on respawn.

  • Announcements: Feature changes are sent to other online operators and players with GUI Access when announcements are enabled. The announcement toggle itself is still announced when changed.

ace

play an item breaking sound to nearby players when the stasis rod is activated. The player who will be be teleported also hears the item breaking sound. Stasis rod name should be white color and not bold. Also when players with deathban on die, the cause of their death should still display, and after that the leave message appears

Kodari AI
KodariOct 28 at 4:38 pm 1
  1. Add the stasis-rod break sound for nearby players and the teleport target.

  2. Style the stasis rod name white and non-bold.

  3. Preserve the death-cause message for deathbanned players, then show their leave message.

  1. Stasis rod: Plays the item-break sound to players near the activating admin and ensures the teleported player hears it too. The rod name is now white and non-bold.

  2. Deathban: Keeps the normal death-cause message and sends the configured leave message on the following tick, so it appears afterward.

  3. Feature announcements: Sends toggle announcements to online operators and GUI-access players, including the admin who made the change.

Kodari can make mistakes. Review important code before using.
Files
src
Code
3 1,081
src/main/java/com/kodari/supersecretfeatures/SuperSecretFeaturesPlugin.java
package com.kodari.supersecretfeatures;

import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XSound;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.EntityEffect;
import org.bukkit.GameRule;
import org.bukkit.OfflinePlayer;
import org.bukkit.World;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerFishEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.Damageable;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.projectiles.ProjectileSource;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.ScoreboardManager;
import org.bukkit.scoreboard.Team;
import org.bukkit.util.Vector;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public final class SuperSecretFeaturesPlugin extends JavaPlugin implements Listener {
    private final Map<UUID, PlayerSettings> playerSettings = new HashMap<>();
    private final Map<Inventory, MenuContext> openMenus = new HashMap<>();
    private final Map<UUID, ItemSnapshot> preservedInventories = new HashMap<>();
    private final Map<UUID, Scoreboard> originalScoreboards = new HashMap<>();
    private final Map<UUID, Scoreboard> activeScoreboards = new HashMap<>();
    private final Map<UUID, Long> blockedPearlTeleports = new HashMap<>();
    private final Map<UUID, PromptType> pendingPrompts = new ConcurrentHashMap<>();

    private NamespacedKey stasisTargetKey;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        stasisTargetKey = new NamespacedKey(this, "stasis-target");
        loadPlayerSettings();
        Bukkit.getPluginManager().registerEvents(this, this);
        if (getCommand("supersecretfeatures") != null) {
            getCommand("supersecretfeatures").setExecutor((sender, command, label, args) -> {
                if (!(sender instanceof Player)) {
                    sender.sendMessage("This command can only be used in-game.");
                    return true;
                }
                Player player = (Player) sender;
                if (!player.isOp() && !settings(player.getUniqueId()).isGuiAccess()) {
                    player.sendMessage(color("&cYou do not have access to this menu."));
                    return true;
                }
                openHome(player);
                return true;
            });
        }
    }

    @Override
    public void onDisable() {
        for (Player player : Bukkit.getOnlinePlayers()) {
            restoreScoreboard(player);
        }
        saveConfig();
    }

    private void loadPlayerSettings() {
        playerSettings.clear();
        if (getConfig().getConfigurationSection("players") == null) {
            return;
        }
        for (String key : getConfig().getConfigurationSection("players").getKeys(false)) {
            UUID uuid;
            try {
                uuid = UUID.fromString(key);
            } catch (IllegalArgumentException ignored) {
                continue;
            }
            String path = "players." + key;
            PlayerSettings settings = new PlayerSettings();
            settings.setLastKnownName(getConfig().getString(path + ".name", key));
            settings.setDeathban(getConfig().getBoolean(path + ".deathban", false));
            settings.setPlotArmor(getConfig().getBoolean(path + ".plot-armor", false));
            settings.setItemPreservation(getConfig().getBoolean(path + ".item-preservation", false));
            settings.setScoreboard(getConfig().getBoolean(path + ".scoreboard", false));
            settings.setGuiAccess(getConfig().getBoolean(path + ".gui-access", false));

            String worldName = getConfig().getString(path + ".stasis.world");
            World world = worldName == null ? null : Bukkit.getWorld(worldName);
            if (world != null) {
                settings.setStasisLocation(new Location(
                        world,
                        getConfig().getDouble(path + ".stasis.x"),
                        getConfig().getDouble(path + ".stasis.y"),
                        getConfig().getDouble(path + ".stasis.z"),
                        (float) getConfig().getDouble(path + ".stasis.yaw"),
                        (float) getConfig().getDouble(path + ".stasis.pitch")
                ));
            }
            playerSettings.put(uuid, settings);
        }
    }

    private PlayerSettings settings(UUID uuid) {
        PlayerSettings settings = playerSettings.get(uuid);
        if (settings == null) {
            settings = new PlayerSettings();
            OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid);
            settings.setLastKnownName(offlinePlayer.getName() == null ? uuid.toString() : offlinePlayer.getName());
            playerSettings.put(uuid, settings);
        }
        return settings;
    }

    private void saveSettings(UUID uuid) {
        PlayerSettings settings = settings(uuid);
        String path = "players." + uuid;
        getConfig().set(path + ".name", settings.getLastKnownName());
        getConfig().set(path + ".deathban", settings.isDeathban());
        getConfig().set(path + ".plot-armor", settings.isPlotArmor());
        getConfig().set(path + ".item-preservation", settings.isItemPreservation());
        getConfig().set(path + ".scoreboard", settings.isScoreboard());
        getConfig().set(path + ".gui-access", settings.isGuiAccess());
        Location location = settings.getStasisLocation();
        if (location == null || location.getWorld() == null) {
            getConfig().set(path + ".stasis", null);
        } else {
            getConfig().set(path + ".stasis.world", location.getWorld().getName());
            getConfig().set(path + ".stasis.x", location.getX());
            getConfig().set(path + ".stasis.y", location.getY());
            getConfig().set(path + ".stasis.z", location.getZ());
            getConfig().set(path + ".stasis.yaw", location.getYaw());
            getConfig().set(path + ".stasis.pitch", location.getPitch());
        }
        saveConfig();
    }

    private void rememberName(UUID uuid, String name) {
        if (name == null || name.isEmpty()) {
            return;
        }
        PlayerSettings settings = settings(uuid);
        if (!name.equals(settings.getLastKnownName())) {
            settings.setLastKnownName(name);
            saveSettings(uuid);
        }
    }

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onPlayerDeath(PlayerDeathEvent event) {
        Player player = event.getEntity();
        PlayerSettings settings = settings(player.getUniqueId());
        rememberName(player.getUniqueId(), player.getName());

        if (settings.isDeathban()) {
            String message = getConfig().getString("deathban.message", "&e{player} has left the game");
            message = message.replace("{player}", player.getName()).replace("%player%", player.getName());
            String formattedMessage = color(message);