mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
24 lines
832 B
Java
24 lines
832 B
Java
package me.william278.huskhomes2.commands;
|
|
|
|
import me.william278.huskhomes2.HuskHomes;
|
|
import me.william278.huskhomes2.MessageManager;
|
|
import me.william278.huskhomes2.teleport.TeleportManager;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.entity.Player;
|
|
|
|
public class SpawnCommand extends CommandBase {
|
|
|
|
@Override
|
|
protected void onCommand(Player p, Command command, String label, String[] args) {
|
|
if (HuskHomes.getSettings().doSpawnCommand()) {
|
|
if (TeleportManager.getSpawnLocation() != null) {
|
|
TeleportManager.queueTimedTeleport(p, TeleportManager.getSpawnLocation());
|
|
} else {
|
|
MessageManager.sendMessage(p, "error_spawn_undefined");
|
|
}
|
|
} else {
|
|
MessageManager.sendMessage(p, "error_command_disabled");
|
|
}
|
|
}
|
|
}
|