0

So my problem is pretty small and the datapack I am currently coding as well.

I want a simple command, where on execute the executer joins a team and if he already is in that team, he leaves it. Very simple. It is for an Server of mine, where a prefix should appear on command, so the team option is probably the easiest.

Problem is, that the command should look like /example and not like /trigger example. Is that even possible with datapacks, or should I just use a plugin?

The datapack structure is pretty small, there are only two functions, the one that runs on load and the one running on ticks.

The creaton of the team btw looks like this:

# This is the creation of the Team

team add live
team modify live prefix {"text":"live ","color":"red","bold":true,"italic":true}

Also, if anybody knows how to use only this one command like I said to enable and disable the team, so detect, whether a player is already in that team or not that would also help a lot.

1
  • If you're on platform like spigot, paper etc, I suggest you to use a plugin yes Commented Mar 13, 2024 at 7:37

1 Answer 1

0

Unfortunately, there's no good way to create a command with a datapack without /trigger.

You can use a plugin however, you just need a Paper or SpigotMC server.
There are lots of good resources for making plugins, but in my opinion the most useful is Spigot Plugin Development on the SpigotMC wiki. It details the entire process of making a plugin and is a good reference.

Sign up to request clarification or add additional context in comments.

1 Comment

I already loocked into making this with an plugin, but the server is not mine and the plugin I would write would probably collide with their permission system. Thank you tho for the help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.