Cleaned up SkyblockScoreboard a little bit more.

This commit is contained in:
Joel 2021-03-17 18:06:39 +01:00
parent e5490774ba
commit d602ef17fa

@ -1,6 +1,7 @@
package zone.themcgamer.skyblock.scoreboard; package zone.themcgamer.skyblock.scoreboard;
import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI; import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer; import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -33,7 +34,6 @@ public class SkyblockScoreboard extends WritableScoreboard {
LocalDateTime dateTime = LocalDateTime.now(); LocalDateTime dateTime = LocalDateTime.now();
write("§7" + dateTime.getMonth().getValue() + "/" + dateTime.getDayOfMonth() + "/" + dateTime.getYear()); write("§7" + dateTime.getMonth().getValue() + "/" + dateTime.getDayOfMonth() + "/" + dateTime.getYear());
writeBlank(); writeBlank();
write("§e┋ Account"); write("§e┋ Account");
write("§e┋ §fRank: &7" + account.getPrimaryRank().getColor() + account.getPrimaryRank().getDisplayName()); write("§e┋ §fRank: &7" + account.getPrimaryRank().getColor() + account.getPrimaryRank().getDisplayName());
@ -42,21 +42,21 @@ public class SkyblockScoreboard extends WritableScoreboard {
write("§e┋ &fMcMMO: &60"); write("§e┋ &fMcMMO: &60");
SuperiorPlayer superiorPlayer = SuperiorSkyblockAPI.getPlayer(player); SuperiorPlayer superiorPlayer = SuperiorSkyblockAPI.getPlayer(player);
if (superiorPlayer == null) if (superiorPlayer != null) {
return;
if (superiorPlayer.getIsland() == null) {
writeBlank(); writeBlank();
write("&7You do not have"); Island island = superiorPlayer.getIsland();
write("&7an island!"); if (island == null) {
write("&e/start &7to get started!"); write("&7You do not have");
} else { write("&7an island!");
writeBlank(); write("&e/start &7to get started!");
write("§c┋ Island"); } else {
write("§c┋ §fRole: &c" + superiorPlayer.getPlayerRole().getName()); write("§c┋ Island");
write("§c┋ §fLevel: &a" + superiorPlayer.getIsland().getIslandLevel()); write("§c┋ §fRole: &c" + superiorPlayer.getPlayerRole().getName());
write("§c┋ &fSize: &b" + superiorPlayer.getIsland().getIslandSize() + "x" + superiorPlayer.getIsland().getIslandSize()); write("§c┋ §fLevel: &a" + island.getIslandLevel());
write("§c┋ &fTeam: &3" + superiorPlayer.getIsland().getIslandMembers(true).size() + "/" + superiorPlayer.getIsland().getTeamLimit()); write("§c┋ &fSize: &b" + island.getIslandSize() + "x" + island.getIslandSize());
write("§c┋ &fBank: &e" + DoubleUtils.format(superiorPlayer.getIsland().getIslandBank().getBalance().doubleValue(), true)); write("§c┋ &fTeam: &3" + island.getIslandMembers(true).size() + "/" + island.getTeamLimit());
write("§c┋ &fBank: &e" + DoubleUtils.format(island.getIslandBank().getBalance().doubleValue(), true));
}
} }
writeBlank(); writeBlank();
write("§bthemcgamer.zone"); write("§bthemcgamer.zone");