BotBlocker-Minecraft / BotBlocker

Automatically ban MC bots that log into your server.
GNU General Public License v3.0
8 stars 0 forks source link

Something like this, but for Fabric? #1

Closed allanonmage closed 1 year ago

allanonmage commented 1 year ago

I have a Fabric server that I've noticed people trying to log into, and came across your project on Reddit. Do you have something like this for Fabric? My server doesn't use Bukkit, Spigot, etc.

AitorAstorga commented 1 year ago

I never created a mod for Fabric, but I'm checking it. I don't promise anything, but at least I will give it a try :)

allanonmage commented 1 year ago

Thanks for looking.  From what I understand, mods for fabric and bukkit/spigot/etc are similar, but I have no idea how a plugin compares to a mod.

I've blocked some IPs that are known to Reddit to be bots, but that's always a manual process after the fact.

⁣Dan Whaley, MCP, RVC-E, DMC-E-4K, DMC-S, CTS OIF II Veteran, USMC Threema is preferred and secure: VKTCXSPJ @.*** LinkedIn  |  Github  |  Thingiverse  |  Stack Overflow​

On Jul 31, 2023, 12:47 PM, at 12:47 PM, Aitor @.***> wrote:

I never created a mod for Fabric, but I'm checking it. I don't promise anything, but at least I will give it a try :)

-- Reply to this email directly or view it on GitHub: https://github.com/AitorAstorga/BotBlocker/issues/1#issuecomment-1658757066 You are receiving this because you authored the thread.

Message ID: @.***>

AitorAstorga commented 1 year ago

imagen

Progress is being made. I have yet to learn how building the mod exactly works (got it as a jar but I still have to test it, and it generated 2 files idk why). But yeah, it seems doable... I think...?

imagen

Ok, jar tested and it works. I have to fix the code (as you may see in the screenshot it logged the time correctly and tried to ban me, but it didn't). So... Almost there!

Also, Fabric is built with gradle, not maven. And I HATE gradle. I am coding this thing in my Windows laptop because for some reason gradle won't recognise my Linux java. WHY

AitorAstorga commented 1 year ago

Thanks for looking. From what I understand, mods for fabric and bukkit/spigot/etc are similar, but I have no idea how a plugin compares to a mod. I've blocked some IPs that are known to Reddit to be bots, but that's always a manual process after the fact. ⁣Dan Whaley, MCP, RVC-E, DMC-E-4K, DMC-S, CTS OIF II Veteran, USMC Threema is preferred and secure: VKTCXSPJ @. LinkedIn | Github | Thingiverse | Stack Overflow​ On Jul 31, 2023, 12:47 PM, at 12:47 PM, Aitor @.> wrote: I never created a mod for Fabric, but I'm checking it. I don't promise anything, but at least I will give it a try :) -- Reply to this email directly or view it on GitHub: #1 (comment) You are receiving this because you authored the thread. Message ID: @.***>

Ok, so after FIGHTING with gradle, I have a functioning .jar file. I will soon create a separate repo for the Fabric version and also fix some bugs I saw in the Spigot plugin while doing this. In the meantime, here is the .jar. You may want to type "/botblocker enable" and "/botblocker setTimeLimit 5" or whatever time you want. It will then save any unwelcome visitor in a list with their UUID and a boolean value. True for legit users (those with true won't be checked) and false for users that have been banned by the mod. "6667e726-726b-3ff2-a955-494b38cb057b: true" in this format. I have noticed that in the plugin version all are set to true. Not a big deal (because they get banned) but I do have to fix that to have a decent log. Also, I am planning in adding a command to ban all the users (the ones set to false) so we can share lists of UUIDs and have a recommended initial setup (to ban Bunger and those users before they even try to log).

Here the .jar: https://drive.google.com/file/d/1lqOYV57UU0_w9a9DFNmhXXLL4F4bfW0u/view?usp=sharing

AitorAstorga commented 1 year ago

Uploaded the Fabric version to https://github.com/BotBlocker-Minecraft/BotBlocker-Fabric and created an umbrella project for both Fabric and Bukkit/Spiggot versions in https://github.com/BotBlocker-Minecraft.

allanonmage commented 1 year ago

Thanks for jumping on this so quick! I see a lot of gradle folders in mods as I poke around, but aside from MCreator, I haven't come across any build tools, and it seems that talking about source code to study is verboten, so I haven't cracked the intro to modding yet. What's Maven and how is it better than Gradle?

AitorAstorga commented 1 year ago

As Gradle, it is a tool for build management. For my taste it is a lot easier to use and while it is supposedly slower, I don't really notice it. Gradle is nice if you are a nerd of build scripts or a large team that can have an expert on it, but for simple projects like this it is overly complicated. With Maven you just have a POM.xml file to work with, and that's it. You can compare the files structure between the fabric (gradle) and spigot (maven) versions and you will notice some differences. I don't need power tools to build Ikea stuff :P