Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (ā‹®) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey,

I tried to make an simple item, that executes a command when you right click. The command is stored as NBT data. It is for mapmakers, so it's only obtainable through the /give with NBT data tags. The item should work like a portable command block. Everyone can use it, even if he doesn't have the necessary rights to execute the command manually. But the only one who is able to create and hand out these items is the admin because he is the only one that can use the /give command. Now to my problem. IĀ  overrode the onItemRightClick() method. Here is my code:Ā  https://gist.github.com/VoidCatz/3be9f4b44d1334c20e67 (Gist) The problem is that the command is executed twice when I right click. The other problem is that non-op players can't execute op commands. How can I solve these problems?

Edit 1: The execute twice issue works now... I had to test if(!world.isClient()) To solve the other issue I will have to look into the abstract class CommandBlockLogic... I hate obfuscated code...

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.