Jump to content

Where is the field that handles when a player right clicks a block.(SOLVED)


Recommended Posts

Posted
1 hour ago, diesieben07 said:

What?

SubscribeEvent
    public void onPlayerInteract(PlayerInteractEvent evt) {
        // only handle right clicks on blocks
        // TODO: port for 1.9
        if (evt.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
            return;
        }
        

It's from an older version, I'm trying to update it

Posted (edited)
On 10/31/2017 at 0:21 AM, diesieben07 said:

PlayerInteractEvent still exists, it has several sub-events now.

Figured it out now.

 

SubscribeEvent
    public void onPlayerInteract(PlayerInteractEvent.RightClickBlock evt) {
        }

 

Edited by TheRPGAdventurer

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.