Jump to content

Recommended Posts

Posted (edited)
8 minutes ago, SecondAmendment said:

So no way of checking if a command gets sent client side

 
 

If you mean "executed by the player", you can just check if the ICommandSender is an instanceof EntityPlayerMP using CommandEvent#getSender. If you actually mean client-side, check if it was sent by EntityPlayerSP. However, basically every single vanilla command is sent from the server (hence the EntityPlayerMP). The only exception is when chat messages are sent from a GUI.

Edited by TheMasterGabriel
Posted (edited)

So lets say i go on a server and lets say that I made a command called /modinfo and I want it to present information as a result to the client on a server that doesnt use the mod. Would it work?

Edited by SecondAmendment

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.