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 Folks,

 

I am working on my own mod. One of the features I want to impelement is a teleport (home/sethome) command.

I got everything to work if cheats are allowed, but my command wont work if cheats are disabled.

I also overwrote the getRequiredPermissionLevel, but that doesn't seem to help

 

Here's the code for the execute

 

@Override
public void execute(ICommandSender sender, String[] args)
		throws CommandException {
	if (sender instanceof EntityPlayer)
	{
		EntityPlayer player = (EntityPlayer) sender;

		HomeHelper.setHome(player.getName(), player.getPosition());
		sender.addChatMessage(new ChatComponentText("home set"));
		try {
			HomeHelper.safeDataToFile();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}

 

And the override

 

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

 

Any help would be appreciated.

 

Greetz Fail

Look for the help command and try to use it's code. Otherwise your just out of luck. Also why are you creating a set-home command with forge? This sounds like more of a Bukkit thing...

  • Author

Thank you verry much diesieben07, it works now!

I am using this with forge because I dont think there is a version of Forge and Bukkit for 1.8, or am I wrong?

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.