dakingofbots

make me a plugin for minecraf 26.3 that adds a new Origins menu upon joining for the first time. The origins are set in the plugin's config while on the server. When it is added, a new folder is created in the plugins/ directory.

Users can then add .yml files for adding new origins. Any new .yml file is a new origin in the custom "Origins" ui that opens when the player joins for the first time. The plugins/CustomOrigins/ folder also contains a config.yml file for the plugin's general config. In each origin's yml file, a number of attribute can be set. Here is a list of them:

Health: <integer> CanFly: true/false Resistance: <integer> FallDamage: true/false UnderwaterBreathing: true/false Strength: <integer> CanBurn: true/false FireTrail: true/false (leaves a temporary trail of fire behind the player. That trail isnt actual fire blocks, its particles. Those damage mobs but dont actually burn blocks around them) Speed: <integer> (default speed is 0, any negative number will be equal to slowness)

Add a bunch more that you can think of and make them work.

Kodari AI
KodariOct 21 at 12:58 pm 1
CustomOriginsMenu
Creates a dynamic Origins selection menu displayed on first server join. Reads origin definitions from YAML files stored in plugins/CustomOrigins/, with a config.yml for general settings. Each origin YAML supports configurable attributes including Health, CanFly, Resistance, FallDamage, UnderwaterBreathing, Strength, CanBurn, FireTrail, Speed, plus additional attributes like JumpHeight, Luck, Armor, AttackDamage, NightVision, WaterWalking, LavaImmunity, Climbing, and Invisibility. Applies chosen origin effects persistently, reopens menu if no origin selected, and allows admin commands to reassign origins.
  • Create the Paper plugin scaffold and runtime-generated plugins/CustomOrigins files.

  • Implement origin loading, first-join selection GUI, saved choices, and /origins reload.

  • Apply the requested traits plus extra configurable abilities, with particle-only fire trails that damage monsters without placing fire.

Created the CustomOrigins plugin with a paginated Origins menu, saved player selections, and /origins reload.

On first startup, it creates plugins/CustomOrigins/config.yml and three example origin files. Add more .yml files directly in that folder; reload them with /origins reload. Origins support the requested traits plus night vision, jump boost, haste, regeneration, no hunger, dolphin’s grace, luck, and absorption. Potion-effect integers are levels (0 disables the effect); Speed: -1 gives Slowness I. Health: 20 sets a 20-point maximum (10 hearts).

The project is configured for Java 21 and Paper API 1.21.4, with plugin api-version 1.21. It is not compiled against a Minecraft 26.3-specific Paper API.

dakingofbots

make like 20 default ones, and add more settings for the different origins.

Kodari AI
KodariOct 21 at 1:02 pm 1
  1. Expand the generated defaults to about 20 distinct origins.

  2. Add configurable origin traits and make sure they’re loaded and applied.

Added 20 default origins total, including the original three. Missing default files are added to plugins/CustomOrigins/ on startup without overwriting existing origin files.

Added per-origin YAML settings: FireResistance, SlowFalling, Invisibility, Glowing, ConduitPower, Weakness, MiningFatigue, and immunities to drowning, poison, wither, freezing, suffocation, and void damage. Effect levels use the same format as the existing potion traits.

Use /origins reload after editing origin files.

dakingofbots

add a command to reset a player's origin, and add a "NightVision" setting. Also add a few commands for utility and shit

Kodari AI
KodariOct 21 at 2:26 pm 1
  1. Add a command to clear a player’s saved origin and let them choose again.

  2. Add and apply the per-origin NightVision setting.

  3. Add useful /origins utility subcommands, keeping the existing reload behavior.

Added /origins reset [player]: players can reset their own origin, and admins can reset an online player’s origin. Resetting clears origin effects, restores default health and flight settings, and opens the selection menu again.

NightVision is already supported as a per-origin YAML setting and applied to players. Added /origins list, /origins info <origin>, /origins set <player> <origin>, and /origins menu; existing /origins reload remains available. Admin commands require customorigins.admin.

dakingofbots

add an "AirJump" setting that controls how many jumps can a player do in the air. Its default is 0. Having it on 1 allows players to double jump. Also, make the current origins more balanced, and change any potion effect related power to be infinite (as long as its the current origin of the player) and have no particles. Effects must also stay when the player dies.

