forked from SteamWar/SteamWar
Add RegionSystem.getWorldSpawn
Fix Warp Update FixedRegionSystem
This commit is contained in:
+8
@@ -23,6 +23,7 @@ import de.steamwar.bausystem.region.fixed.FixedGlobalRegion;
|
||||
import de.steamwar.bausystem.region.fixed.loader.PrototypeLoader;
|
||||
import de.steamwar.bausystem.region.fixed.loader.RegionLoader;
|
||||
import lombok.NonNull;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -45,6 +46,13 @@ public class FixedRegionSystem implements RegionSystem {
|
||||
public void save() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Location getWorldSpawn() {
|
||||
Location spawnLocation = Bukkit.getWorlds().get(0).getSpawnLocation();
|
||||
Location spawnPoint = Bukkit.getWorlds().get(0).getHighestBlockAt(spawnLocation).getLocation();
|
||||
return spawnPoint.add(0.5, 1, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region getGlobalRegion() {
|
||||
return FixedGlobalRegion.INSTANCE;
|
||||
|
||||
Reference in New Issue
Block a user