mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Added checks when moving a player to their home to make sure they even have a home first. This should take care of some onHealthChange error hooks I got earlier.
This commit is contained in:
parent
3e076d3951
commit
10896d4b16
@ -95,9 +95,10 @@ public class vMinecraftListener extends PluginListener {
|
||||
if(vMinecraftSettings.getInstance().playerspawn())
|
||||
{
|
||||
Warp home = null;
|
||||
if (etc.getDataSource().getHome(player.getName()) != null){
|
||||
home = etc.getDataSource().getHome(player.getName());
|
||||
if(home.Location != null)
|
||||
player.teleportTo(home.Location);
|
||||
}
|
||||
//Makes sure the player has a custom home before telling them about /myspawn
|
||||
if(etc.getServer().getSpawnLocation() != etc.getDataSource().getHome(player.getName()).Location){
|
||||
vMinecraftChat.sendMessage(player, Colors.DarkPurple + "Return here with /myspawn, the penalty for returning is the complete loss of inventory");
|
||||
|
Loading…
Reference in New Issue
Block a user