2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.commands;
|
2013-09-13 18:57:33 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.permission.PlayerRank;
|
2013-09-13 18:57:33 +00:00
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
@CommandPermissions(level = PlayerRank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
2013-09-13 18:57:33 +00:00
|
|
|
@CommandParameters(description = "Teleport to the spawn point for the current world.", usage = "/<command>", aliases = "worldspawn,gotospawn")
|
2015-10-19 17:43:46 +00:00
|
|
|
public class Command_localspawn extends FreedomCommand
|
2013-09-13 18:57:33 +00:00
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
|
|
{
|
|
|
|
sender_p.teleport(sender_p.getWorld().getSpawnLocation());
|
|
|
|
playerMsg("Teleported to spawnpoint for world \"" + sender_p.getWorld().getName() + "\".");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|