Added /localspawn - Teleport to the spawnpoint for the current world instead of the global spawnpoint.

This commit is contained in:
StevenLawson 2013-09-13 14:57:33 -04:00
parent 5606fdae1f
commit 8ba477140b
3 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#Sat, 07 Sep 2013 22:46:21 -0400
#Fri, 13 Sep 2013 14:48:43 -0400
program.VERSION=3.2
program.BUILDNUM=575
program.BUILDDATE=09/07/2013 10\:46 PM
program.BUILDNUM=576
program.BUILDDATE=09/13/2013 02\:48 PM

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sat Sep 07 22:46:21 EDT 2013
build.number=576
#Fri Sep 13 14:48:43 EDT 2013
build.number=577

View File

@ -0,0 +1,18 @@
package me.StevenLawson.TotalFreedomMod.Commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = AdminLevel.ALL, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Teleport to the spawn point for the current world.", usage = "/<command>", aliases = "worldspawn,gotospawn")
public class Command_localspawn extends TFM_Command
{
@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;
}
}