Skip to content

Commit

Permalink
Merge pull request #17 from project-poseidon-plugin-devs/sleephomefix
Browse files Browse the repository at this point in the history
Fix player teleporting to homes while sleeping
  • Loading branch information
svgaming234 authored Dec 18, 2024
2 parents da516f0 + 6fd0801 commit 4833aa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4833aa5

Please sign in to comment.