Add isServer and isClient methods to LogicalSide (#5606)

* Add helper methods to LogicalSide.

* Fix backwards docs.
This commit is contained in:
Benjamin K 2019-07-08 19:44:35 -07:00 committed by LexManos
parent 3fe08f149d
commit 201c368325
1 changed files with 17 additions and 1 deletions

View File

@ -21,5 +21,21 @@ package net.minecraftforge.fml;
public enum LogicalSide
{
CLIENT, SERVER
CLIENT, SERVER;
/**
* @return if the logical side is a server.
*/
public boolean isServer()
{
return !isClient();
}
/**
* @return if the logical side is a client.
*/
public boolean isClient()
{
return this == CLIENT;
}
}