Archived
0

добавлен метод установки спавна

This commit is contained in:
2018-10-08 13:40:55 +03:00
parent b21933b381
commit 72017a86bb
2 changed files with 6 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ public interface World {
WorldType getWorldType(); WorldType getWorldType();
EntityLocation getSpawn(); EntityLocation getSpawn();
void setSpawn(double x, double y, double z, float yaw, float pitch); void setSpawn(EntityLocation location);
default void setSpawn(double x, double y, double z, float yaw, float pitch) {
setSpawn(new EntityLocation(x, y, z, yaw, pitch));
}
default void setSpawn(double x, double y, double z) { default void setSpawn(double x, double y, double z) {
setSpawn(x, y, z, 0f, 0f); setSpawn(x, y, z, 0f, 0f);
} }

View File

@@ -39,8 +39,8 @@ public class SimpleWorld implements World {
} }
@Override @Override
public void setSpawn(double x, double y, double z, float yaw, float pitch) { public void setSpawn(EntityLocation location) {
this.spawn = new EntityLocation(x, y, z, yaw, pitch); this.spawn = location;
} }
@Override @Override