Kodari AI
KodariOct 21 at 2:54 pm 2
  1. Trace origin parsing, effect refresh, death handling, and current default origin definitions.

  2. Add configurable AirJump with a default of 0 and implement extra midair jumps.

  3. Balance the generated origins and keep origin potion effects infinite, particle-free, and restored after death.

Added AirJump to origin YAML settings: it defaults to 0; setting it to 1 lets players jump once more while airborne. Updated Skyborn, Swiftfoot, and Cloudrunner defaults to demonstrate it.

Origin potion effects now have effectively infinite duration with particles and icons hidden, and are reapplied after respawn. Balanced the generated defaults by reducing several stacked bonuses—for example, Skyborn no longer has free flight, and Stoneguard and Ironclad have less health and resistance.

Existing origin YAML files are preserved rather than overwritten, so these balance changes apply to newly generated defaults. Edit existing files manually to give those origins the updated values.

dakingofbots

you do know there is an option to make effects ACTUALLY infinite right? and just make the effects from the origins not even show anywhere. You shouldnt use vanilla potion effects, you should use attributes instead. And make the ui menu reopen instantly when a player tries closing it.

Kodari AI
KodariOct 21 at 3:03 pm 2
  1. Replace origin potion-effect powers with configurable attribute modifiers where possible.

  2. Keep origin powers hidden from the UI and make the origin menu reopen immediately when a player closes it.

Origin powers no longer use vanilla potion effects. Potion-style traits are applied as attributes where possible; regeneration, underwater breathing, slow falling, invisibility, and glowing use direct mechanics instead. They don’t appear in the potion-effects UI and are reapplied after respawn.

Origins can also specify attribute changes directly in YAML:

YAML
Attributes:
  MOVEMENT_SPEED: 0.02
  ATTACK_DAMAGE: 2.0

The values are added to the player’s base attributes. Night vision has no attribute equivalent, so the existing NightVision setting won’t provide night vision without using a potion effect or client-side support.

The origin menu now reopens on the next tick if a player closes it; choosing an origin and switching pages won’t trigger the reopen.

dakingofbots

make it so airjumps reset when the player hits the ground. And make the fire trail linger a few seconds. Also, make the immune to void thing teleport the player to the last safe block they were at. Add a "Size" setting too, and a "Base Items" one as well. Any base items are deleted if the player changes origin, even if they are in a chest or an other container. Those are set using a /give command structure for the item (to add enchants and other settings to it, theres no actual need to have "/give @s" ). Add more effects to the example origins, to make them more balanced please. Add new "poisonTouch" and "witherTouch" effects, as well as a "DragonBreath" effect. That last one is activated when shift right clicking with an empty hand, and launches a dragon fireball. Add other abilities that work like this.

Kodari AI
KodariOct 21 at 3:36 pm 7
  1. Reset air jumps on landing and extend the fire trail.

  2. Track safe blocks for void rescue.

  3. Add configurable Size and origin Base Items, removing those items from inventories and containers on origin change.

  4. Add touch effects, dragon-breath and other triggerable abilities, and balance the example origins.

1. AirJump and fire trail: grounded AirJump counts now reset only after an actual jump; fire-trail particles are refreshed at each trail point for about three seconds. Next, I’m handling void rescue.

2. Void rescue: immune players are now returned to a tracked grounded, clear location, with world spawn as a fallback if none was recorded. Next, I’m tracing origin settings and item ownership before adding Size and Base Items.

3. Size and Base Items: Added Size (default 1.0) and YAML BaseItems entries, with items generated from Minecraft /give item syntax and tagged for cleanup. Origin changes now remove tagged items from player inventories and tracked block containers, including containers registered across chunk unloads. I’m moving on to the contact and triggered abilities.

Implemented the requested origin features:

  • AirJump counts reset on landing. Fire-trail particles now linger at each trail point for roughly three seconds.

  • Void immunity teleports players to their last safe, grounded location; world spawn is the fallback if none has been recorded.

  • Added Size (default 1.0, applied through the SCALE attribute) and BaseItems. Base-item entries accept Minecraft /give item syntax, including counts and components. Tagged items are removed when their owner changes or resets origin; cleanup checks online player inventories, block containers, tracked unloaded-container locations, and nested shulker-box contents.

  • Added melee PoisonTouch and WitherTouch, plus shift-right-click abilities DragonBreath, WindBurst, and FlameShot. Ability cooldowns and touch-effect durations are configurable per origin.

  • Updated the generated examples with ability settings and balance tradeoffs.

