summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsSpawn')
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java7
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java3
2 files changed, 6 insertions, 4 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
index fe1630b4d..f29707b82 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
@@ -7,6 +7,7 @@ import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import static com.earth2me.essentials.I18n._;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
+import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Commandspawn extends EssentialsCommand
@@ -24,7 +25,7 @@ public class Commandspawn extends EssentialsCommand
if (args.length > 0 && user.isAuthorized("essentials.spawn.others"))
{
final User otherUser = getPlayer(server, args, 0);
- otherUser.getTeleport().respawn(charge);
+ otherUser.getTeleport().respawn(charge, TeleportCause.COMMAND);
if (!otherUser.equals(user))
{
otherUser.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn"));
@@ -33,7 +34,7 @@ public class Commandspawn extends EssentialsCommand
}
else
{
- user.getTeleport().respawn(charge);
+ user.getTeleport().respawn(charge, TeleportCause.COMMAND);
}
}
@@ -45,7 +46,7 @@ public class Commandspawn extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0);
- user.getTeleport().respawn(null);
+ user.getTeleport().respawn(null, TeleportCause.COMMAND);
user.sendMessage(_("teleportAtoB", user.getDisplayName(), "spawn"));
sender.sendMessage(_("teleporting"));
}
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index 6bb453f12..8c3678a92 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -9,6 +9,7 @@ import org.bukkit.Location;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerRespawnEvent;
+import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class EssentialsSpawnPlayerListener extends PlayerListener
@@ -84,7 +85,7 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
{
try
{
- user.getTeleport().now(spawns.getSpawn(ess.getSettings().getNewbieSpawn()), false);
+ user.getTeleport().now(spawns.getSpawn(ess.getSettings().getNewbieSpawn()), false, TeleportCause.PLUGIN);
}
catch (Exception ex)
{