Additional check in get() to, on one hand, prevent a NullPointerException on (new) line 40 which would be caused when using the API in a program (the gamemode) without having a server running (testing in IDE for example) and also for easy checking for if the code runs inside the server plugin or not (instead of having to catch the NPE from get()).
Additional check in get() to, on one hand, prevent a NullPointerException on (new) line 40 which would be caused when using the API in a program (the gamemode) without having a server running (testing in IDE for example) and also for easy checking for if the code runs inside the server plugin or not (instead of having to catch the NPE from get()).