sinmunnity
📎 1 file 4,551 chars
📄
pasted-code-1795349641109.txt
txt 122 lines
▶
Create a completely new, standalone Minecraft plugin named `brokenSmp`.

Start from scratch. Do not use, copy or modify previous plugin implementations or project files.

Use these existing resources:
- `vexbot-paper-3.2.5+paper-mc1.21.11`: Inspect and use VexBot for Herobrine's fake players.
- `Broken_SMP_Cleaned.zip`: Use this resource pack for all ability icons, GUI textures and visual assets. Inspect its contents and use the correct existing textures. Do not invent replacement textures.
- `paper-api.jar`: Use as the Paper API dependency.

Create all other systems and mechanics yourself.

Target Paper 1.21.11 and Java 25.

Implement these abilities:

Giant Alex

Passive: Giant Arms
- Increase attack and entity targeting reach by 1.3x.

Ability: Giant Alex Is Here
- Lasts 10 seconds.
- Transform the player into Giant Alex.
- Increase player model size.
- Leave enormous footprints while walking.
- Entities hit by footprints take 5 HP damage, ignoring armor.
- Restore the player's original appearance and size afterward.

Entity 303

Passive: Abuse
- Permanently grants Strength I, Speed I and Fire Resistance I.

Ability: Abusive Telekinesis
- Lasts 10 seconds.
- Pick up the entity under the player's crosshair.
- Make it follow the exact crosshair position smoothly.
- No bouncing or unnecessary vertical movement.
- Looking up and quickly aiming down slams the entity into the ground.
- Each successful slam deals 2 HP damage, ignoring armor.
- Allow repeated slams.
- Cancel if the player takes damage from another player or entity.
- When cancelled, scramble the player's inventory without deleting items.

0000

Passive: Always Watching
- See nearby players through walls within a limited range.
- Occasionally send watched players the message "0000 is watching you."
- Occasionally become invisible when nobody is looking at the player.

Ability: World Manipulation
- Lasts 10 seconds.
- Create corrupted block illusions.
- Make blocks temporarily disappear visually.
- Create floating blocks and strange structures.
- Play distorted environmental sounds.
- All changes must be visual only.
- Never permanently modify the world.

Herobrine

Passive: See Ya
- Shift + Right Click to teleport to the location under the crosshair.
- Use white dust particles.
- Entities intersecting the destination are teleported 10 blocks upward.
- Works underground.

Ability: I Am Here
- Target a player using the crosshair.
- Spawn multiple Herobrine fake players in a circle around the target using VexBot.
- Immobilize the target for 5 seconds.
- Make the Herobrines stare at the target and shake.
- After 5 seconds, make them attack simultaneously.
- Each hit deals 1 HP damage, ignoring armor.
- Each Herobrine has 15 hearts.
- Make them chase the target quickly.
- Each has a 30% chance to summon lightning at the target.

Null

Passive: Void Presence
- Leave black particles while walking.
- Nearby players occasionally hear distorted ambient sounds.
- Permanently grants Night Vision.
- Silent footsteps.

Ability: Deleted
- Lasts 10 seconds.
- Make the player completely invisible to everyone else.
- Do not use the Invisibility potion effect.
- Hide the player model, armor and held items.
- Remove visible movement particles and footsteps.
- Allow normal movement and interaction.
- Restore visibility afterward.

Resource pack requirements:
- Use `Broken_SMP_Cleaned.zip` for all ability GUI icons and textures.
- Display the ability icon centered above the hotbar.
- Show the normal icon when the ability is ready.
- Show the existing `usedability` texture during cooldown.
- Switch back when the cooldown ends.
- Use the correct texture for each ability.
- Do not replace existing textures with invented or vanilla textures.
- Use the resource pack's existing visual assets for ability effects wherever appropriate.

General requirements:
- Give abilities suitable sounds, particles and visual effects.
- Handle cooldowns and ability activation.
- Make abilities work in multiplayer.
- Restore player states when abilities end or players disconnect.
- Remove temporary entities and effects properly.
- Prevent temporary effects from remaining.
- Keep the implementation clean and functional.

Do not add unrelated features.
Do not create unnecessary designs or complicated interfaces.
Do not use previous plugin implementations.

