mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Implement per-player Weather API. Adds BUKKIT-812
By: T00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
parent
206334875b
commit
4c1cb5c8a7
1 changed files with 13 additions and 0 deletions
|
@ -24,6 +24,7 @@ import org.bukkit.*;
|
|||
import org.bukkit.Achievement;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
|
@ -497,6 +498,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
setPlayerTime(0, true);
|
||||
}
|
||||
|
||||
public void setPlayerWeather(WeatherType type) {
|
||||
getHandle().setPlayerWeather(type, true);
|
||||
}
|
||||
|
||||
public WeatherType getPlayerWeather() {
|
||||
return getHandle().getPlayerWeather();
|
||||
}
|
||||
|
||||
public void resetPlayerWeather() {
|
||||
getHandle().resetPlayerWeather();
|
||||
}
|
||||
|
||||
public boolean isBanned() {
|
||||
return server.getHandle().getNameBans().isBanned(getName().toLowerCase());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue