Some more encapsulation

This commit is contained in:
Daniil Z committed 2021-03-01 21:05:59 +03:00
1 parent afafcee2bb
commit 45f99cacf6
8 files changed
+33 -17

No files matched your search

@@ -11,8 +11,8 @@ public class SpawnCommand extends CommandBase {
@Override
protected boolean onCommand(Player p, Command command, String label, String[] args) {
if (HuskHomes.getSettings().doSpawnCommand()) {
if (TeleportManager.spawnLocation != null) {
TeleportManager.queueTimedTeleport(p, TeleportManager.spawnLocation);
if (TeleportManager.getSpawnLocation() != null) {
TeleportManager.queueTimedTeleport(p, TeleportManager.getSpawnLocation());
} else {
MessageManager.sendMessage(p, "error_spawn_undefined");
}