Delete src/main/java/de/teleportsuite/managers/SpawnManager.java via Git Manager GUI
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
package de.teleportsuite.managers;
|
|
||||||
|
|
||||||
import de.teleportsuite.TeleportSuite;
|
|
||||||
import de.teleportsuite.models.TeleportLocation;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public class SpawnManager {
|
|
||||||
private final TeleportSuite plugin;
|
|
||||||
public SpawnManager(TeleportSuite plugin) { this.plugin = plugin; }
|
|
||||||
|
|
||||||
public void setSpawn(Player player) {
|
|
||||||
TeleportLocation loc = new TeleportLocation(player.getLocation(), plugin.getConfigManager().getServerName());
|
|
||||||
plugin.getDatabaseManager().saveSpawn("spawn", loc);
|
|
||||||
player.sendMessage(plugin.getConfigManager().getMessage("spawn-set"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFirstSpawn(Player player) {
|
|
||||||
TeleportLocation loc = new TeleportLocation(player.getLocation(), plugin.getConfigManager().getServerName());
|
|
||||||
plugin.getDatabaseManager().saveSpawn("firstspawn", loc);
|
|
||||||
player.sendMessage(plugin.getConfigManager().getMessage("firstspawn-set"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void teleportToSpawn(Player player) {
|
|
||||||
TeleportLocation spawn = plugin.getDatabaseManager().getSpawn("spawn");
|
|
||||||
if (spawn == null) { player.sendMessage("§cKein Spawn gesetzt!"); return; }
|
|
||||||
plugin.getTeleportManager().teleport(player, spawn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void teleportToFirstSpawn(Player player) {
|
|
||||||
TeleportLocation firstSpawn = plugin.getDatabaseManager().getSpawn("firstspawn");
|
|
||||||
if (firstSpawn == null) {
|
|
||||||
teleportToSpawn(player);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
plugin.getTeleportManager().teleport(player, firstSpawn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TeleportLocation getRespawnLocation() {
|
|
||||||
return plugin.getDatabaseManager().getSpawn("spawn");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user