GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 122 forks source link

Fixed console check on headless environments #587

Closed johnnyapol closed 9 years ago

johnnyapol commented 9 years ago

Addresses #586

What this does is re-enables and patches the console check to work on environments that are not headless (meaning they have a display, keyboard, or mouse) and if they support the Desktop AWT apis. This allows the application to run on headless servers but blocks people double clicking on windows the jar file.

This was tested on a Windows 8.1 (x64) machine running the latest Java 8 update (oracle JVM), with and without the -Djava.awt.headless=true flag.

EDIT:

This is my first PR to the Glowstone project, so forgive me If I have not followed protocol correctly.

turt2live commented 9 years ago

This PR is small enough that it would be preferred to be discussed on IRC with SpaceManiac or on the ticket itself.

Thanks for your contribution however!