Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix player teleporting to homes while sleeping #17

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading