diff --git a/libs/FrozedTablist-4.0-SNAPSHOT.jar b/libs/FrozedTablist-4.0-SNAPSHOT.jar deleted file mode 100644 index 51158d2..0000000 Binary files a/libs/FrozedTablist-4.0-SNAPSHOT.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index 60f55d7..e266c31 100644 --- a/pom.xml +++ b/pom.xml @@ -130,14 +130,5 @@ provided - - - club.frozed.tablist - FrozedTablist - 4.0-SNAPSHOT - ${project.basedir}/libs/FrozedTablist-4.0-SNAPSHOT.jar - system - - diff --git a/src/main/java/rip/tilly/bedwars/BedWars.java b/src/main/java/rip/tilly/bedwars/BedWars.java index fb91c47..f104d50 100644 --- a/src/main/java/rip/tilly/bedwars/BedWars.java +++ b/src/main/java/rip/tilly/bedwars/BedWars.java @@ -1,6 +1,5 @@ package rip.tilly.bedwars; -import club.frozed.tablist.FrozedTablist; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -26,7 +25,6 @@ import rip.tilly.bedwars.managers.queue.QueueManager; import rip.tilly.bedwars.menusystem.PlayerMenuUtil; import rip.tilly.bedwars.providers.placeholderapi.PlaceholderAPIProvider; import rip.tilly.bedwars.providers.scoreboard.ScoreboardProvider; -import rip.tilly.bedwars.providers.tablist.TablistProvider; import rip.tilly.bedwars.utils.CC; import rip.tilly.bedwars.utils.aether.Aether; import rip.tilly.bedwars.utils.config.file.Config; @@ -144,7 +142,6 @@ public final class BedWars extends JavaPlugin { private void loadRunnables() { new Aether(this, new ScoreboardProvider()); - new FrozedTablist(this, new TablistProvider(), 0, 20); } public PlayerMenuUtil getPlayerMenuUtil(Player player) { diff --git a/src/main/java/rip/tilly/bedwars/providers/tablist/TablistProvider.java b/src/main/java/rip/tilly/bedwars/providers/tablist/TablistProvider.java deleted file mode 100644 index db8a1b2..0000000 --- a/src/main/java/rip/tilly/bedwars/providers/tablist/TablistProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -package rip.tilly.bedwars.providers.tablist; - -import club.frozed.tablist.adapter.TabAdapter; -import club.frozed.tablist.entry.TabEntry; -import club.frozed.tablist.skin.Skin; -import com.google.common.collect.Lists; -import com.mojang.authlib.GameProfile; -import com.mojang.authlib.properties.Property; -import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; -import org.bukkit.entity.Player; -import rip.tilly.bedwars.BedWars; -import rip.tilly.bedwars.playerdata.PlayerData; -import rip.tilly.bedwars.utils.CC; - -import java.util.List; - -public class TablistProvider implements TabAdapter { - - private final BedWars plugin = BedWars.getInstance(); - - @Override - public String getHeader(Player player) { - return CC.translate("&d&lTilly RIP &7┃ &fBedWars"); - } - - @Override - public String getFooter(Player player) { - return CC.translate("&7tilly.rip"); - } - - @Override - public List getLines(Player player) { - List lines = Lists.newArrayList(); - int column = 0; - int row = 0; - for (Player online : Bukkit.getOnlinePlayers()) { - if (online == null) { - break; - } - GameProfile onlineSkin = ((CraftPlayer) online).getProfile(); - Property onlineProperty = onlineSkin.getProperties().get("textures").stream().findFirst().orElse(null); - - assert onlineProperty != null; - lines.add(new TabEntry(column, row, online.getDisplayName()).setPing(((CraftPlayer) online).getHandle().ping).setSkin(new Skin(onlineProperty.getValue(), onlineProperty.getSignature()))); - if (column++ < 2) { - continue; - } - column = 0; - if (row++ < 19) { - continue; - } - row = 0; - } - - GameProfile skin = ((CraftPlayer) player).getProfile(); - Property property = skin.getProperties().get("textures").stream().findFirst().orElse(null); - - PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId()); - - lines.add(new TabEntry(3, 2, CC.translate("&d&lYour Profile")).setPing(-1).setSkin(new Skin(property.getValue(), property.getSignature()))); - lines.add(new TabEntry(3, 3, CC.translate(" &fKills: &d" + playerData.getKills())).setPing(-1)); - lines.add(new TabEntry(3, 4, CC.translate(" &fDeaths: &d" + playerData.getDeaths())).setPing(-1)); - - return lines; - } -}