LogoKubeJS PMMO

Reset Defaults

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.

The cleanest way to start from a blank slate is config/pmmojs-common.toml:

[disableDefaultSettings]
all = false
skills = false
perks = false
requirements = false
xpAwards = false
itemExtras = false
blockVeinData = false

Each switch controls a category:

SwitchWhat it clears
allEverything listed below
skillsPMMO default skills
perksPMMO default perk entries
requirementsItem, block, and entity requirement data
xpAwardsItem, block, and entity XP award data
itemExtrasItem bonuses, positive/negative effects, salvage, vein data
blockVeinDataBlock vein-mining data

The order of operations guarantees your scripts win:

  1. PmmoJS reads the common config
  2. Enabled categories are wiped
  3. 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, ...).