Disabling mod button
snakehugo opened this issue ยท 3 comments
Hello, I'm using CosmeticArmorReworked in 1.16.5
In the client configuration, we have CosArmorGuiButton_Hidden = true, that's nice for disabling the button and then trigger hide/show of the armor in the server side (using your API)
Could it be possible for you to add an option for disabling (or just doing nothing) the "Open inventory Cosmetic Armor" control in the options list?
I don't want players to be able to manage their own cosmetic armor using these buttons
Thanks for reading this issue!
If you are able to make addon mod for my mod, you should be able to just create a mod that detects Cosmetic Inventory and forces the player to close it. If the player manage to swap items due to network latency or something, you can monitor the content changes through InventoryCosArmor.setUpdateListener()
and act accordingly.
I think that's too complicated for me, I will try to compile your mod in 1.16.5 and hide the control button in options.
Also, do you have a discord server in case I struggle?
Your mod is incredibly well constructed, well job, I saw worse mods and without any code commenting...
In lain.mods.cos.impl.client.KeyHandler.java I added a condition for the key control:
public void registerEvents() {
if (!ModConfigs.CosArmorGuiButton_Hidden.get()) {
ClientRegistry.registerKeyBinding(keyOpenCosArmorInventory);
MinecraftForge.EVENT_BUS.addListener(this::handleClientTick);
}
}
And imported ModConfigs package