updateTemperature
public static void updateTemperature(org.bukkit.entity.Player player)
Updates the temperature of the given player.
The temperature in- or decreases, based on the region temperature.
If it is night a value of 3 is subtracted from the base value.
The temperature displayed to the player is randomized,
by a value of plus/minus 2, to simulate temperature fluctuation.
After that the timers for heat/cold resistances are decreased.
If the temperature is above 8 and the player has no heat resistance,
the player receives 2 damage and gets a hunger III effect.
If the temperature is below 2 and the player has no cold resistance,
the player receives 2 damage and gets a slowness III effect.
For these cases a warning will be shown on screen.
- Parameters:
player
- The player whose temperature should be updated.
- See Also:
WauzRegion.getTemperature()
,
WauzPlayerDataSectionStats.setHeat(byte)
,
WauzPlayerDataSectionStats.setHeatRandomizer(byte)
,
WauzPlayerDataSectionStats.getEffects()