Package net.lewmc.essence.environment
Class UtilEnvironment
java.lang.Object
net.lewmc.essence.environment.UtilEnvironment
The environment utility.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStores preset timesstatic enumStores preset weather. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetPlayerTime(org.bukkit.entity.Player p) Gets the time of the requested player.getPlayerWeather(org.bukkit.entity.Player p) Gets the weather of the requested player.longgetTime(org.bukkit.World w) Gets the time of the requested world.getWeather(org.bukkit.World w) Gets the weather of the requested world.booleansetPlayerTime(org.bukkit.entity.Player p, long t) Sets the time of the requested playerbooleansetPlayerTime(org.bukkit.entity.Player p, UtilEnvironment.Time t) Sets the time of the requested playerbooleansetPlayerWeather(org.bukkit.entity.Player p, UtilEnvironment.Weather we) Sets the weather in the requested worldbooleansetTime(org.bukkit.World wo, long t) Sets the time in the requested worldbooleansetTime(org.bukkit.World wo, UtilEnvironment.Time t) Sets the time in the requested worldbooleansetWeather(org.bukkit.World wo, UtilEnvironment.Weather we) Sets the weather in the requested world
-
Constructor Details
-
UtilEnvironment
public UtilEnvironment()
-
-
Method Details
-
getWeather
Gets the weather of the requested world.- Parameters:
w- World - The world requested.- Returns:
- Weather - The active weather type.
-
setWeather
Sets the weather in the requested world- Parameters:
wo- World - The worldwe- Weather - The weather- Returns:
- boolean - Success?
-
getPlayerWeather
Gets the weather of the requested player.- Parameters:
p- Player - The player requested.- Returns:
- Weather - The active weather type.
-
setPlayerWeather
Sets the weather in the requested world- Parameters:
p- Player - The playerwe- Weather - The weather- Returns:
- boolean - Success?
-
getTime
public long getTime(org.bukkit.World w) Gets the time of the requested world.- Parameters:
w- World - The world requested.- Returns:
- long - The time.
-
setTime
Sets the time in the requested world- Parameters:
wo- World - The worldt- Time - The preset time- Returns:
- boolean - Success?
-
setTime
public boolean setTime(org.bukkit.World wo, long t) Sets the time in the requested world- Parameters:
wo- World - The worldt- long - The numeric time- Returns:
- boolean - Success?
-
getPlayerTime
public long getPlayerTime(org.bukkit.entity.Player p) Gets the time of the requested player.- Parameters:
p- Player - The player requested.- Returns:
- long - The player time.
-
setPlayerTime
Sets the time of the requested player- Parameters:
p- Player - The playert- Time - The preset time- Returns:
- boolean - Success?
-
setPlayerTime
public boolean setPlayerTime(org.bukkit.entity.Player p, long t) Sets the time of the requested player- Parameters:
p- Player - The playert- long - The numeric time- Returns:
- boolean - Success?
-