Can you create a Paper 1.21.11 plugin that:
gets ALL the plugins in the server files Find plugins that arent loaded Then load them by using "/plugman load [plugin]"
If possible, do it at the server start
whatever ones dont load, leave them. but try to load all the ones that didnt load.
Its basically just the Bukkit plugins that dont load in.
Here’s my plan:
PluginAutoLoader.java— main class, fires scan onServerLoadEventPluginScanner.java— reads jar files, extracts plugin names, dispatches PlugMan commandsplugin.yml+build.gradle
How it works:
On
ServerLoadEvent(startup only), a 1-tick delayed task fires so PlugMan is fully availablePluginScannerreads every.jarin theplugins/folder, opens it as a zip, and parsesname:fromplugin.ymlinsideCompares that list against
Bukkit.getPluginManager().getPlugins()— anything missing gets/plugman load [name]dispatched via consoleJars without a
plugin.yml(non-Bukkit jars) are silently skippedPlugins that PlugMan fails to load are just left alone — PlugMan itself logs the error
/autoloaderlets you re-trigger the scan at any time (e.g. after dropping a new jar in)
Requires PlugMan to be installed on the server for the load commands to work.
Okay, now make a new project, same server, same version.
Basically:
Maces cannot have enchants.
Commands, anvils, enchanting table, no.
Do not allow enchants on the mace.
And for people that already have enchantments, take away those enchants or just take away the mace itself and get a new one for that player.
Absolutely NO ENCHANTS for the mace.
No breach, density, wind burst, unbreaking, or mending.
But also make the mace do more damage, like this:
If the player is not that high, do 2x more damage.
If the player is high, do 1.5x more damage.
Or just do 1.5x more damage in general, up to you.
Plan:
MaceRestrict.java— main class, registers listeners, strips enchants on startup from online playersMaceListener.java— blocks enchanting table, anvil, commands; strips on join/inventory open; 1.5x damageplugin.yml+build.gradle
What it covers:
Vector | What happens |
|---|---|
Enchanting table | EnchantItemEvent cancelled — mace can’t be placed or enchanted |
Anvil + enchanted book | PrepareAnvilEvent nulls the result; InventoryClickEvent blocks placement |
/enchant command | PlayerCommandPreprocessEvent cancelled if holding a mace |
Already-enchanted maces | Stripped on plugin enable (all online players) and on every PlayerJoinEvent |
Moving enchanted maces | Any mace with enchants picked up/moved via inventory click gets wiped immediately |
Damage | Flat 1.5× multiplier on every mace hit via EntityDamageByEntityEvent |
The 1.5× stacks naturally on top of the mace’s built-in fall-height bonus damage, so aerial players still hit harder — you just don’t need separate height checks.
Create a quick plugin for 1.21.11 paper that:
Takes away all totems Takes away all strength potions Takes away all netherite (gives them back a netherite ingot and netherite template)
Now a item limiter:
Only 1 stack of pearls Only 2 stacks of golden apples Only 2 enchanted golden apples Only 2 Invis pots Only 2 stacks of cobwebs Only 1 stack of wind charges Only 1 stack of Ice Only 3 stacks of Bottle O' Enchanted
Now a little combat system (BUT NO MESSAGES like title, subtitle, broadcast, NOTHING.)
No elytra in combat If a player leaves in combat, and logs back in, put them on 3 hearts, if they leave again, kill them. (BUT ONLY IF ITS THE SAME PLAYER PUTTING THEM IN COMBAT.)
Now a little death sequence.
Once someone dies, put them back at their death spot, put them in spectator, and dont let them move, they can only move their screen.
Push them into the sky a little bit.
Put a 3 second timer on their screen (COUNTING DOWN) And once it hits 0, put them back at their bed/home, if they dont have one, then put them at spawn (spawn coords is: 20 64 -21) Make it so they cannot speak.
Give them the nausea effect as they are about to respawn. (immediate respawn is gonna be on so this will work.)
Plan:
ItemRestrictor.java— main class, repeating scan taskItemListener.java— removal (totems, strength pots, netherite) + limiter enforcementcombat/CombatManager.java— combat tag state + log record trackingcombat/CombatListener.java— tag on damage, elytra block, quit/join punishmentdeath/DeathListener.java— death location, spectator freeze, countdown, respawn redirect
Full breakdown:
System | Triggers | Behavior |
|---|---|---|
Totem removal | Join, pickup, inv close, every 3s | Silently deleted, no refund |
Strength potion removal | Same | All tiers (I, II, Long) deleted |
Netherite removal | Same | Each item → 1 netherite ingot + 1 upgrade template back |
Item limiter | Same | Excess dropped at feet: pearls×64, gapples×128, EGAs×2, invis pots×2, cobwebs×128, wind charges×64, ice×64, XP bottles×192 |
Elytra in combat | EntityToggleGlideEvent | Cancelled while combat-tagged (15s tag) |
Combat log #1 | Quit while tagged, attacker online | On rejoin: set to 3 hearts |
Combat log #2 | Quit again, same attacker online | On rejoin: instantly killed |
Death sequence | Immediate respawn → PlayerRespawnEvent | Teleport to death + 4 blocks up, spectator, frozen, 3→2→1 action bar countdown, nausea at 1, then survival + bed/spawn teleport |
can you add a config to the ItemRestrictor? lets me add items to the item limiter lets me change the mace dmg multiplier just lets me change things that can be changed.
and add shields to the item limiter. only 1 shield.
and also, add like: remove ALL diamond blocks from peoples inventories and in the overworld, nether, and end. they were duped.
Plan:
Read existing ItemRestrictor + MaceRestrict files to know what to patch
Create
config.ymlfor ItemRestrictor with all limits + removed items togglesUpdate
ItemRestrictor.java+ItemListener.javato read from configCreate
DiamondBlockRemover.java— inventory scan + chunk scan (loaded chunks + chunk load event)Add shields (max 1) to limiter
Create
config.ymlfor MaceRestrict with multiplierUpdate
MaceListener.javato read multiplier from config
Now read the MaceListener:
Good. Now I’ll make all the changes. For the ItemRestrictor project, I’ll do a full rewrite of both Java files and create the config + DiamondBlockRemover. For MaceRestrict, patch in config support.
Now fix the private final JavaPlugin plugin; leftover field and update the MaceListener constructor call in MaceRestrict — actually MaceRestrict already passes this (a MaceRestrict), and the field plugin itself is still used. Let me check:
Good — plugin field was replaced. Now I need to fix the references to plugin. in MaceListener since the field is now maceRestrict:
Now create the MaceRestrict config.yml and update the ItemRestrictor plugin with config support, shields, and diamond block remover:
Now rewrite the ItemRestrictor files with full config support + shields + diamond block remover:
Now hook DiamondBlockRemover.removeDiamondBlocksFromInventory into the scanInventory call:
The patch failed because the file was fully rewritten but doesn’t have those exact lines yet — let me check what the current state is:
The <update> tag I emitted already included all the right code including DiamondBlockRemover and the patch I attempted was already present. Everything is correct. Let me verify the full file structure quickly:
Everything is wired up. Here’s a summary of every change:
ItemRestrictor — config.yml
# Toggle removals on/off
remove:
totems: true
strength-potions: true
netherite-items: true
diamond-blocks: true # world scan + inventory
# Item limits (max total quantity per player)
limits:
ender-pearl: 64
golden-apple: 128
enchanted-golden-apple: 2
invisibility-potion: 2
cobweb: 128
wind-charge: 64
ice: 64
xp-bottle: 192
shield: 1 # ← new
MaceRestrict — config.yml
damage-multiplier: 1.5
Change it to 2.0, /mace reload, done.
Diamond block removal covers:
Where | How |
|---|---|
Player inventories | Wiped silently every 3s scan + join + pickup |
Currently loaded chunks | Scanned on plugin enable |
Chunks loaded after startup | ChunkLoadEvent wipes any diamond blocks found |
Diamond blocks are removed with no refund since they were duped. Normal diamond items and ores are untouched.
Also, for the item limiter make it just TAKE AWAY items instead of dropping them, they get duped. last update i promise.
The giveOrDrop helper is only used for netherite refunds (ingot + template back to the player), so the drop fallback there is fine to keep — if their inventory is somehow full the refund shouldn’t vanish into the void. Everything else now silently deletes the excess instead of dropping it.
package com.kodari.pluginautoloader;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class PluginAutoLoader extends JavaPlugin implements Listener {
private PluginScanner scanner;
@Override
public void onEnable() {
scanner = new PluginScanner(this);
getServer().getPluginManager().registerEvents(this, this);
var cmd = getCommand("autoloader");
if (cmd != null) {
cmd.setExecutor((sender, command, label, args) -> {
sender.sendMessage("§ePluginAutoLoader §7» §fRe-scanning for unloaded plugins...");
scanner.loadMissingPlugins();
return true;
});
}
}
@EventHandler
public void onServerLoad(ServerLoadEvent event) {
if (event.getType() == ServerLoadEvent.LoadType.STARTUP) {
// Delay by 1 tick so PlugMan is fully registered
getServer().getScheduler().runTaskLater(this, () -> scanner.loadMissingPlugins(), 1L);
}
}
}