Do not open, start or create a test server. Do not run the plugin in a server environment. I will handle all testing myself.

Keep everything straightforward and focus only on the specified mechanics.
Kodari AI
KodariToday at 12:16 pm 3
  • Build the ability selection, activation, cooldown, and cleanup systems from scratch.

  • Implement the mechanics supported by the supplied files; keep world corruption client-side.

  • The VexBot and Paper JARs aren’t present in the workspace, so I can’t inspect or integrate VexBot’s fake-player API yet.

Created a partial brokenSmp plugin with character selection (/broken <character>), ability activation (/broken use), cooldowns, and cleanup.

It is not yet the complete requested implementation: VexBot’s JAR and the supplied Paper API JAR were not present, so Herobrine’s fake players are unavailable. Giant Alex’s appearance, 0000’s passive, the resource-pack ability display, and fully silent footsteps also remain unfinished. The existing resource-pack textures were left unchanged.

No test server was started.

sinmunnity

check again i added vexbot as an dependencie

finish the resourcepack first and make it work so the ability icons are present

Kodari AI
KodariToday at 12:27 pm 2
  • Map the existing ability textures to action-bar glyphs.

  • Package the resource pack and export it for players to install.

  • Switch the icon between ready and cooldown states.

Added centered ability icons that switch to the existing usedability texture during cooldown. Animated textures use their first frame for the icons.

The plugin exports broken-smp-resource-pack.zip into its data folder. Players must install that pack for the icons to appear.

I couldn’t locate a VexBot JAR or API in the workspace, so Herobrine’s ability remains unfinished. No test server was started.

sinmunnity

commands are broken also add /brokensmp cooldown reset @a-player

and add all the fucking abilities

Kodari AI
KodariToday at 12:52 pm 2
  1. Fix command registration and add cooldown reset for a player or @a.

  2. Finish the abilities using the available resources and dependencies.

  • Registered /brokensmp as an alias for /broken.

  • Added /brokensmp cooldown reset <player|@a> for operators and console. Active abilities continue until they end.

  • Added 0000’s watching passive and white dust for Herobrine’s teleport.

The abilities are still incomplete: Herobrine’s fake players need the VexBot JAR or API available in the project; I couldn’t find it in the build configuration or workspace. Giant Alex’s appearance and silent footsteps also remain unfinished. 0000’s glowing outlines are currently visible to everyone, not only 0000.

No test server was started.

sinmunnity

make minecraft version 1.21.11 since my server version is paper 1.21.11 java 25 and the plugin is red and doesnt work

Kodari AI
KodariToday at 12:56 pm 1

The project is already configured for Paper 1.21.11 and Java 25. A red plugin name means it failed to enable, but the version settings alone don’t reveal why.

Please send the server startup error and stack trace for brokenSmp. Also make sure the server is running Java 25 and has the latest compiled JAR.

To get the latest JAR: click Compile in Kodari’s top bar (on mobile: ⋮ → Compile Project), click Compile, then Download when it succeeds.

sinmunnity

[12:54:21] [Server thread/ERROR]: Error occurred while enabling brokenSmp v1.0.0 (Is it up to date?) java.lang.IllegalArgumentException: The embedded resource 'broken-smp-resource-pack.zip' cannot be found in plugins/.paper-remapped/brokenSmp-1.0.0 (2).jar at org.bukkit.plugin.java.JavaPlugin.saveResource(JavaPlugin.java:207) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?] at brokenSmp-1.0.0 (2).jar//com.brokensmp.BrokenSmp.onEnable(BrokenSmp.java:66) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:207) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:596) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at net.minecraft.server.MinecraftServer.initPostWorld(MinecraftServer.java:636) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:365) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1253) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:388) ~[paper-1.21.11.jar:1.21.11-132-c5eb079] at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?] The plugin 'brokenSmp' cannot execute the command '/brokensmp'.

Error Log:

