Disguise Mod

Hello, I don’t know how to code and I’m just asking for someone to make a disguise mod for Sponge. So if anyone could code one, that would be great.

1 Like

I’m looking for one as well for my private server which I plan to port over to Sponge soon.

I don’t think this is possible because you cannot sent packets to the clients with Sponge. You might have to use Forge for these kinds of mods and not Sponge, unless they implement something in the API to spawn NPCs.

Bukkit plugins had the same restriction. Plugins had to use NMS or ProtocolLib (which used NMS internally via reflection) to do this. Why shouldn’t Sponge plugins be able to use that if they need to?

Sponge is not ready for a this kind of plugin, Theres no api for packets, bounding boxes yet

1 Like

Yes, they are not planning to add packets or provide NMS access. So there will not be any ProtocolLib ports for Sponge at least. But it is possible to port ProtocolLib to Forge, then plugins using Sponge plugins can use the ProtocolLib API which is a Forge Coremod.

“provide NMS access”



Yes that is correct :stuck_out_tongue: English is not my mother tongue.

Bukkit didn’t provide a NMS access, it’s just the developer’s choice to import or not the “net.minecraft.server” package in his IDE. You can access native code in a sponge plugin.

Actually this maybe possible without NMS access. Want me to have a go at doing this??

It could be possible, but it would be quite hard.

  • How would you deal with entities only being disguised to certain players (ex. Steve sees a pig, but Alex sees a chicken)?
  • What about entity AI? How do you make sure that mobs aren’t targeting the disguise?
  • It could be complex to pass changes between the disguised entity and the disguise.

sometimes you just got to try :wink:

But there are events and data in SpongeAPI that will help.

deal with entities only being disguised to certain players

There is a data key that allows you to make entities invincible to select players


make sure that mobs aren't targeting the disguise

This is a simple event thanks to the new Sponge events shown here

could be difficult to pass changes

update the entity on EntityMoveEvent and the update will be to do with how much i think of. Could go completely wrong though


just going through the new event API and well … first they seemed to have removed PlayerMoveEvent and EntityMoveEvent. Not only that EntityTargetEvent isnt what I thought it was. I need at least PlayerMoveEvent for this plugin to work

1 Like

Sounds good. The only other problem I can think of is that the disguise entities might accidentally get saved.

thats true, ill need to remove the entity on player leave. (hope that it does not save the entity when the server crashes)

Actually, I was referring to the server autosave.

no i knew what you meant. I just dont know how to get round that just yet, Ill probably work something out though.

They’re trying to avoid doing this.

They’ve been refactored. EntityMoveEvent has been changed to DisplaceEntityEvent to check for a player, you’d just use the cause.

Yeah, i found that out a few days ago.

Btw for anyone reading this. My version is almost programmed however im not 100% sure the testing will go correctly

Yes, that’s what I am saying.

Also in GitHub they are proposing for a contrib API for doing things that might not be available or break in the next version of Minecraft. But if that will be implemented, it would be great that Ore(the new plugin repository) when decompiles the plugins bytecode for malicious stuff(I am not sure what method they picked for verifying pluigns) it would also check the code if it is using a contrib API and mark the plugin if it is compatible with future versions of Sponge/Minecraft.

1 Like