Registering custom reactions
You can provide custom reactions with the built-in ReactionManager
. Let's take a look at this example:
Registering a custom reaction
var category = "social"; // The category of your reaction. We recommend using your plugin's name.
var name = "example"; // The name of this reaction. Use a descriptive but short name
var textureUrl = "http://textures.minecraft.net/texture/4ecb3afe9d982d1e1f762c3b13edd8d167dfb964d990163614cb8280ee343a"; // The URL of this reaction's textures
var sound = Sound.sound(Key.key("entity.wolf.ambient"), Sound.Source.PLAYER, 0.75f, 1.5f); // The sound that will be played when this reaction is triggered
var triggerWords = List.of("woof"); // List of words that will trigger this reaction
var reaction = new Reaction(name, textureUrl, sound, triggerWords);
Social.get().getReactionManager().registerReaction(category, reaction);
Hidden reactions
If you want to code some reactions that aren't discoverable by command auto-completion, you can use the hidden category: