Is it possible to have different mods in different worlds?

First, the discussion parameters:

  • The server will be using Forge and Sponge.
  • Some mods will require client-side changes.
  • Players will use a mod-pack containing all of the mods that require client-side loading. This is not looking to avoid having clients load some mods, just prevent access where needed.
  • A strong preference for active open-source mods, but not absolute.
  • Running on a single physical/virtual server.

The end result I’m looking for is, from the player perspective:
World A has mods 1, 2, and 3; World B has mods 1 and 4, World C has no mods, and so on.

So, what method would be best to accomplish this? What mods would you suggest to enable this infrastructure?

My best guess to making this work would be:

  1. A mod that allows the creation of multiple worlds on the same server. (Such as ProjectWorlds)
  2. A mod that handles permissions. (Such as PermissionsEx)
  3. All mods support the loaded permission mod. (I suspect this would severely limit the mods I could use)
  4. Use the permissions mod to grant mod commands on allowed worlds and negate nodes on worlds that shouldn’t have that mod.

Thanks in advance for any suggestions/feedback!

1 Like

Unless the mod itself directly supports per-world, no. The only other option then is to have worlds as separate servers.

Well, in my best guess setup, PermissionsEx supports different permissions per-world, so any mod that supports PermissionsEx would essentially come with multi-world support, correct?

I’m afraid the game doesn’t quite work that way yet. Custom items and blocks and entities are registered per server/game instance. The only way you can get this working is through three server instances and a bungee cord like setup connecting the three servers in one network.

1 Like

@gabizou isnt that supposed to be server/game instance

[quote=“gabizou, post:4, topic:10731, full:true”]
I’m afraid the game doesn’t quite work that way yet. Custom items and blocks and entities are registered per server/gave instance.[/quote]

By yet do you mean there are plans to support this, or this is something that could be done if someone wrote a mod to do it?

If the latter, would something like ProtectionPerms handle the block and entity end of this? The author mentions in that thread that multi-world support would be handled by the permissions plugin.

Also, I think I may have been using the word mod too broadly and may mean plugin in some cases. I’m guessing that plugins are software that uses Sponge to modify Minecraft and mods are software that directly use Forge to modify Minecraft?

By yet, I mean the game is not at all designed around multiple item/block/entity type sets per world. When you add an item or a block or an entity, it’s for the entire server/game instance.

You could very well have SpongeAPI plugins that are multi-world aware and handle processing specific to designated worlds. The only difference is that SpongeAPI plugins cannot (yet) add new content like blocks/items/entities. That is the boundary of what is a SpongeAPI plugin and a Forge mod.

Ah, I may be misunderstanding or did not communicate what I was looking for clear enough. I do not need each world to be completely unaware of mods that other worlds have access to, only the appearance of it from the player perspective.

For example, say mod2 adds a new type of skeleton mob. Both world A and B know about the new mob, but I use a permission node to turn off spawning of that mob in world B. If mod4 added a milkshake item, both worlds know about the item, an admin could spawn it in either world, but the recipe is disabled in world A. These changes give the appearance to normal players that the two worlds are different, even though they load the same mods.

Sorry if this is just asking the same thing in a different way. I want to make sure I have a clear understanding of what is possible and that my question is framed properly.

Thank you for the feedback so far and the clarification. Since Sponge plugins cannot currently add new content these forums are probably not the appropriate place to ask a question like this.

Edit: Too much “not” in one sentence.

Yes, this is possible to do with a plugin, basically just cancel any events where itemstacks are being used or blocks being placed for those specific item types (would have to be really well aware of what they’re doing), but it’s entirely doable with a SpongeAPI plugin.

The forums are perfectly fine, since SpongeForge is implementing the API onto the MinecraftForge patched server and client, it’s to be expected that SpongeAPI plugins are designed with forge mods in mind (about half of the API is designed around the extendability of mods providing new content). Feel free to continue discussing anything relating to plugins interacting with mods and such.


Awesome, thanks again for the help. Now that I know what I want is even possible I can start looking for what I need to pull this off.

1 Like

This thread pleases me much!

Very similar to this plugin from bukkit. If I’m understanding @klangg klangg correctly he’s thinking of this on a Forge client bases. Restricting access to worlds that will have blocks/items/entities as to allow strictly vanilla clients to connect. I would think there would be issues allowing vanilla clients to connect to a server running mods requiring Forge mod packs. Even if the worlds are inaccessible the server as a whole is still running those mods (just as @gabizou said). @gabizou Is it maybe possible to disable a server connection block due to missing mods, then by just preventing access to worlds where there the blocks/items/entities are not available on vanilla to prevent missing renders?

Regardless if this works on a Forge client level I think we need purely sponge integration to give us similar control to the old bukkit plugin. It is incredibly useful for many applications.

Per world plugins was incredibly hacky. It basically relied on guessing and configuration in order to work out what events needed to be passed to which plugins in order for everything to not explode.

Mods are even harder to do right, but it would be amazing, just it’s hard to see the benefit over using a bungeecord setup.

1 Like

If it could work in a non-hackey way :stuck_out_tongue: it would be quite amazing. I do agree that bungeecord will most likely be the solution to mods though. So I wonder if there is a better way to create a perworldplugins style sponge mod to strictly add restriction to certain mods in worlds. To help manage things such as no mmo rankings in a minigame, ex, from bukkit preventing mcmmo from being used in survivalgames.

Possibly use catalogs from the game registry?

That plugin looks like it does what I was thinking about based on the info on the page linked. I am not looking for a way for vanilla clients to connect to a modded server. I will be maintaining a large modpack for the clients connecting. My intent is that users will need all of the mods to play on the server.

[quote=“ryantheleach, post:12, topic:10731”]
Per world plugins was incredibly hacky.[/quote]

I figured that there were plenty of bad ways to do this, part of why I posted here, wanted to make sure I found a good method.

My desire to get this working with a permissions and/or protection mod was purely for performance. My guess is that I would need far less server resources to run a heavily modded 5 world Sponge server than 5 moderately modded Sponge servers connected with bungeecord. Also, I had thought that bungeecord was Spigot only up until I started getting feedback on this post. It looks like it can do what I’m looking for, though I will have to compile it myself until bungeecord incorporates PR#1678.

Thanks for the feedback!

1 Like