Merge remote-tracking branch 'origin/master'

This commit is contained in:
William committed 2023-06-01 10:37:11 +01:00
commit 9ca8492105
5 files changed
+12 -6

No files matched your search

@@ -35,7 +35,10 @@ public class BackCommand extends InGameCommand {
protected BackCommand(@NotNull HuskHomes plugin) {
super("back", List.of(), "", plugin);
addAdditionalPermissions(Map.of("death", false));
addAdditionalPermissions(Map.of(
"death", false,
"previous", false
));
}
@Override
@@ -62,7 +62,10 @@ public class Teleport {
this.economyActions = actions;
this.async = plugin.getSettings().doAsynchronousTeleports();
this.updateLastPosition = updateLastPosition && plugin.getCommand(BackCommand.class)
.map(command -> executor.hasPermission(command.getPermission()))
.map(command ->
executor.hasPermission(command.getPermission()) &&
executor.hasPermission(command.getPermission("previous"))
)
.orElse(false);
}