Existing origin YAML files aren’t overwritten. Add the new settings to any existing files you want to update, then run /origins reload.

dakingofbots

update the example origins to have the new features and add a few more. Also make it so origin base are soulbound. Also add a /origins list command which brings up the origin choosing menu, but you cant actually change origins with it. A new feature for that new menu and the normal one is that right clicking an origin will bring you to a smaller menu with the origin's icon in the center and a lime concrete block on one side, a red one on the other. The red one is a "go back" button, and the lime one is an "accept" button. Hovering over the icon brings up a list of the effects of the origin. It doesnt show effects that are set to the default.

Kodari AI
KodariOct 21 at 3:57 pm 4
  1. Update and expand the example origins with the new settings and abilities.

  2. Make base items soulbound and add /origins list as a non-changing browse menu.

  3. Add the origin confirmation screen with effect details and default values omitted.

1. Example origins: Updated the seeded origins to demonstrate size, base items, attributes, touch effects, immunities, and triggered abilities; added Stormcaller, Toxicologist, Riftwalker, and Gravebound. Existing YAML files are preserved rather than overwritten. Next: soulbound base items and /origins list.

  1. Example origins: Expanded the seeded examples with the newer settings and abilities, and added Stormcaller, Toxicologist, Riftwalker, and Gravebound. Existing origin YAML files are preserved, so already-generated files won’t be overwritten.

  2. Soulbound items and /origins list: Base items are bound to their owner: they can’t be dropped, transferred into containers, hoppers, item frames, or armor stands, and they’re retained through death. Existing cleanup on origin changes remains. For players, /origins list now opens a browse-only menu; the console still gets a text list.

  3. Origin details and confirmation: Right-clicking an origin opens a details screen with the icon centered, a red back button, and a lime accept button. The icon lore lists non-default effects. Accept changes the origin only from the normal chooser; browse-only mode cannot change it.

dakingofbots

it doesnt let you close the /origins list menu but it should.

Kodari AI
KodariOct 21 at 4:03 pm 1

Browse-only menus now close normally, including the origin details screen opened from /origins list. Selection-enabled menus keep their existing close behavior.

dakingofbots

make the dragon's breath ability work when right clicking air, and make it not damage the caster. Also, dont let the emberkin use it. ALso, the fire trail should damage anything that walks into it (except item frames and armor stands and boats and items)

Kodari AI
KodariOct 21 at 4:17 pm 1
  1. Trace the dragon’s breath activation and fire-trail damage handling.

  2. Enable air right-click activation, exclude the caster and Emberkin, and make trail damage affect valid entities crossing it.

Dragon Breath now activates on right-click air, and its fireball can’t damage its caster. Emberkin can no longer use Dragon Breath. Fire-trail damage now hits nearby damageable entities at trail locations, excluding the caster, item frames, armor stands, boats, and dropped items; targets are limited to one hit per second.

dakingofbots

make wither touch last longer, and let base items be shift right clicked in the inventory. Also, improve the effect list of each origin's details. It doesnt have to show the nbt for base items for example, and Invisibility doesnt work... Remove it and give any origin that had it an ability: right clicking toggles on and off the potion effect. It is set to infinite and there is only a 1s delay between uses of the ability. While invisible, players cannot wear armor tho. If they try, the armor is put back in the slot it previously was or is dropped on the ground if that slot is occupied.

Kodari AI
KodariOct 21 at 4:38 pm 5
  1. Extend the Wither touch duration.

  2. Allow base items to be shift-right-clicked in inventory.

  3. Improve origin detail effect descriptions and omit implementation data like base-item NBT.

  4. Replace passive invisibility with a toggle ability and prevent armor use while invisible.

1. Wither Touch: Increased the built-in durations to 100–160 ticks and the fallback to 100 ticks. Next: allow shift-right-clicking soulbound base items in inventory.

