When you want to replace PMMO's built-in data with your own custom rules, you need a way to wipe the defaults first. PmmoJS gives you two approaches: a config-based bulk reset, and script-based targeted removal.
Recommended: use the common config
The cleanest way to start from a blank slate is config/pmmojs-common.toml:
[disableDefaultSettings]all = falseskills = falseperks = falserequirements = falsexpAwards = falseitemExtras = falseblockVeinData = false
Each switch controls a category:
| Switch | What it clears |
|---|---|
all | Everything listed below |
skills | PMMO default skills |
perks | PMMO default perk entries |
requirements | Item, block, and entity requirement data |
xpAwards | Item, block, and entity XP award data |
itemExtras | Item bonuses, positive/negative effects, salvage, vein data |
blockVeinData | Block vein-mining data |
The order of operations guarantees your scripts win:
- PmmoJS reads the common config
- Enabled categories are wiped
- Your KubeJS scripts run and apply your custom data
When to use scripts instead
Use KubeJS for targeted control when you do not want a whole-category wipe:
- Clear one requirement family:
event.clearVanillaItemSettings() - Clear one perk event list:
event.clearPerks(EventType.SKILL_UP) - Remove a single perk:
event.removePerkType('pmmo:fireworks') - Override specific items after a common config wipe
Rebuilding after a reset
Skills
If you wiped skills, define the skills your pack actually uses:
PmmoJS.skillsConfig(event => {event.addSkill('endurance').withColor(0x2f6fed).withMaxLevel(100).build()event.addSkill('smithing').withColor(0xe08a25).withMaxLevel(100).build()})
Perks
If you wiped perks, add back only the entries you need:
PmmoJS.perksConfig(event => {event.addPerk(EventType.SKILL_UP, 'pmmo:attribute', 'endurance').asAttributePerk().withAttribute(Java.loadClass('net.minecraft.world.entity.ai.attributes.Attributes').MAX_HEALTH).withPerLevel(1).withMaxBoost(10).build()})
Object settings
If you wiped requirements, XP awards, or item extras:
PmmoJS.settings(event => {event.items(['minecraft:diamond_pickaxe','minecraft:netherite_pickaxe'], setting => {setting.override(true)setting.setRequirement(ReqType.TOOL, 'mining', 20)setting.setXp(EventType.BLOCK_BREAK, 'mining', 12)})})
Legacy requirement helpers
The settings event also has these helpers, retained for backwards compatibility:
event.clearVanillaItemSettings()event.clearVanillaBlockSettings()event.clearVanillaEntitySettings()
These only reset requirement data for their object type. They do not touch XP awards, bonuses, effects, salvage, or vein data. Use the common config for complete resets.
What the common config does not cover
Biome and dimension settings do not have a blanket disable switch. Location data requires explicit control from the pack author.
Use targeted calls for location overrides: event.biome(id, ...), event.biomes(ids, ...), event.dimension(id, ...), event.dimensions(ids, ...).