I have attempted to make a Basic Admin plugin for preventing commands with “all” being run. My initial idea was to turn on the “command confirmation” value to true in the configuration so that you would have to confirm running any sort of commands such as “kick all”, and then the plugin would pick that up and kick you before you could press the button to execute it.
The only problem with this is that the event is only fired after they click the button to execute the command, so kicking them wouldn’t do anything.
There is currently no documentation for plugins (at least I think), so if anyone had any ideas, it would be appreciated.
Code:
local Plugin = function(...)
local Data = {...}
local returnPermissions = Data[1][3]
local pluginEvent = Data[1][9]
pluginEvent.Event:connect(function(Type,Data)
local TAB = string.split(tostring(Data[2]), " ")
if TAB[2] == "all" then
Data[1]:Kick()
end
end)
return
end
return Plugin
The plugin is in the “Plugins” folder inside of the loader.
Edit: I modified the main module and everything works now.
I’m not 100% sure if this solves your issue but considering BA is open sourced you could directly modify the code. I’m not sure if this is a good idea as the owner of BA updates the code to fix vulnerabilities.
Doing so isn’t quite possible due to the limited access plugins have, my best advice would be to modify the source of Basic Admin itself and add in whatever you would want, for example in their getplayers plugin you can modify it to send a webhook to your server whenever certain commands use “all” and “others” it would send a webhook.
I’ve worked with the MainModule of B.A.E quite a bit, and have figured out it can be easily edited, but you will most likely have to recode part of what’s connecting to the code you just edited, I would suggest enabling Command Confirmation, but also finding the code that handles it, you can then edit what you want to trigger it, I myself have made it so it permantly bans anybody who presses “Okay” on the command confirmation UI.