Tweakeroo

Tweakeroo

2M Downloads

Allow Server-Owners to disable the mod

lunatic-gh opened this issue ยท 3 comments

commented

Hey, i was wondering if you could implement a serverside "opt-out", for server-owners who don't want people to use tools like freecam or the adjascent-block-placement features.

These can indeed be really useful in some cases, like when building farms (i do use them myself for that case), but at this point a freecam and "bedrock-like" block-placement are literally a cheat on any server (like one of mine) where players actually use them to constantly "xray" through caves to find anything.

In case you don't know how such a toggle would have to be implemented (no offense, i cannot know tho) you just gotta send a packet from server>client once a player joins, and then disable features on the client if such a packet gets received (thats probably the simplest method that i often use for my mods).

While this does obviously not do the same as a proper anti-cheat (especially cuzt it's open source), it would be a nice thing to have if you don't want to spend hundreds of cash on a custom anticheat that needs consistent updates, considering barely anyone actually compiles this themselves.

Edit: I also see that "cheat clients don't provide an opt-out either", but as i see it, this mod is not supposed to be a cheat.

commented
commented

To continue on that linked comment, I have implemented the server-side config overrides/locks feature in the main development code some time ago. But that code is currently still only in the liteloader_1.12.2 branch as it's still not quite ready and thus has not been ported to other MC versions.

In that version the server has two different ways to send the config override data to the clients: either via a "hidden" MOTD line (line 4 or later or something like that), or via a custom payload packet. The MOTD line can be either directly the override definition JSON string, or a URL that points to that JSON, such as on pastebin or GitHub gists (as long as you get a "raw" URL). The custom payload packet is also just the JSON string.

The override definition can do two kind of separate things:

  • It can locks configs to a given value (such as locking feature enable toggle configs to OFF) with a hover message stating whatever the server wants to say, such as This server doesn't allow this feature
  • It can disable "actions" from being executed

"Actions" are a new system/concept in the rewritten malilib, and most "functional code", especially things that run once from hotkey presses, or are meant to be executed by the user in other ways (for example via the action prompt screen or the "command deck" screen) are being moved to be actions. For example Litematica's executeOperation would be an action in the new system (although that specifically will likely be split to separate actions per feature/mode, and not be just a common shared "execute" for all modes anymore).

So basically yes, feature locks are coming. But there is no proper ETA, as my progress on any code has been really minimal lately due to not having time to work on mods much at all these days.

commented

To continue on that linked comment, I have implemented the server-side config overrides/locks feature in the main development code some time ago. But that code is currently still only in the liteloader_1.12.2 branch as it's still not quite ready and thus has not been ported to other MC versions.............................

Thanks for the quick answer. I feel like my comment in the other issue (252) came off a bit more angry as it was meant to be, i apologize if it did.

Just take however much time you need for it. I just didn't find any Issue that talked specifically about having an opt-out feature, more like ppl complaining about it being a cheat.

So TLDR: If it takes a year, it takes a year. Thanks!