2. Base items: Shift-right-clicks are now exempt from the soulbound shift-click block. Next: improve the origin detail effect descriptions.

3. Origin details: Base items now display readable names and amounts without raw components/NBT; the Wither Touch duration display now matches its new default. Next: replace passive invisibility with the ability and enforce armor restrictions.

  1. Wither Touch: Increased the example durations and default to 100–160 ticks.

  2. Base items: Shift-right-clicks are now allowed; other soulbound transfer protections remain.

  3. Origin details: Base items show readable names and amounts without raw NBT or components.

  4. Invisibility: Origins that had passive invisibility now grant a right-click toggle for an infinite potion effect, with a separate one-second cooldown. While active, armor is removed and attempts to equip it are blocked; items return to their source slot or drop if it’s occupied. Existing Invisibility: true configs still enable the ability.

dakingofbots

CanFly doesnt work... Players in survival should have the ability to fly if its set to true. And weakness 1 just prevents me from hitting mobs with my bare hands... Also, the WindBurst ability should summon a wind charge under the player, and it must have a strength a little above the one of a normal wind charge. Also, base items should be custom items with special effects.

Kodari AI
KodariOct 21 at 4:54 pm 4
  1. Fix CanFly so survival players can fly when enabled.

  2. Make Weakness I work without disabling bare-hand melee.

  3. Change WindBurst to launch a slightly stronger wind charge from beneath the player.

  4. Inspect base-item definitions and give those items their configured special effects.

  1. CanFly: Survival players now start flying when their origin is applied with CanFly: true.

  2. Weakness: Weakness still lowers attack damage, but now leaves enough damage for bare-hand hits to register.

  3. WindBurst: It spawns and immediately detonates an owner-attributed wind charge beneath the player, with its yield set slightly above normal.

  4. Base items: They now get custom names and lore. Right-click effects are configurable with BaseItemEffects in each origin YAML; default items include Speed, Water Breathing, Resistance, or Strength. Existing potion effects and shield use are preserved, and existing default origin files are migrated.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
13 2,451
src/main/java/com/kodari/customorigins/CustomOriginsPlugin.java
package com.kodari.customorigins;

