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

Hi, I need to stop the dedicated server, but I can't figure out how to do it. I thought about using MinecraftServer::initiateShutdown(), as it's the only thing I found to do it, but I can't figure out how to get the MinecraftServer instance.

 

Please help, thanks

Edited by Smyler

Why would you want to shut the integrated server down? That doesn't sound like a good thing....

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

I have a world generator that needs internet access to fetch data through a web API which requires a token. I want to stop the integrated server if the token is invalid and display a message in the logs. I need to do something equivalent for the integrated server, I think through a GUI, but I can't so far because the spawn area is generated before the server starts, and because I can't get an instance of the dedicated server (not the integrated, I made a mistake in my last post).

  • Author

Mapbox, I am generating a map of the world, so it has to be done while generating.

  • Author

Sorry, I don't really understand what you mean, English is not my primary language.

I am using Mapbox's API to download the heightmap used by my IChunkGenerator, and so I need to be able to cancel the world creation if the token is invalid (If I get a 401 response from the web API), from IChunkGenerator::provideChunk(), as each chunk can be on a new tile to download and as the token can be invalidated if the player makes more requests than he is able to with his Mapobox account.

Ideally, a GUI prompting for a valid token should be displayed on the client and a message asking to edit the config file printed to stdout on the dedicated server.

I don't think this is possible but if you have any idea how to make something similar please tell because I want to do something user-friendly and at the moment, the token is stored in the config and having an invalid one will simply crash the game.

 

Here is the github: https://github.com/ZeSmiler/irlw/tree/0.2_dev

  • Author

Even on the client game? There is no way to show a GUI when the world is being generated by the integrated server?

  • Author

And how can I stop the dedicated server without just crashing it? I can't find any way to get an instance like I would do on the client with Minecratf#getMinecraft()

  • Author

Ok, thanks for your help, I think I will try the hard thing first for the client game as I don't want to completely crash the clientit, but maybe I will come back at it later with more experience if I can't find a way to work around it.

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.