From 8ba477140beda75a1497755ed39dc1aa7f8a49a7 Mon Sep 17 00:00:00 2001 From: StevenLawson Date: Fri, 13 Sep 2013 14:57:33 -0400 Subject: [PATCH] Added /localspawn - Teleport to the spawnpoint for the current world instead of the global spawnpoint. --- appinfo.properties | 6 +++--- buildnumber.properties | 4 ++-- .../Commands/Command_localspawn.java | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/me/StevenLawson/TotalFreedomMod/Commands/Command_localspawn.java diff --git a/appinfo.properties b/appinfo.properties index 023033ca..e31635f5 100644 --- a/appinfo.properties +++ b/appinfo.properties @@ -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 diff --git a/buildnumber.properties b/buildnumber.properties index c5bad80e..a436ec33 100644 --- a/buildnumber.properties +++ b/buildnumber.properties @@ -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 diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_localspawn.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_localspawn.java new file mode 100644 index 00000000..3e89d82e --- /dev/null +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_localspawn.java @@ -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 = "/", 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; + } +}