Skip to main content

Blacklist

Blacklisting can be setup by:

  • Specifying item(s) in the swpm-server.toml config file (saves > world > serverconfig)
  • Specifying items in game via commands

Once setup, blacklisted items will be removed from any player if they obtain it and a notice given that the item was confiscated.

Note: These permissions and restrictions are primarily being developed for use in official SWE servers, but are included in the mod for others needing similar functions for server management. The default configs may specify mods that servers do not use or do not want to blacklist - ensure the config reflects the correct restrictions of the server prior to re-loading the world.


Config

Check and adjust the config prior to applying to or updating servers - blacklisted inventory items will be permanently lost.

The below is our default entry for SWE server modpack and restrictions.

#List of item ids to blacklist from being mapped.
#Format: modid:itemid
#Example: minecraft:stone
blacklist_item_ids = ["minecraft:bedrock"]

#List of entity ids to blacklist from being mapped.
#Format: modid:entityid
#Example Entry: minecraft:iron_golem
#Example List: ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"]
blacklist_entity_ids = []

This says: Specify which items (by ID) that will be removed from a player once acquired, and which entities (by ID) that will be prevented from spawning.

The below is our default entry for SWE server modpack and restrictions.

#List of item ids to blacklist from being mapped.
#Format: modid:itemid
#Example: minecraft:stone
blacklist_item_ids = ["minecraft:bedrock", "minecraft:barrier", "minecraft:elytra", "minecraft:ender_chest", "minecraft:obsidian", "minecraft:ender_eye", "minecraft:end_crystal", "minecraft:wither_skeleton_skull", "minecraft:nether_star", "minecraft:chorus_fruit", "minecraft:budding_amethyst", "minecraft:tnt"]

#List of entity ids to blacklist from being mapped.
#Format: modid:entityid
#Example Entry: minecraft:iron_golem
#Example List: ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"]
blacklist_entity_ids = ["minecraft:iron_golem", "minecraft:villager", "minecraft:wither", "minecraft:mooshroom"]

This says: Specify which items (by ID) that will be removed from a player once acquired, and which entities (by ID) that will be prevented from spawning.


Commands

/swpm blacklist add modid:itemid                              Adds an item (by ID) to the blacklist.

/swpm blacklist remove modid:itemid                        Removes an item (by ID) from the blacklist.

/swpm blacklist list                                                    Lists all currently blacklisted items (allows blacklist removal via the list).

Blacklisted entities cannot be listed, added, or removed via commands. It is only possible through config.


Exemption

All users are subject to blacklist item confiscation except for anyone with the Blacklist Bypass key.

When an item is confiscated, the following message will display:

image.png