mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
Implement per-player Weather API. Adds BUKKIT-812
By: T00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
parent
206334875b
commit
4c1cb5c8a7
@ -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 New Issue
Block a user