mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
fix: don't serve private home TAB suggestions w/o perms, close #649
This commit is contained in:
2 files changed
+3
-4
No files matched your search
@@ -238,10 +238,8 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
private List<String> suggestHome(@NotNull CommandUser executor, @NotNull String[] args) {
|
private List<String> suggestHome(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
return switch (args.length) {
|
return switch (args.length) {
|
||||||
case 0, 1 -> {
|
case 0, 1 -> {
|
||||||
if (args.length == 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)) {
|
if (args.length == 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)
|
||||||
if (executor.hasPermission(getOtherPermission())) {
|
&& executor.hasPermission(getOtherPermission())) {
|
||||||
yield plugin.getManager().homes().getUserHomeIdentifiers();
|
|
||||||
}
|
|
||||||
yield plugin.getManager().homes().getUserHomeIdentifiers();
|
yield plugin.getManager().homes().getUserHomeIdentifiers();
|
||||||
}
|
}
|
||||||
if (executor instanceof OnlineUser user) {
|
if (executor instanceof OnlineUser user) {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
public interface FabricTask extends Task {
|
public interface FabricTask extends Task {
|
||||||
|
|
||||||
ScheduledExecutorService ASYNC_EXEC = Executors.newScheduledThreadPool(4,
|
ScheduledExecutorService ASYNC_EXEC = Executors.newScheduledThreadPool(4,
|
||||||
new ThreadFactoryBuilder()
|
new ThreadFactoryBuilder()
|
||||||
.setDaemon(true)
|
.setDaemon(true)
|
||||||
|
|||||||
Reference in new issue
Block a user