[12:54:47] [Server thread/ERROR]: Command exception: /brokensmp HoleyMoley67 org.bukkit.command.CommandException: Cannot execute command 'brokensmp' in plugin brokenSmp v1.0.0 - plugin is disabled. at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(Bukki

Kodari AI
KodariToday at 12:59 pm 1
  • Prevent a missing resource pack from disabling the plugin.

  • Make the build include the generated pack, and report clearly if it’s unavailable.

The plugin was disabling because its embedded resource-pack ZIP was missing; the command error was a consequence of that.

I changed startup so a missing pack produces a warning instead of disabling the plugin, and added an explicit build dependency for generating the pack. Icons still require the resource pack to be included and installed by players.

Compile and download the updated JAR in Kodari, then restart the server with it. No test server was started.

sinmunnity

how to get the resourecepack since i putted brokensmp-cleaned.zip to m resourcepacks and the ability icons dont show up

Kodari AI
KodariToday at 1:04 pm 1

The original Broken_SMP_Cleaned.zip doesn’t contain the generated font files the plugin uses for the icons. You need the plugin-generated pack instead:

  1. Compile and download the latest plugin JAR in Kodari, then install it and restart your server.

  2. In your server files, download plugins/brokenSmp/broken-smp-resource-pack.zip.

  3. Put that ZIP in your Minecraft resourcepacks folder and enable it in Minecraft. Disable the original cleaned pack to avoid conflicts.

  4. Select a character, for example /broken giant-alex. The icon should appear above the hotbar.

Each player needs the generated pack. If the ZIP isn’t in the plugin folder after restarting, check the server log for a resource-pack warning and send it to me.

Kodari can make mistakes. Review important code before using.
Files
assets
src
build.gradle
pack.mcmeta
pack.png
settings.gradle
Code
28 641
src/main/java/com/brokensmp/BrokenSmp.java
package com.brokensmp;

import com.cryptomorin.xseries.XAttribute;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import com.cryptomorin.xseries.XSound;
import com.cryptomorin.xseries.particles.XParticle;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.World;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.util.RayTraceResult;
import org.bukkit.util.Vector;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;

public final class BrokenSmp extends JavaPlugin implements Listener {
    private final Map<UUID, String> characters = new HashMap<>();
    private final Map<UUID, Long> cooldowns = new HashMap<>();
    private final Map<UUID, Long> active = new HashMap<>();
    private final Map<UUID, Double> originalScale = new HashMap<>();
    private final Map<UUID, Map<String, Double>> originalReach = new HashMap<>();
    private final Map<UUID, LivingEntity> held = new HashMap<>();
    private final Map<UUID, Boolean> originalGravity = new HashMap<>();
    private final Map<UUID, Float> previousPitch = new HashMap<>();
    private final Map<UUID, Long> lastSlam = new HashMap<>();
    private final Map<UUID, Set<Block>> illusions = new HashMap<>();
    private final Map<UUID, Location> lastFootprint = new HashMap<>();
    private final Map<UUID, Boolean> watchingGlow = new HashMap<>();
    private final Set<UUID> watchingInvisible = new HashSet<>();
    private final Random random = new Random();
    private long ticks;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        if (getClass().getClassLoader().getResource("broken-smp-resource-pack.zip") != null) {
            saveResource("broken-smp-resource-pack.zip", true);
        } else {
            getLogger().warning("Resource pack is missing from the plugin jar; ability icons will not be available until the pack is installed.");
        }
        getServer().getPluginManager().registerEvents(this, this);
        getServer().getScheduler().runTaskTimer(this, this::tick, 1L, 1L);
    }

    @Override
    public void onDisable() {
        for (Player player : Bukkit.getOnlinePlayers()) {
            endAbility(player);
            clearPassive(player);
            player.sendActionBar(Component.empty());
        }
        restoreWatchingGlow();
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 3 && args[0].equalsIgnoreCase("cooldown") && args[1].equalsIgnoreCase("reset")) {
            if (!sender.hasPermission("brokensmp.cooldown.reset")) {
                sender.sendMessage("§cYou do not have permission to reset cooldowns.");
                return true;
            }
            if (args[2].equalsIgnoreCase("@a")) {
                for (Player target : Bukkit.getOnlinePlayers()) cooldowns.remove(target.getUniqueId());
                sender.sendMessage("§aReset cooldowns for all online players.");
            } else {
                Player target = Bukkit.getPlayerExact(args[2]);
                if (target == null) {
                    sender.sendMessage("§cPlayer not found or not online.");
                    return true;
                }
                cooldowns.remove(target.getUniqueId());
                sender.sendMessage("§aReset cooldown for " + target.getName() + ".");
            }
            return true;
        }
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Players only.");
            return true;
        }
        if (args.length != 1) return false;
        String name = args[0].toLowerCase(java.util.Locale.ROOT);
        if (name.equals("use")) {
            activate(player);
            return true;
        }
        if (!List.of("giant-alex", "entity303", "0000", "herobrine", "null").contains(name)) return false;
        endAbility(player);
        clearPassive(player);
        characters.put(player.getUniqueId(), name);
        applyPassive(player, name);
        showAbilityIcon(player, name, System.currentTimeMillis());
        player.sendMessage("§aCharacter selected: " + name + ". Use /broken use to activate your ability.");
        return true;
    }

    private void activate(Player player) {
        UUID id = player.getUniqueId();
        String character = characters.get(id);
        if (character == null) {
            player.sendMessage("§cSelect a character with /broken first.");
            return;
        }
        if (active.containsKey(id) || cooldowns.getOrDefault(id, 0L) > System.currentTimeMillis()) {
            player.sendMessage("§cYour ability is not ready.");
            return;
        }
        if (character.equals("herobrine")) {
            player.sendMessage("§cI Am Here requires the VexBot dependency, which is not installed in this project.");
            return;
        }
        if (character.equals("entity303")) {
            RayTraceResult result = player.getWorld().rayTraceEntities(player.getEyeLocation(), player.getEyeLocation().getDirection(), 20, 0.3,
                    e -> e instanceof LivingEntity && e != player && !e.isDead());
            if (result == null || !(result.getHitEntity() instanceof LivingEntity target)) {
                player.sendMessage("§cLook at an entity first.");
                return;
            }
            held.put(id, target);
            originalGravity.put(id, target.hasGravity());
            target.setGravity(false);
            previousPitch.put(id, player.getLocation().getPitch());
        }
        if (character.equals("giant-alex")) {
            AttributeInstance scale = attribute(player, "scale");
            if (scale != null) {
                originalScale.put(id, scale.getBaseValue());
                scale.setBaseValue(Math.min(scale.getBaseValue() * 3.0, 16.0));
            }
        }
        if (character.equals("null")) {
            for (Player viewer : Bukkit.getOnlinePlayers()) if (!viewer.equals(player)) viewer.hidePlayer(this, player);
        }
        active.put(id, System.currentTimeMillis() + 10_000L);
        cooldowns.put(id, System.currentTimeMillis() + Math.max(10, getConfig().getLong("cooldown-seconds", 30)) * 1000L);
        showAbilityIcon(player, character, System.currentTimeMillis());
        sound(player, "ENTITY_ENDERMAN_TELEPORT");
    }

    private void showAbilityIcon(Player player, String character, long now) {
        String icon = cooldowns.getOrDefault(player.getUniqueId(), 0L) > now || active.containsKey(player.getUniqueId())
                ? "\ue305" : switch (character) {
                    case "giant-alex" -> "\ue300";
                    case "entity303" -> "\ue301";
                    case "0000" -> "\ue302";
                    case "herobrine" -> "\ue303";
                    case "null" -> "\ue304";
                    default -> "";
                };
        player.sendActionBar(Component.text(icon).font(Key.key("minecraft", "broken_smp")));
    }

    private void tick() {
        ticks++;
        long now = System.currentTimeMillis();
        if (ticks % 20 == 0) updateWatching();
        for (Player player : Bukkit.getOnlinePlayers()) {
            UUID id = player.getUniqueId();
            String character = characters.get(id);
            if (character == null) continue;
            if (ticks % 10 == 0) showAbilityIcon(player, character, now);
            if (ticks % 100 == 0) {
                if (character.equals("entity303")) {
                    effect(player, "STRENGTH", 220, 0);
                    effect(player, "SPEED", 220, 0);
                    effect(player, "FIRE_RESISTANCE", 220, 0);
                } else if (character.equals("null")) effect(player, "NIGHT_VISION", 300, 0);
            }
            if (character.equals("null") && ticks % 8 == 0 && !active.containsKey(id)) {
                particle(player.getLocation().add(0, 0.2, 0), "SMOKE", 4);
                if (random.nextInt(20) == 0) for (Player nearby : player.getWorld().getPlayers())