mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Send error if not enough players to do /tpall
This commit is contained in:
1 parent
6a2161434e
commit
2dd0bbb9d8
2 files changed
+6
-1
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package me.william278.huskhomes2.commands;
|
||||
|
||||
import me.william278.huskhomes2.HuskHomes;
|
||||
import me.william278.huskhomes2.MessageManager;
|
||||
import me.william278.huskhomes2.teleport.TeleportManager;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -9,6 +10,10 @@ public class TpAllCommand extends CommandBase {
|
||||
|
||||
@Override
|
||||
protected void onCommand(Player p, Command command, String label, String[] args) {
|
||||
if (HuskHomes.getPlayerList().getPlayers().size() <= 1) {
|
||||
MessageManager.sendMessage(p, "error_no_other_online_players");
|
||||
return;
|
||||
}
|
||||
TeleportManager.teleportAllHere(p);
|
||||
MessageManager.sendMessage(p, "teleporting_all_players");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user