diff --git a/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/commands/CommandHome.java b/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/commands/CommandHome.java index 027d58f..3b7535d 100644 --- a/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/commands/CommandHome.java +++ b/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/commands/CommandHome.java @@ -106,6 +106,10 @@ public boolean onCommand(CommandSender commandSender, Command command, String s, commandSender.sendMessage(FundamentalsLanguage.getInstance().getMessage("home_in_invalid_world")); return true; } + if (player.isSleeping()) { + commandSender.sendMessage(FundamentalsLanguage.getInstance().getMessage("home_is_sleeping")); + return true; + } Location home = targetPlayer.getPlayerHome(homeName); Location safeLocation; try { diff --git a/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/settings/FundamentalsLanguage.java b/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/settings/FundamentalsLanguage.java index eb4778e..e0895eb 100644 --- a/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/settings/FundamentalsLanguage.java +++ b/FundamentalsCore/src/main/java/com/johnymuffin/beta/fundamentals/settings/FundamentalsLanguage.java @@ -42,6 +42,7 @@ private void loadDefaults() { map.put("home_non_recorded", "&6Sorry, you have no homes on record. Please set one with /sethome"); map.put("home_not_on_record", "&6Sorry, we couldn't find a home with that name. Do /homes for a list of homes"); map.put("home_in_invalid_world", "&4Sorry, your home is in an invalid world."); + map.put("home_is_sleeping", "&6Sorry, you can't teleport to a home while sleeping."); map.put("home_teleport_successfully", "&6You have been teleported to your home &b%var1%"); map.put("home_use_homes", "&6Use &a/homes&6 for a more feature rich home list."); //Homesearch