mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-15 03:54:43 +02:00
Added /myspawn, a command that will return players to their home with penalties.
This commit is contained in:
@ -96,6 +96,12 @@ public class vMinecraftListener extends PluginListener {
|
||||
Warp home = null;
|
||||
home = etc.getDataSource().getHome(player.getName());
|
||||
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){
|
||||
player.sendMessage(Colors.DarkPurple + "Return here with /myspawn, the penalty for returning is the complete loss of inventory");
|
||||
} else {
|
||||
player.sendMessage(Colors.DarkPurple + "Set your own spawn with /myspawn");
|
||||
}
|
||||
}
|
||||
vMinecraftUsers.getProfile(player).isDead(false);
|
||||
vMinecraftChat.gmsg(Colors.Gray + player.getName() + " " + vMinecraftSettings.randomDeathMsg());
|
||||
|
Reference in New Issue
Block a user