mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
fix: /tpaall and /tpall using wrong user list check, close #747
This commit is contained in:
2 files changed
+5
-2
No files matched your search
@@ -43,7 +43,7 @@ public class TpAllCommand extends InGameCommand {
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull OnlineUser executor, @NotNull String[] args) {
|
||||
if (plugin.getGlobalUserList().size() <= 1) {
|
||||
if (plugin.getUserList().size() <= 1) {
|
||||
plugin.getLocales().getLocale("error_no_players_online")
|
||||
.ifPresent(executor::sendMessage);
|
||||
return;
|
||||
@@ -52,6 +52,9 @@ public class TpAllCommand extends InGameCommand {
|
||||
final Position targetPosition = executor.getPosition();
|
||||
try {
|
||||
for (OnlineUser user : plugin.getOnlineUsers()) {
|
||||
if (!user.isValid()) {
|
||||
continue;
|
||||
}
|
||||
Teleport.builder(plugin)
|
||||
.teleporter(user)
|
||||
.target(targetPosition)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TpaAllCommand extends InGameCommand {
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull OnlineUser executor, @NotNull String[] args) {
|
||||
if (plugin.getGlobalUserList().size() <= 1) {
|
||||
if (plugin.getUserList().size() <= 1) {
|
||||
plugin.getLocales().getLocale("error_no_players_online")
|
||||
.ifPresent(executor::sendMessage);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user