geforkt von Mirrors/Paper
Added getBedSpawnLocation to CraftPlayer. Thanks fernferret!
Dieser Commit ist enthalten in:
Ursprung
3f04f04be6
Commit
905b977670
@ -22,6 +22,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Note;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.map.CraftMapView;
|
||||
@ -483,4 +484,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void setFoodLevel(int value) {
|
||||
getHandle().getFoodData().foodLevel = value;
|
||||
}
|
||||
|
||||
public Location getBedSpawnLocation() {
|
||||
World world = getServer().getWorld(getHandle().spawnWorld);
|
||||
if (world != null) {
|
||||
return new Location(world, getHandle().getBed().x, getHandle().getBed().y, getHandle().getBed().z);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren