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

Hello.

 

I am relatively new to Minecraft Modding and have watched 46 Java tutorials already and read a few as well. Not to mention the other 30 something videos I watched for Minecraft Modding. In an effort to further my understanding I wanted to create a Mod that added a wide range of commands, and as i learn i'll let them yield things. I have about 28 command classes already made and they all implement the ICommand interface, but I had questions on how to improve them.

 

#1. If i have a command that is /home and another that is /home 1 the game will only let me execute the /home, not the /home 1.

 

#2. How can command creation be more efficient? I see lots of people use CommandMapper, CommandBase, CommandWrapper classes.

 

#3. How can I color the message or text that is being printed to the user when they enter a command?

 

#4. How can I add permission nodes to each command?

 

Additionally I wanted to keep each Command's class simple with relatively 10-15 lines of code depending on what they have to yield. This is why I wanted to create some sort of CommandHandler or CommandManager that acts like an interface or annotation. That way I could just create a new command class and do @ Command { name, alias, usage, message} to create a command. This helps because instead of having to fill out the "template" from iCommand, i can do it in far less lines.

 

Many thanks in advance.

 

Edited by Andrew2070

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.