- Functions
Published Jun 1st, 2020, 6/1/20 12:49 pm
- 6,307 views • 2 today
- 384 downloads • 0 today
380
This is a quick pack that I made mainly for my server, but I thought I'd publish here. It's a very lightweight pack to allow certain players (eg. mods) to perform a certain command. You can specify the command and players. This works on vanilla servers, and has no dependencies. This would also work on singleplayer, although I'm not quite sure why you'd want that. (Map making?)
I am very new to functions datapacks, so if you find an error, or have a way to make the pack more efficient, please please please let me know here or on discord @Beatso#1815.
Also, feel free to use this datapack on your server/map etc. Credit would be nice :). You can totally customise this and change things to your heart's content.
Setup and Usage
- Download the file somewhere onto your computer and unzip.
- Navigate to "BPerms/data/bperms/functions".
- Open "setcommand.mcfunction" and setplayers.mcfunction with Notepad++ or similar.
- In "setcommand.mcfunction", underneath the comment, type the command(s) you wish to run when the trigger is run. Separate commands should go on separate lines. Do not prefix the commands with a forwards slash. Once you're done, save and close the file. Note: if you used a command like /ban or /stop, you will need to make sure you have the relevant function-permission-level in server.properties.
- In "setplayers.mcfunction", on line 4, replace "PLAYERNAME" with the name of a player you wish to grant permissions. You can copy and paste this line as many times as you would like, each with a different player. You can also use target selectors to do things like grant permissions to a certain team. Once you're done, save and close the file.
- Navigate back to the folder "BPerms", and copy the folder into your world datapacks folder. More info here.
- Once you have installed your datapack, the players you specified will be able to type the following command: /trigger BPerms
This will run all the commands you specified in setcommand.mcfunction.
I am very new to functions datapacks, so if you find an error, or have a way to make the pack more efficient, please please please let me know here or on discord @Beatso#1815.
Also, feel free to use this datapack on your server/map etc. Credit would be nice :). You can totally customise this and change things to your heart's content.
| © Beatso. Terms of Usage |
| Credit | Thanks to Bertiecrafter for showing me how to make functions datapacks. |
| Compatibility | Minecraft 1.13 |
| to | Minecraft 1.16 |
| Tags |
4608696
119





Have something to say?
If you need to check for a team you can do @a[team=teamname]
thx for letting me know :)