fantahund / VoxelMap

22 stars 6 forks source link

Any way to disable from the Server Side? #10

Closed JasdanVM closed 2 months ago

JasdanVM commented 6 months ago

As the question says, other map mods offer a way to not allow them on servers, is there any here? If not, please add something, preferably that doesn't involve installing the full mod server side.

SiskSjet commented 2 months ago

Was looking for the same thing and found at least that you can disable radar and cave mode similarly to Xaero's Minimap. You can disable it by sending a msg to the player on join with §3 §6 §3 §6 §3 §6 §d to disable cave mode and or §3 §6 §3 §6 §3 §6 §e to disable radar.

https://github.com/fantahund/VoxelMap/blob/72f7ad2c9cb8d32f1756b2a14683315cb1fc3802/src/main/java/com/mamiyaotaru/voxelmap/VoxelMap.java#L167-L177

Brokkonaut commented 2 months ago

Completely disabling the map on a server is currently not possible, but it is planed to add a way to do this.

The best way to disable radar/caves is to use the voxelmap settings channel: https://github.com/fantahund/VoxelMap/blob/1.21/src/main/java/com/mamiyaotaru/voxelmap/packets/VoxelmapSettingsS2C.java https://github.com/fantahund/VoxelMap/blob/1.21/src/main/java/com/mamiyaotaru/voxelmap/VoxelmapSettingsChannelHandler.java

The color codes are a legacy method from times when the plugin channel did not exist and might be removed in the future.

Brokkonaut commented 2 months ago

I have just added some new options to completely disable the map on server or just disable some parts of it, it will be available in the next release

Brokkonaut commented 2 months ago

In the latest release now you can disable voxelmap (or parts of voxelmap, for example just the world map) from the server side if you want to. See this code: https://github.com/Updated-VoxelMap/VoxelMapPlugin