import com.cryptomorin.xseries.XAttribute;
import com.cryptomorin.xseries.XPotion;
import com.cryptomorin.xseries.particles.XParticle;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Boat;
import org.bukkit.entity.Damageable;
import org.bukkit.entity.Item;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
import org.bukkit.entity.DragonFireball;
import org.bukkit.entity.SmallFireball;
import org.bukkit.entity.WindCharge;
import org.bukkit.event.EventHandler;
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.FoodLevelChangeEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ArmorMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerToggleFlightEvent;
import org.bukkit.util.Vector;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class CustomOriginsPlugin extends JavaPlugin implements Listener {
    private final Map<UUID, Map<String, Double>> originalAttributeValues = new HashMap<>();
    private final Set<UUID> invisiblePlayers = new HashSet<>();
    private final Map<UUID, Long> invisibilityCooldowns = new HashMap<>();
    private final Map<UUID, ArmorItemSource> armorItemSources = new HashMap<>();
    private final Map<UUID, Integer> airJumpsUsed = new HashMap<>();
    private final Map<UUID, Location> lastSafeLocations = new HashMap<>();
    private final Map<UUID, Long> abilityCooldowns = new HashMap<>();
    private final Map<UUID, Long> fireTrailDamageCooldowns = new HashMap<>();
    private OriginManager originManager;
    private PlayerOriginStore playerOriginStore;
    private OriginsMenu originsMenu;
    private BaseItemManager baseItemManager;
    private long ticks;

    private static final class ArmorItemSource {
        private final Inventory inventory;
        private final int slot;

        private ArmorItemSource(Inventory inventory, int slot) {
            this.inventory = inventory;
            this.slot = slot;
        }
    }

    @Override
    public void onEnable() {
        saveDefaultConfig();
        ensureDefaultOrigins();
        originManager = new OriginManager(this);
        originManager.loadOrigins();
        baseItemManager = new BaseItemManager(this);
        playerOriginStore = new PlayerOriginStore(this);
        playerOriginStore.load();
        originsMenu = new OriginsMenu(this);
        getServer().getPluginManager().registerEvents(this, this);
        getServer().getPluginManager().registerEvents(originsMenu, this);
        getServer().getPluginManager().registerEvents(baseItemManager, this);
        baseItemManager.scanLoadedContainers();

        OriginsCommand command = new OriginsCommand(this);
        getCommand("origins").setExecutor(command);
        getCommand("origins").setTabCompleter(command);
        getServer().getScheduler().runTaskTimer(this, this::tickOrigins, 10L, 10L);
        getLogger().info("Loaded " + originManager.getOrigins().size() + " origin(s).");
    }

    @Override
    public void onDisable() {
        for (Player player : Bukkit.getOnlinePlayers()) {
            disableInvisibility(player);
        }
        if (playerOriginStore != null) {
            playerOriginStore.save();
        }
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        originManager.loadOrigins();
        Player player = event.getPlayer();
        Bukkit.getScheduler().runTaskLater(this, () -> {
            if (!player.isOnline()) {
                return;
            }
            rememberSafeLocation(player, player.getLocation());
            String selectedKey = playerOriginStore.getOriginKey(player.getUniqueId());
            Origin origin = originManager.getOrigin(selectedKey);
            if (origin == null) {
                if (selectedKey != null) {
                    playerOriginStore.removeOrigin(player.getUniqueId());
                }
                originsMenu.open(player, 0);
                return;
            }
            applyOrigin(player, origin);
        }, 1L);
    }

    @EventHandler
    public void onEntityDamage(EntityDamageEvent event) {
        if (!(event.getEntity() instanceof Player player)) {
            return;
        }
        Origin origin = getSelectedOrigin(player);
        if (origin == null) {
            return;
        }

        EntityDamageEvent.DamageCause cause = event.getCause();
        if (origin.isImmuneToVoid() && cause == EntityDamageEvent.DamageCause.VOID) {
            event.setCancelled(true);
            Location safeLocation = lastSafeLocations.get(player.getUniqueId());
            if (safeLocation == null || safeLocation.getWorld() == null) {
                safeLocation = player.getWorld().getSpawnLocation().add(0.5, 0.0, 0.5);
            }
            player.teleport(safeLocation);
            player.setFallDistance(0.0f);
            player.setVelocity(new Vector(0, 0, 0));
            return;
        }
        if (!origin.isFallDamage() && cause == EntityDamageEvent.DamageCause.FALL) {
            event.setCancelled(true);
        }
        if (!origin.isCanBurn() && (cause == EntityDamageEvent.DamageCause.FIRE
                || cause == EntityDamageEvent.DamageCause.FIRE_TICK
                || cause == EntityDamageEvent.DamageCause.LAVA
                || cause == EntityDamageEvent.DamageCause.HOT_FLOOR)) {
            event.setCancelled(true);
            player.setFireTicks(0);
        }
        if (((origin.isImmuneToDrowning() || origin.isUnderwaterBreathing() || origin.isConduitPower())
                && cause == EntityDamageEvent.DamageCause.DROWNING)
                || ((origin.isFireResistance() || !origin.isCanBurn())
                && (cause == EntityDamageEvent.DamageCause.FIRE
                || cause == EntityDamageEvent.DamageCause.FIRE_TICK
                || cause == EntityDamageEvent.DamageCause.LAVA
                || cause == EntityDamageEvent.DamageCause.HOT_FLOOR))
                || (origin.isImmuneToPoison() && cause == EntityDamageEvent.DamageCause.POISON)
                || (origin.isImmuneToWither() && cause == EntityDamageEvent.DamageCause.WITHER)
                || (origin.isImmuneToFreeze() && cause == EntityDamageEvent.DamageCause.FREEZE)
                || (origin.isImmuneToSuffocation() && cause == EntityDamageEvent.DamageCause.SUFFOCATION)) {
            event.setCancelled(true);
        }
    }

    @EventHandler
    public void onFoodLevelChange(FoodLevelChangeEvent event) {
        if (!(event.getEntity() instanceof Player player)) {
            return;
        }
        Origin origin = getSelectedOrigin(player);
        if (origin != null && origin.isNoHunger()) {
            event.setCancelled(true);
            player.setFoodLevel(20);
            player.setSaturation(20.0f);
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
        if (event.getDamager() instanceof DragonFireball fireball