Replicated API is a basic connection between the client-side script where you use it, and the main Blueberry API. It is a remote-event based system that allows you to request warnings or bans from a client-side (local) script.



Step 1: finding the events folder


As already mentioned, it is a remote event based system. Therefore, you will have to fire a remote event every time you wish to use it. To do this, we recommend storing the path to the events folder in a variable.


local BlueberryAPI = game:GetService("ReplicatedStorage"):WaitForChild("Blueberry_Replicated"):WaitForChild("Replicated_API")


For this to exist, make sure you set the "Use replicated API" setting to true in the system configuration.

Also, make sure that you have set up the group configuration as this will be required to check if the player has permission to use the specific function or not.




Step 2: using Blueberry events


Using the events is exactly like using the main API. The only difference is that these events are being fired instead of you calling a function.


Existing events:


Create warnings:

BlueberryAPI.createWarning:FireServer(username, reason, moderator)


Remove warnings:

BlueberryAPI.removeWarning:FireServer(username, reason, moderator)


Create temporary bans:

BlueberryAPI.tempBan:FireServer(username, duration, reason, moderator)


Create permanent bans:

BlueberryAPI.permBan:FireServer(username, reason, moderator)


Remove permanent bans:

BlueberryAPI.removeBan:FireServer(username, reason, moderator)


  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • duration (mandatory) should be a number. It should contain the duration in minutes of how long the player should be banned. It not specified, it will be automatically set to 30 seconds.
  • reason (optional) should be a string. It should contain the reason for the warning removal. If there is no reason specified, it will be automatically set to 'No reason provided for this warning removal'.
  • moderator should be a string. It should contain the name/username of the moderator who removed the warning, and not a player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.





Security


As said before, there is a server-side script that will check if the client that fired the events has a high enough rank in the specified group to use that function.