Jump to content

Akke

Members
  • Posts

    4
  • Joined

  • Last visited

Akke's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So i made this code (in 1.15.2): @Mod.EventBusSubscriber public class Events { @SubscribeEvent public static void CommandEvent(CommandEvent event) { String cmd = event.getParseResults().getReader().getString(); cmd.replace("%value%", "example"); } } But i cant find how i can edit the command itself before it gets executed. I can't use ChatEvent because i also want to edit the commands from a command block, thanks for the help.
  2. Ok that worked, i was able to cancel the command, but how can i modify the command it self when i have the event?
  3. Hello, i was wondering how i can intercept a command, so i can replace certain things in the command and then execute the command when it's edited. I want to be able to use variables inside my commands, like %variableName%, those get then changed to the value of the variable, thanks for the help.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.