From d5351a379c007054583804a2d536d9fe70080544 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 23 May 2020 21:30:20 +0200 Subject: [PATCH] Hotfix Teamcommand Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index f79e6ec..d830b1f 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -386,7 +386,7 @@ public class TeamCommand extends BasicCommand { page = 1; List all = Team.getAll(); - final int lastPage = (all.size() - 1) / 10; + final int lastPage = ((all.size() - 1) / 10) + 1; if(page < 1 || page > lastPage){ BungeeCore.send(player, "§cUngültige Seitenzahl angegeben"); return; @@ -394,7 +394,7 @@ public class TeamCommand extends BasicCommand { BungeeCore.send(player, "§7§lTeamliste §7" + page + "§8/§7" + lastPage); - for(int i = page * TEAMS_PER_PAGE; i < page * TEAMS_PER_PAGE + TEAMS_PER_PAGE && i < all.size(); i++){ + for(int i = (page-1) * TEAMS_PER_PAGE; i < (page-1) * TEAMS_PER_PAGE + TEAMS_PER_PAGE && i < all.size(); i++){ Team tm = all.get(i); BungeeCore.send(player, "§8" + tm.getTeamKuerzel() + " §e" + tm.getTeamName() + " §8[§7" + SteamwarUser.get(tm.getTeamLeader()).getUserName() + "§8]",