More changes to MySpawn, should correct yet another hook error.

This commit is contained in:
nossr50 2010-12-31 11:05:17 -08:00
parent 10896d4b16
commit e192fd366e

View File

@ -98,13 +98,11 @@ public class vMinecraftListener extends PluginListener {
if (etc.getDataSource().getHome(player.getName()) != null){ if (etc.getDataSource().getHome(player.getName()) != null){
home = etc.getDataSource().getHome(player.getName()); home = etc.getDataSource().getHome(player.getName());
player.teleportTo(home.Location); player.teleportTo(home.Location);
player.sendMessage(Colors.DarkPurple + "Return here with /myspawn");
player.sendMessage(Colors.DarkPurple + "The penalty for returning is the loss of inventory");
} }
//Makes sure the player has a custom home before telling them about /myspawn if(player.canUseCommand("/sethome"))
if(etc.getServer().getSpawnLocation() != etc.getDataSource().getHome(player.getName()).Location){ player.sendMessage(Colors.DarkPurple + "Set your own spawn with /sethome");
vMinecraftChat.sendMessage(player, Colors.DarkPurple + "Return here with /myspawn, the penalty for returning is the complete loss of inventory");
} else {
vMinecraftChat.sendMessage(player, Colors.DarkPurple + "Set your own spawn with /myspawn");
}
} }
vMinecraftUsers.getProfile(player).isDead(false); vMinecraftUsers.getProfile(player).isDead(false);
vMinecraftChat.gmsg(Colors.Gray + player.getName() + " " + vMinecraftSettings.randomDeathMsg()); vMinecraftChat.gmsg(Colors.Gray + player.getName() + " " + vMinecraftSettings.randomDeathMsg());