Singleplayer Utilities
Allows checking whether a player is the host of a Singleplayer World
Introduction
A fully functional Version of this class has first been introduced in Version 2.1.0
The Singleplayer Utilities class allows check whether a ServerPlayer is the host of a Singleplayer World.
This may be useful when your Mod includes banning players but you don't want to ban the world host as otherwise their world wouldn't get saved properly and other players would get kicked.
Class
File: SingleplayerUtils.java
Package: dev.soncresityindustries.es.api.v0.util
Methods
isSingleplayerHost
public static boolean isSingleplayerHost(@NotNull ServerPlayer player) {}Usage
boolean isHost = SingleplayerUtils.isSingleplayerHost(player);