Jump to content

[1.15.2] Command identifier


Recommended Posts

Hi, just wondering if there is a way to get identifiers for commands. What I mean is a way to get for example 'modid.command' for a given command. I've been looking into the sources but failed to find something helpful.


I'm currently registering my commands with a CommandDispatcher and a LiteralArgumentBuilder.


EDIT: My goal is the following: My mod forces players to register/login while inside the game (for people who wants to control who can play to their server). As long as a player is not logged in, he/she cannot use any other command. I'd like to allow admins to write in a config files the commands they want to whitelist (I was thinking about 'modid.command' as a format). This is how I'm listening to command calls:

@SubscribeEvent(priority = EventPriority.HIGHEST)
  public static void onCommand(CommandEvent event) {


I'd like to know if it is possible to get a command identifier from 'CommandEvent event'.



Edited by Sunser
Link to comment
Share on other sites

Not sure to understand what you mean by pirated. The use case of my mod is basically any kind of private server targeting a specific community (I did it for my school MC server for example) where admins don't want to force the players (in this example students) to pay for an account. Students can register through a web API which creates their IG account, and then they can login IG.


Does that still won't get any help? :/

Link to comment
Share on other sites

  • Guest locked this topic
This topic is now closed to further replies.


  • Create New...

Important Information

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