Jump to content

Recommended Posts

Posted

Hi guys,

again after several researches on Google I'm asking for your help.

 

I'm writing a ClientOnly mod and I would like to add a Chat Command and register it only on the Client Side.

In all the tutorials that I've found they register the Command class on the server. It is possible to register the Command on the client side only?

Posted

I've tried this, but it doesn't work:

@EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.init();
    ClientCommandHandler.instance.registerCommand(new CommandParty());
}

 

I moved the line into my ClientProxy but, as expected, nothing changed.

Posted

diesieben07 helped me on the #minecraftforge irc channel.

You just need to add this to the class that extends CommandBase:

@Override
public int getRequiredPermissionLevel()
{
    return 0;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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