mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-08-20 11:42:50 +02:00
parent
7604a87962
commit
571de4e15d
|
@ -112,6 +112,10 @@ public abstract class PluginData {
|
|||
return getWithIcon(text, Icon.called(icon).of(Color.matchString(color)).build());
|
||||
}
|
||||
|
||||
public final String getWithIcon(String text, Icon.Builder builder) {
|
||||
return getWithIcon(text, builder.build());
|
||||
}
|
||||
|
||||
public final String getWithIcon(String text, Icon icon) {
|
||||
return icon.toHtml() + " " + text;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
package com.djrapitops.pluginbridge.plan.aac;
|
||||
|
||||
import com.djrapitops.plugin.utilities.Format;
|
||||
import com.djrapitops.plan.data.element.AnalysisContainer;
|
||||
import com.djrapitops.plan.data.element.InspectContainer;
|
||||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.utilities.Format;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -29,8 +32,7 @@ public class AdvancedAntiCheatData extends PluginData {
|
|||
|
||||
public AdvancedAntiCheatData(HackerTable table) {
|
||||
super(ContainerSize.THIRD, "AdvancedAntiCheat");
|
||||
super.setPluginIcon("heart");
|
||||
super.setIconColor("red");
|
||||
super.setPluginIcon(Icon.called("heart").of(Color.RED).build());
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
|
@ -38,12 +40,15 @@ public class AdvancedAntiCheatData extends PluginData {
|
|||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) throws Exception {
|
||||
List<HackObject> hackObjects = table.getHackObjects(uuid);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Times Kicked for Possible Hacking", "exclamation-triangle", "red"), hackObjects.size());
|
||||
inspectContainer.addValue(
|
||||
getWithIcon("Times Kicked for Possible Hacking", Icon.called("exclamation-triangle").of(Color.RED)),
|
||||
hackObjects.size()
|
||||
);
|
||||
|
||||
TableContainer hackTable = new TableContainer(
|
||||
getWithIcon("Kicked", "calendar"),
|
||||
getWithIcon("Hack", "exclamation-triangle"),
|
||||
getWithIcon("Violation Level", "gavel")
|
||||
getWithIcon("Kicked", Icon.called("calendar").of(Family.REGULAR)),
|
||||
getWithIcon("Hack", Icon.called("exclamation-triangle")),
|
||||
getWithIcon("Violation Level", Icon.called("gavel"))
|
||||
);
|
||||
hackTable.setColor("red");
|
||||
|
||||
|
@ -64,7 +69,7 @@ public class AdvancedAntiCheatData extends PluginData {
|
|||
Map<UUID, Integer> violations = hackObjects.entrySet().stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().size()));
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Kicked for Hacking", "exclamation-triangle"), violations);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Kicked for Hacking", Icon.called("exclamation-triangle")), violations);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.api.TimeAmount;
|
||||
import com.hm.achievement.api.AdvancedAchievementsAPI;
|
||||
|
||||
|
@ -29,15 +32,14 @@ public class AdvancedAchievementsData extends PluginData {
|
|||
|
||||
public AdvancedAchievementsData(AdvancedAchievementsAPI aaAPI) {
|
||||
super(ContainerSize.THIRD, "AdvancedAchievements");
|
||||
super.setPluginIcon("star");
|
||||
super.setIconColor("green");
|
||||
setPluginIcon(Icon.called("star").of(Color.GREEN).build());
|
||||
this.aaAPI = aaAPI;
|
||||
refreshTotalAchievements();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) {
|
||||
String text = getWithIcon("Achievements", "check-circle-o", "green");
|
||||
String text = getWithIcon("Achievements", Icon.called("check-circle").of(Family.REGULAR).of(Color.GREEN));
|
||||
inspectContainer.addValue(text, aaAPI.getPlayerTotalAchievements(uuid));
|
||||
|
||||
return inspectContainer;
|
||||
|
@ -52,9 +54,9 @@ public class AdvancedAchievementsData extends PluginData {
|
|||
int size = totalAchievements.size();
|
||||
String average = size != 0 ? FormatUtils.cutDecimals(total * 1.0 / size) : "-";
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Total Achievements", "check-circle-o", "green"), total);
|
||||
analysisContainer.addValue(getWithIcon("Average Achievements", "check-circle-o", "green"), average);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Achievements", "star"), totalAchievements);
|
||||
analysisContainer.addValue(getWithIcon("Total Achievements", Icon.called("check-circle").of(Family.REGULAR).of(Color.GREEN)), total);
|
||||
analysisContainer.addValue(getWithIcon("Average Achievements", Icon.called("check-circle").of(Family.REGULAR).of(Color.GREEN)), average);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Achievements", Icon.called("star")), totalAchievements);
|
||||
return analysisContainer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -8,6 +8,9 @@ import com.djrapitops.plan.data.element.AnalysisContainer;
|
|||
import com.djrapitops.plan.data.element.InspectContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.wasteofplastic.askyblock.ASkyBlockAPI;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -24,8 +27,7 @@ public class ASkyBlockData extends PluginData {
|
|||
|
||||
public ASkyBlockData(ASkyBlockAPI api) {
|
||||
super(ContainerSize.THIRD, "ASkyBlock");
|
||||
super.setPluginIcon("street-view");
|
||||
super.setIconColor("light-blue");
|
||||
setPluginIcon(Icon.called("street-view").of(Color.LIGHT_BLUE).build());
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
|
@ -36,11 +38,11 @@ public class ASkyBlockData extends PluginData {
|
|||
int level = api.getIslandLevel(uuid);
|
||||
int resetsLeft = api.getResetsLeft(uuid);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Island Name", "street-view", "green"), islandName);
|
||||
inspectContainer.addValue(getWithIcon("Island Level", "street-view", "amber"), level);
|
||||
inspectContainer.addValue(getWithIcon("Island Resets Left", "refresh", "green"), resetsLeft);
|
||||
inspectContainer.addValue(getWithIcon("Island Name", Icon.called("street-view").of(Color.GREEN)), islandName);
|
||||
inspectContainer.addValue(getWithIcon("Island Level", Icon.called("street-view").of(Color.AMBER)), level);
|
||||
inspectContainer.addValue(getWithIcon("Island Resets Left", Icon.called("refresh").of(Color.GREEN)), resetsLeft);
|
||||
} else {
|
||||
inspectContainer.addValue(getWithIcon("Island Name", "street-view", "green"), "No Island");
|
||||
inspectContainer.addValue(getWithIcon("Island Name", Icon.called("street-view").of(Color.GREEN)), "No Island");
|
||||
}
|
||||
|
||||
return inspectContainer;
|
||||
|
@ -51,8 +53,8 @@ public class ASkyBlockData extends PluginData {
|
|||
int islandCount = api.getIslandCount();
|
||||
String islandWorldName = api.getIslandWorld().getName();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Island World", "map-o", "green"), islandWorldName);
|
||||
analysisContainer.addValue(getWithIcon("Island Count", "street-view", "green"), islandCount);
|
||||
analysisContainer.addValue(getWithIcon("Island World", Icon.called("map").of(Family.REGULAR).of(Color.GREEN)), islandWorldName);
|
||||
analysisContainer.addValue(getWithIcon("Island Count", Icon.called("street-view").of(Color.GREEN)), islandCount);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -12,6 +12,10 @@ import com.djrapitops.plan.data.plugin.ContainerSize;
|
|||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
import me.confuser.banmanager.BmAPI;
|
||||
import me.confuser.banmanager.data.PlayerBanData;
|
||||
import me.confuser.banmanager.data.PlayerMuteData;
|
||||
|
@ -29,8 +33,7 @@ public class BanManagerData extends PluginData implements BanData {
|
|||
|
||||
public BanManagerData() {
|
||||
super(ContainerSize.THIRD, "BanManager");
|
||||
super.setIconColor("red");
|
||||
super.setPluginIcon("gavel");
|
||||
setPluginIcon(Icons.BANNED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +41,7 @@ public class BanManagerData extends PluginData implements BanData {
|
|||
boolean banned = BmAPI.isBanned(uuid);
|
||||
boolean muted = BmAPI.isMuted(uuid);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Banned", "gavel", "red"), banned ? "Yes" : "No");
|
||||
inspectContainer.addValue(getWithIcon("Banned", Icons.BANNED), banned ? "Yes" : "No");
|
||||
|
||||
if (banned) {
|
||||
PlayerBanData currentBan = BmAPI.getCurrentBan(uuid);
|
||||
|
@ -48,12 +51,12 @@ public class BanManagerData extends PluginData implements BanData {
|
|||
long ends = currentBan.getExpires();
|
||||
String reason = currentBan.getReason();
|
||||
|
||||
inspectContainer.addValue(" " + getWithIcon("Banned by", "user", "red"), link);
|
||||
inspectContainer.addValue(" " + getWithIcon("Date", "calendar", "red"), FormatUtils.formatTimeStampYear(date));
|
||||
inspectContainer.addValue(" " + getWithIcon("Ends", "calendar-check-o", "red"), FormatUtils.formatTimeStampYear(ends));
|
||||
inspectContainer.addValue(" " + getWithIcon("Reason", "comment", "red"), reason);
|
||||
inspectContainer.addValue(" " + getWithIcon("Banned by", Icon.called("user").of(Color.RED)), link);
|
||||
inspectContainer.addValue(" " + getWithIcon("Date", Icon.called("calendar").of(Color.RED).of(Family.REGULAR)), FormatUtils.formatTimeStampYear(date));
|
||||
inspectContainer.addValue(" " + getWithIcon("Ends", Icon.called("calendar-check").of(Color.RED).of(Family.REGULAR)), FormatUtils.formatTimeStampYear(ends));
|
||||
inspectContainer.addValue(" " + getWithIcon("Reason", Icon.called("comment").of(Color.RED).of(Family.REGULAR)), reason);
|
||||
}
|
||||
inspectContainer.addValue(getWithIcon("Muted", "bell-slash-o", "deep-orange"), muted ? "Yes" : "No");
|
||||
inspectContainer.addValue(getWithIcon("Muted", Icon.called("bell-slash").of(Color.DEEP_ORANGE)), muted ? "Yes" : "No");
|
||||
if (muted) {
|
||||
PlayerMuteData currentMute = BmAPI.getCurrentMute(uuid);
|
||||
String mutedBy = currentMute.getActor().getName();
|
||||
|
@ -62,10 +65,10 @@ public class BanManagerData extends PluginData implements BanData {
|
|||
long ends = currentMute.getExpires();
|
||||
String reason = currentMute.getReason();
|
||||
|
||||
inspectContainer.addValue(" " + getWithIcon("Muted by", "user", "deep-orange"), link);
|
||||
inspectContainer.addValue(" " + getWithIcon("Date", "calendar", "deep-orange"), FormatUtils.formatTimeStampYear(date));
|
||||
inspectContainer.addValue(" " + getWithIcon("Ends", "calendar-check-o", "deep-orange"), FormatUtils.formatTimeStampYear(ends));
|
||||
inspectContainer.addValue(" " + getWithIcon("Reason", "comment", "deep-orange"), reason);
|
||||
inspectContainer.addValue(" " + getWithIcon("Muted by", Icon.called("user").of(Color.DEEP_ORANGE)), link);
|
||||
inspectContainer.addValue(" " + getWithIcon("Date", Icon.called("calendar").of(Color.DEEP_ORANGE).of(Family.REGULAR)), FormatUtils.formatTimeStampYear(date));
|
||||
inspectContainer.addValue(" " + getWithIcon("Ends", Icon.called("calendar-check").of(Color.DEEP_ORANGE).of(Family.REGULAR)), FormatUtils.formatTimeStampYear(ends));
|
||||
inspectContainer.addValue(" " + getWithIcon("Reason", Icon.called("comment").of(Color.DEEP_ORANGE).of(Family.REGULAR)), reason);
|
||||
}
|
||||
|
||||
return inspectContainer;
|
||||
|
|
|
@ -13,6 +13,9 @@ import com.djrapitops.plan.data.plugin.ContainerSize;
|
|||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -27,8 +30,7 @@ public class BuyCraftData extends PluginData {
|
|||
|
||||
public BuyCraftData(String secret) {
|
||||
super(ContainerSize.TAB, "BuyCraft");
|
||||
super.setIconColor("blue");
|
||||
super.setPluginIcon("shopping-bag");
|
||||
setPluginIcon(Icon.called("shopping-bag").of(Color.BLUE).build());
|
||||
|
||||
this.secret = secret;
|
||||
}
|
||||
|
@ -57,9 +59,9 @@ public class BuyCraftData extends PluginData {
|
|||
private void addPlayerTable(AnalysisContainer analysisContainer, List<Payment> payments) {
|
||||
TableContainer payTable = new TableContainer(
|
||||
true,
|
||||
getWithIcon("Date", "calendar"),
|
||||
getWithIcon("Amount", "money"),
|
||||
getWithIcon("Packages", "cube")
|
||||
getWithIcon("Date", Icon.called("calendar").of(Family.REGULAR)),
|
||||
getWithIcon("Amount", Icon.called("money-bill-wave")),
|
||||
getWithIcon("Packages", Icon.called("cube"))
|
||||
);
|
||||
payTable.setColor("blue");
|
||||
for (Payment payment : payments) {
|
||||
|
@ -91,7 +93,10 @@ public class BuyCraftData extends PluginData {
|
|||
paymentTotals.put(currency, paymentTotals.getOrDefault(currency, 0.0) + amount);
|
||||
}
|
||||
for (Map.Entry<String, Double> entry : paymentTotals.entrySet()) {
|
||||
analysisContainer.addValue(getWithIcon("Total " + entry.getKey(), "money", "blue"), FormatUtils.cutDecimals(entry.getValue()));
|
||||
analysisContainer.addValue(
|
||||
getWithIcon("Total " + entry.getKey(), Icon.called("money-bill-wave").of(Color.BLUE)),
|
||||
FormatUtils.cutDecimals(entry.getValue())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,8 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.UserMap;
|
||||
|
@ -26,8 +28,7 @@ public class EssentialsData extends PluginData {
|
|||
|
||||
public EssentialsData(Essentials essentials) {
|
||||
super(ContainerSize.THIRD, "Essentials");
|
||||
super.setPluginIcon("flask");
|
||||
super.setIconColor("deep-orange");
|
||||
setPluginIcon(Icon.called("flask").of(Color.DEEP_ORANGE).build());
|
||||
this.essentials = essentials;
|
||||
}
|
||||
|
||||
|
@ -39,8 +40,8 @@ public class EssentialsData extends PluginData {
|
|||
boolean jailed = user.isJailed();
|
||||
boolean muted = user.isMuted();
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Jailed", "ban", "deep-orange"), jailed ? "Yes" : "No");
|
||||
inspectContainer.addValue(getWithIcon("Muted", "bell-slash-o", "deep-orange"), muted ? "Yes" : "No");
|
||||
inspectContainer.addValue(getWithIcon("Jailed", Icon.called("ban").of(Color.DEEP_ORANGE)), jailed ? "Yes" : "No");
|
||||
inspectContainer.addValue(getWithIcon("Muted", Icon.called("bell-slash").of(Color.DEEP_ORANGE)), muted ? "Yes" : "No");
|
||||
} else {
|
||||
inspectContainer.addValue("No Essentials Data for this user", "-");
|
||||
}
|
||||
|
@ -64,15 +65,18 @@ public class EssentialsData extends PluginData {
|
|||
String jailedString = jailed.values().stream().filter("Yes"::equals).count() + " / " + uuids.size();
|
||||
String mutedString = muted.values().stream().filter("Yes"::equals).count() + " / " + uuids.size();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Players in Jail", "ban", "red"), jailedString);
|
||||
analysisContainer.addValue(getWithIcon("Muted", "bell-slash-o", "deep-orange"), mutedString);
|
||||
analysisContainer.addValue(getWithIcon("Players in Jail", Icon.called("ban").of(Color.DEEP_ORANGE)), jailedString);
|
||||
analysisContainer.addValue(getWithIcon("Muted", Icon.called("bell-slash").of(Color.DEEP_ORANGE)), mutedString);
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Jailed", "ban"), jailed);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Muted", "bell-slash-o"), muted);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Jailed", Icon.called("ban")), jailed);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Muted", Icon.called("bell-slash")), muted);
|
||||
|
||||
List<String> warpsList = new ArrayList<>(essentials.getWarps().getList());
|
||||
if (!warpsList.isEmpty()) {
|
||||
TableContainer warps = new TableContainer(getWithIcon("Warp", "map-marker"), getWithIcon("Command", "terminal"));
|
||||
TableContainer warps = new TableContainer(
|
||||
getWithIcon("Warp", Icon.called("map-marker-alt")),
|
||||
getWithIcon("Command", Icon.called("terminal"))
|
||||
);
|
||||
warps.setColor("light-green");
|
||||
|
||||
Collections.sort(warpsList);
|
||||
|
|
|
@ -5,6 +5,10 @@ import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
|||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.HtmlStructure;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
import com.djrapitops.plan.utilities.html.structure.AbstractAccordion;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElement;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElementContentBuilder;
|
||||
|
@ -72,16 +76,16 @@ public class FactionsAccordion extends AbstractAccordion {
|
|||
String htmlID = "faction_" + factionName + "_" + createdAtMillis;
|
||||
|
||||
String leftSide = new AccordionElementContentBuilder()
|
||||
.addRowBold("deep-purple", "calendar-o", "Created", created)
|
||||
.addRowBold("purple", "bolt", "Power", powerString)
|
||||
.addRowBold("purple", "user", "Leader", leaderName)
|
||||
.addRowBold("purple", "users", "Members", memberCount)
|
||||
.addRowBold("purple", "map", "Land Count", landCount)
|
||||
.addRowBold(Icon.called("calendar").of(Color.DEEP_PURPLE).of(Family.REGULAR), "Created", created)
|
||||
.addRowBold(Icon.called("bolt").of(Color.PURPLE), "Power", powerString)
|
||||
.addRowBold(Icon.called("user").of(Color.PURPLE), "Leader", leaderName)
|
||||
.addRowBold(Icon.called("users").of(Color.PURPLE), "Members", memberCount)
|
||||
.addRowBold(Icon.called("map").of(Color.PURPLE), "Land Count", landCount)
|
||||
.toHtml();
|
||||
|
||||
String rightSide = new AccordionElementContentBuilder()
|
||||
.addRowBold("red", "crosshairs", "Player Kills", playerKills)
|
||||
.addRowBold("red", "frown-o", "Deaths", deaths)
|
||||
.addRowBold(Icons.PLAYER_KILLS, "Player Kills", playerKills)
|
||||
.addRowBold(Icons.DEATHS, "Deaths", deaths)
|
||||
.toHtml();
|
||||
|
||||
addElement(
|
||||
|
|
|
@ -14,6 +14,8 @@ import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
|||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
|
@ -30,8 +32,7 @@ public class FactionsData extends PluginData {
|
|||
|
||||
public FactionsData() {
|
||||
super(ContainerSize.TAB, "Factions");
|
||||
super.setPluginIcon("map");
|
||||
super.setIconColor("deep-purple");
|
||||
setPluginIcon(Icon.called("map").of(Color.DEEP_PURPLE).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,15 +50,15 @@ public class FactionsData extends PluginData {
|
|||
String factionLeader = faction.getLeader().getName();
|
||||
String factionLeaderLink = Html.LINK.parse(PlanAPI.getInstance().getPlayerInspectPageLink(factionLeader), factionLeader);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Faction", "flag", "deep-purple"), factionName);
|
||||
inspectContainer.addValue(getWithIcon("Leader", "user", "purple"), factionLeaderLink);
|
||||
inspectContainer.addValue(getWithIcon("Faction", Icon.called("flag").of(Color.DEEP_PURPLE)), factionName);
|
||||
inspectContainer.addValue(getWithIcon("Leader", Icon.called("user").of(Color.PURPLE)), factionLeaderLink);
|
||||
}
|
||||
}
|
||||
|
||||
double power = mPlayer.getPower();
|
||||
double maxPower = mPlayer.getPowerMax();
|
||||
String powerString = FormatUtils.cutDecimals(power) + " / " + FormatUtils.cutDecimals(maxPower);
|
||||
inspectContainer.addValue(getWithIcon("Power", "bolt", "purple"), powerString);
|
||||
inspectContainer.addValue(getWithIcon("Power", Icon.called("bolt").of(Color.PURPLE)), powerString);
|
||||
|
||||
return inspectContainer;
|
||||
}
|
||||
|
@ -66,7 +67,7 @@ public class FactionsData extends PluginData {
|
|||
public AnalysisContainer getServerData(Collection<UUID> uuids, AnalysisContainer analysisContainer) {
|
||||
List<Faction> factions = getTopFactions();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Number of Factions", "flag", "deep-purple"), factions.size());
|
||||
analysisContainer.addValue(getWithIcon("Number of Factions", Icon.called("flag").of(Color.DEEP_PURPLE)), factions.size());
|
||||
|
||||
if (!factions.isEmpty()) {
|
||||
FactionsAccordion factionsAccordion = new FactionsAccordion(
|
||||
|
|
|
@ -9,6 +9,9 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.utilities.FormatUtils;
|
||||
import me.ryanhamshire.GriefPrevention.Claim;
|
||||
import me.ryanhamshire.GriefPrevention.DataStore;
|
||||
|
@ -27,8 +30,7 @@ public class GriefPreventionData extends PluginData {
|
|||
|
||||
public GriefPreventionData(DataStore dataStore) {
|
||||
super(ContainerSize.THIRD, "GriefPrevention");
|
||||
super.setPluginIcon("shield");
|
||||
super.setIconColor("blue-grey");
|
||||
setPluginIcon(Icon.called("shield-alt").of(Color.BLUE_GREY).build());
|
||||
this.dataStore = dataStore;
|
||||
}
|
||||
|
||||
|
@ -44,11 +46,14 @@ public class GriefPreventionData extends PluginData {
|
|||
String softMuted = dataStore.isSoftMuted(uuid) ? "Yes" : "No";
|
||||
long totalArea = claims.values().stream().mapToInt(i -> i).sum();
|
||||
|
||||
inspectContainer.addValue(getWithIcon("SoftMuted", "bell-slash-o", "deep-orange"), softMuted);
|
||||
inspectContainer.addValue(getWithIcon("Claims", "map-marker", "blue-grey"), claims.size());
|
||||
inspectContainer.addValue(getWithIcon("Claimed Area", "map-o", "light-green"), totalArea);
|
||||
inspectContainer.addValue(getWithIcon("SoftMuted", Icon.called("bell-slash").of(Color.DEEP_ORANGE).of(Family.REGULAR)), softMuted);
|
||||
inspectContainer.addValue(getWithIcon("Claims", Icon.called("map-marker").of(Color.BLUE_GREY)), claims.size());
|
||||
inspectContainer.addValue(getWithIcon("Claimed Area", Icon.called("map").of(Family.REGULAR).of(Color.BLUE_GREY)), totalArea);
|
||||
|
||||
TableContainer claimsTable = new TableContainer(getWithIcon("Claim", "map-marker"), getWithIcon("Area", "map-o"));
|
||||
TableContainer claimsTable = new TableContainer(
|
||||
getWithIcon("Claim", Icon.called("map-marker")),
|
||||
getWithIcon("Area", Icon.called("map").of(Family.REGULAR))
|
||||
);
|
||||
claimsTable.setColor("blue-grey");
|
||||
for (Map.Entry<String, Integer> entry : claims.entrySet()) {
|
||||
claimsTable.addRow(entry.getKey(), entry.getValue());
|
||||
|
@ -73,9 +78,9 @@ public class GriefPreventionData extends PluginData {
|
|||
}
|
||||
|
||||
long totalArea = area.values().stream().mapToInt(i -> i).sum();
|
||||
analysisContainer.addValue(getWithIcon("Total Claimed Area", "map-o", "blue-grey"), totalArea);
|
||||
analysisContainer.addValue(getWithIcon("Total Claimed Area", Icon.called("map").of(Family.REGULAR).of(Color.BLUE_GREY)), totalArea);
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Claimed Area", "map-o"), area);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Claimed Area", Icon.called("map").of(Family.REGULAR)), area);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.utilities.FormatUtils;
|
||||
import net.kaikk.mc.gpp.Claim;
|
||||
import net.kaikk.mc.gpp.DataStore;
|
||||
|
@ -27,8 +30,7 @@ public class GriefPreventionPlusData extends PluginData {
|
|||
|
||||
public GriefPreventionPlusData(DataStore dataStore) {
|
||||
super(ContainerSize.THIRD, "GriefPreventionPlus");
|
||||
super.setPluginIcon("shield");
|
||||
super.setIconColor("blue-grey");
|
||||
setPluginIcon(Icon.called("shield-alt").of(Color.BLUE_GREY).build());
|
||||
this.dataStore = dataStore;
|
||||
}
|
||||
|
||||
|
@ -43,10 +45,13 @@ public class GriefPreventionPlusData extends PluginData {
|
|||
);
|
||||
long totalArea = claims.values().stream().mapToInt(i -> i).sum();
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Claims", "map-marker", "blue-grey"), claims.size());
|
||||
inspectContainer.addValue(getWithIcon("Claimed Area", "map-o", "light-green"), totalArea);
|
||||
inspectContainer.addValue(getWithIcon("Claims", Icon.called("map-marker").of(Color.BLUE_GREY)), claims.size());
|
||||
inspectContainer.addValue(getWithIcon("Claimed Area", Icon.called("map").of(Family.REGULAR).of(Color.BLUE_GREY)), totalArea);
|
||||
|
||||
TableContainer claimsTable = new TableContainer(getWithIcon("Claim", "map-marker"), getWithIcon("Area", "map-o"));
|
||||
TableContainer claimsTable = new TableContainer(
|
||||
getWithIcon("Claim", Icon.called("map-marker")),
|
||||
getWithIcon("Area", Icon.called("map").of(Family.REGULAR))
|
||||
);
|
||||
claimsTable.setColor("blue-grey");
|
||||
for (Map.Entry<String, Integer> entry : claims.entrySet()) {
|
||||
claimsTable.addRow(entry.getKey(), entry.getValue());
|
||||
|
@ -71,9 +76,9 @@ public class GriefPreventionPlusData extends PluginData {
|
|||
}
|
||||
|
||||
long totalArea = area.values().stream().mapToInt(i -> i).sum();
|
||||
analysisContainer.addValue(getWithIcon("Total Claimed Area", "map-o", "blue-grey"), totalArea);
|
||||
analysisContainer.addValue(getWithIcon("Total Claimed Area", Icon.called("map").of(Family.REGULAR).of(Color.BLUE_GREY)), totalArea);
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Claimed Area", "map-o"), area);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Claimed Area", Icon.called("map").of(Family.REGULAR)), area);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import com.djrapitops.plan.data.element.TableContainer;
|
|||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.dao.JobsDAOData;
|
||||
|
||||
|
@ -25,15 +27,16 @@ public class JobsData extends PluginData {
|
|||
|
||||
public JobsData() {
|
||||
super(ContainerSize.THIRD, "Jobs");
|
||||
super.setIconColor("brown");
|
||||
super.setPluginIcon("suitcase");
|
||||
setPluginIcon(Icon.called("suitcase").of(Color.BROWN).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) {
|
||||
List<JobsDAOData> playersJobs = Jobs.getDBManager().getDB().getAllJobs(null, uuid);
|
||||
|
||||
TableContainer jobTable = new TableContainer(getWithIcon("Job", "suitcase"), getWithIcon("Level", "plus"));
|
||||
TableContainer jobTable = new TableContainer(
|
||||
getWithIcon("Job", Icon.called("suitcase")),
|
||||
getWithIcon("Level", Icon.called("plus")));
|
||||
for (JobsDAOData job : playersJobs) {
|
||||
jobTable.addRow(job.getJobName(), job.getLevel());
|
||||
}
|
||||
|
@ -52,7 +55,12 @@ public class JobsData extends PluginData {
|
|||
.flatMap(Collection::stream)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
TableContainer jobTable = new TableContainer(getWithIcon("Job", "suitcase"), getWithIcon("Workers", "users"), getWithIcon("Total Level", "plus"), getWithIcon("Average Level", "plus"));
|
||||
TableContainer jobTable = new TableContainer(
|
||||
getWithIcon("Job", Icon.called("suitcase")),
|
||||
getWithIcon("Workers", Icon.called("users")),
|
||||
getWithIcon("Total Level", Icon.called("plus")),
|
||||
getWithIcon("Average Level", Icon.called("plus"))
|
||||
);
|
||||
|
||||
if (allJobs.isEmpty()) {
|
||||
jobTable.addRow("No Jobs with Workers");
|
||||
|
@ -75,8 +83,8 @@ public class JobsData extends PluginData {
|
|||
jobTable.addRow(
|
||||
job,
|
||||
amountOfWorkers,
|
||||
amountOfWorkers != 0 ? FormatUtils.cutDecimals(totalLevel / amountOfWorkers) : "-",
|
||||
totalLevel
|
||||
totalLevel,
|
||||
amountOfWorkers != 0 ? FormatUtils.cutDecimals(totalLevel / amountOfWorkers) : "-"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@ import com.djrapitops.plan.data.store.keys.PlayerKeys;
|
|||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.utilities.html.HtmlStructure;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
import com.djrapitops.plan.utilities.html.structure.AbstractAccordion;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElement;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElementContentBuilder;
|
||||
|
@ -62,16 +65,16 @@ public class KingdomsAccordion extends AbstractAccordion {
|
|||
|
||||
String leftSide = new AccordionElementContentBuilder()
|
||||
.addHtml(kingdomLore != null ? "<p>" + kingdomLore + "</p>" : "")
|
||||
.addRowBold("amber", "user", "King", kingName)
|
||||
.addRowBold("amber", "users", "Members", memberCount)
|
||||
.addRowBold("amber", "bolt", "Might", might)
|
||||
.addRowBold("amber", "cubes", "Resources", resourcePoints)
|
||||
.addRowBold(Icon.called("chess-king").of(Color.AMBER), "King", kingName)
|
||||
.addRowBold(Icon.called("users").of(Color.AMBER), "Members", memberCount)
|
||||
.addRowBold(Icon.called("bolt").of(Color.AMBER), "Might", might)
|
||||
.addRowBold(Icon.called("cubes").of(Color.AMBER), "Resources", resourcePoints)
|
||||
.toHtml();
|
||||
|
||||
String rightSide = new AccordionElementContentBuilder()
|
||||
.addRowBold("red", "crosshairs", "Player Kills", playerKills)
|
||||
.addRowBold("green", "crosshairs", "Mob Kills", mobKills)
|
||||
.addRowBold("red", "frown-o", "Deaths", deaths)
|
||||
.addRowBold(Icons.PLAYER_KILLS, "Player Kills", playerKills)
|
||||
.addRowBold(Icons.MOB_KILLS, "Mob Kills", mobKills)
|
||||
.addRowBold(Icons.DEATHS, "Deaths", deaths)
|
||||
.toHtml();
|
||||
|
||||
addElement(new AccordionElement(htmlID, kingdomName + "<span class=\"pull-right\">" + separated + "</span>")
|
||||
|
|
|
@ -12,6 +12,8 @@ import com.djrapitops.plan.data.plugin.PluginData;
|
|||
import com.djrapitops.plan.data.store.keys.AnalysisKeys;
|
||||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import org.kingdoms.constants.kingdom.OfflineKingdom;
|
||||
import org.kingdoms.constants.player.OfflineKingdomPlayer;
|
||||
import org.kingdoms.manager.game.GameManagement;
|
||||
|
@ -27,8 +29,7 @@ public class KingdomsData extends PluginData {
|
|||
|
||||
public KingdomsData() {
|
||||
super(ContainerSize.TAB, "Kingdoms");
|
||||
super.setIconColor("amber");
|
||||
super.setPluginIcon("shield");
|
||||
setPluginIcon(Icon.called("crown").of(Color.AMBER).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,14 +38,14 @@ public class KingdomsData extends PluginData {
|
|||
String kingdomName = kingdomPlayer.getKingdomName();
|
||||
|
||||
if (kingdomName == null) {
|
||||
inspectContainer.addValue(getWithIcon("Kingdom", "shield", "amber"), "No Kingdom");
|
||||
inspectContainer.addValue(getWithIcon("Kingdom", Icon.called("fort-awesome").of(Color.AMBER)), "No Kingdom");
|
||||
} else {
|
||||
OfflineKingdom kingdom = GameManagement.getKingdomManager().getOfflineKingdom(kingdomName);
|
||||
if (kingdom != null) {
|
||||
String king = kingdom.getKingName();
|
||||
String link = Html.LINK.parse(PlanAPI.getInstance().getPlayerInspectPageLink(king), king);
|
||||
inspectContainer.addValue(getWithIcon("Kingdom", "shield", "amber"), kingdomName);
|
||||
inspectContainer.addValue(getWithIcon("King", "user", "amber"), link);
|
||||
inspectContainer.addValue(getWithIcon("Kingdom", Icon.called("fort-awesome").of(Color.AMBER)), kingdomName);
|
||||
inspectContainer.addValue(getWithIcon("King", Icon.called("chess-king").of(Color.AMBER)), link);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +56,7 @@ public class KingdomsData extends PluginData {
|
|||
public AnalysisContainer getServerData(Collection<UUID> collection, AnalysisContainer analysisContainer) {
|
||||
Map<String, OfflineKingdom> kingdoms = GameManagement.getKingdomManager().getKingdomList();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Number of Kingdoms", "shield", "amber"), kingdoms.size());
|
||||
analysisContainer.addValue(getWithIcon("Number of Kingdoms", Icon.called("fort-awesome").of(Color.AMBER)), kingdoms.size());
|
||||
|
||||
if (!kingdoms.isEmpty()) {
|
||||
KingdomsAccordion kingdomsAccordion = new KingdomsAccordion(
|
||||
|
@ -79,7 +80,7 @@ public class KingdomsData extends PluginData {
|
|||
}
|
||||
}
|
||||
}
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Kingdom", "shield"), userKingDoms);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Kingdom", Icon.called("fort-awesome")), userKingDoms);
|
||||
}
|
||||
|
||||
return analysisContainer;
|
||||
|
|
|
@ -12,9 +12,12 @@ import com.djrapitops.plan.data.element.TableContainer;
|
|||
import com.djrapitops.plan.data.plugin.BanData;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.system.cache.DataCache;
|
||||
import com.djrapitops.plan.data.store.keys.AnalysisKeys;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.structure.TabsElement;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
|
||||
|
@ -32,19 +35,18 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
|
||||
public LiteBansData(LiteBansDatabaseQueries db) {
|
||||
super(ContainerSize.TAB, "LiteBans");
|
||||
super.setIconColor("red");
|
||||
super.setPluginIcon("ban");
|
||||
setPluginIcon(Icon.called("ban").of(Color.RED).build());
|
||||
this.db = db;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) {
|
||||
|
||||
String what = getWithIcon("Effect", "times-circle-o");
|
||||
String by = getWithIcon("Banned By", "gavel");
|
||||
String reason = getWithIcon("Reason", "balance-scale");
|
||||
String date = getWithIcon("Expires", "calendar-times-o");
|
||||
TableContainer table = new TableContainer(what, date, by, reason);
|
||||
String what = getWithIcon("Effect", Icon.called("times-circle").of(Family.REGULAR));
|
||||
String by = getWithIcon("Banned By", Icon.called("gavel"));
|
||||
String reason = getWithIcon("Reason", Icon.called("balance-scale"));
|
||||
String date = getWithIcon("Expires", Icon.called("calendar-times").of(Family.REGULAR));
|
||||
TableContainer table = new TableContainer(what, by, reason, date);
|
||||
table.setColor("red");
|
||||
|
||||
try {
|
||||
|
@ -114,10 +116,10 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
|
||||
Html spacing = Html.PANEL_BODY;
|
||||
String[] navAndHtml = new TabsElement(
|
||||
new TabsElement.Tab(getWithIcon("Bans", "ban"), spacing.parse(banTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Mutes", "bell-slash-o"), spacing.parse(muteTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Warnings", "exclamation-triangle"), spacing.parse(warningTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Kicks", "user-times"), spacing.parse(kickTable.parseHtml()))
|
||||
new TabsElement.Tab(getWithIcon("Bans", Icon.called("ban")), spacing.parse(banTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Mutes", Icon.called("bell-slash").of(Family.REGULAR)), spacing.parse(muteTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Warnings", Icon.called("exclamation-triangle")), spacing.parse(warningTable.parseHtml())),
|
||||
new TabsElement.Tab(getWithIcon("Kicks", Icon.called("user-times")), spacing.parse(kickTable.parseHtml()))
|
||||
).toHtml();
|
||||
analysisContainer.addHtml("Tables", navAndHtml[0] + navAndHtml[1]);
|
||||
|
||||
|
@ -125,11 +127,11 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
}
|
||||
|
||||
private TableContainer getBanTable() {
|
||||
String banned = getWithIcon("Banned", "ban");
|
||||
String by = getWithIcon("Banned By", "gavel");
|
||||
String reason = getWithIcon("Reason", "balance-scale");
|
||||
String date = getWithIcon("Expires", "calendar-times-o");
|
||||
String active = getWithIcon("Active", "hourglass");
|
||||
String banned = getWithIcon("Banned", Icon.called("ban"));
|
||||
String by = getWithIcon("Banned By", Icon.called("gavel"));
|
||||
String reason = getWithIcon("Reason", Icon.called("balance-scale"));
|
||||
String date = getWithIcon("Expires", Icon.called("calendar-times").of(Family.REGULAR));
|
||||
String active = getWithIcon("Active", Icon.called("hourglass"));
|
||||
|
||||
TableContainer banTable = new TableContainer(banned, by, reason, date, active);
|
||||
banTable.useJqueryDataTables();
|
||||
|
@ -138,11 +140,11 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
}
|
||||
|
||||
private TableContainer getMuteTable() {
|
||||
String muted = getWithIcon("Muted", "bell-slash-o");
|
||||
String by = getWithIcon("Muted By", "gavel");
|
||||
String reason = getWithIcon("Reason", "balance-scale");
|
||||
String date = getWithIcon("Expires", "calendar-times-o");
|
||||
String active = getWithIcon("Active", "hourglass");
|
||||
String muted = getWithIcon("Muted", Icon.called("bell-slash").of(Family.REGULAR));
|
||||
String by = getWithIcon("Muted By", Icon.called("gavel"));
|
||||
String reason = getWithIcon("Reason", Icon.called("balance-scale"));
|
||||
String date = getWithIcon("Expires", Icon.called("calendar-times").of(Family.REGULAR));
|
||||
String active = getWithIcon("Active", Icon.called("hourglass"));
|
||||
|
||||
TableContainer muteTable = new TableContainer(muted, by, reason, date, active);
|
||||
muteTable.useJqueryDataTables();
|
||||
|
@ -151,11 +153,11 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
}
|
||||
|
||||
private TableContainer getWarningTable() {
|
||||
String warned = getWithIcon("Warned", "exclamation-triangle");
|
||||
String by = getWithIcon("Warned By", "gavel");
|
||||
String reason = getWithIcon("Reason", "balance-scale");
|
||||
String date = getWithIcon("Expires", "calendar-times-o");
|
||||
String active = getWithIcon("Active", "hourglass");
|
||||
String warned = getWithIcon("Warned", Icon.called("exclamation-triangle"));
|
||||
String by = getWithIcon("Warned By", Icon.called("gavel"));
|
||||
String reason = getWithIcon("Reason", Icon.called("balance-scale"));
|
||||
String date = getWithIcon("Expires", Icon.called("calendar-times").of(Family.REGULAR));
|
||||
String active = getWithIcon("Active", Icon.called("hourglass"));
|
||||
|
||||
TableContainer warnTable = new TableContainer(warned, by, reason, date, active);
|
||||
warnTable.useJqueryDataTables();
|
||||
|
@ -164,11 +166,11 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
}
|
||||
|
||||
private TableContainer getKickTable() {
|
||||
String kicked = getWithIcon("Kicked", "user-times");
|
||||
String by = getWithIcon("Kicked By", "gavel");
|
||||
String reason = getWithIcon("Reason", "balance-scale");
|
||||
String date = getWithIcon("Expires", "calendar-times-o");
|
||||
String active = getWithIcon("Active", "hourglass");
|
||||
String kicked = getWithIcon("Kicked", Icon.called("user-times"));
|
||||
String by = getWithIcon("Kicked By", Icon.called("gavel"));
|
||||
String reason = getWithIcon("Reason", Icon.called("balance-scale"));
|
||||
String date = getWithIcon("Expires", Icon.called("calendar-times").of(Family.REGULAR));
|
||||
String active = getWithIcon("Active", Icon.called("hourglass"));
|
||||
|
||||
TableContainer kickTable = new TableContainer(kicked, by, reason, date, active);
|
||||
kickTable.useJqueryDataTables();
|
||||
|
@ -180,9 +182,10 @@ public class LiteBansData extends PluginData implements BanData {
|
|||
if (objects.isEmpty()) {
|
||||
table.addRow("No Data");
|
||||
} else {
|
||||
Map<UUID, String> playerNames = analysisData.getValue(AnalysisKeys.PLAYER_NAMES).orElse(new HashMap<>());
|
||||
for (LiteBansDBObj object : objects) {
|
||||
UUID uuid = object.getUuid();
|
||||
String name = DataCache.getInstance().getName(uuid);
|
||||
String name = playerNames.getOrDefault(uuid, "Unknown to Plan");
|
||||
long expiry = object.getExpiry();
|
||||
String expires = expiry <= 0 ? "Never" : FormatUtils.formatTimeStampSecond(expiry);
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@ import com.djrapitops.plan.data.element.TableContainer;
|
|||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.gmail.nossr50.database.DatabaseManager;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
|
@ -29,8 +31,7 @@ public class McMmoData extends PluginData {
|
|||
|
||||
public McMmoData() {
|
||||
super(ContainerSize.THIRD, "MCMMO");
|
||||
super.setIconColor("indigo");
|
||||
super.setPluginIcon("compass");
|
||||
setPluginIcon(Icon.called("compass").of(Color.INDIGO).of(Family.REGULAR).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,8 +40,8 @@ public class McMmoData extends PluginData {
|
|||
|
||||
PlayerProfile profile = db.loadPlayerProfile("", uuid, false);
|
||||
|
||||
String skillS = Html.FONT_AWESOME_ICON.parse("star") + " Skill";
|
||||
String levelS = Html.FONT_AWESOME_ICON.parse("plus") + " Level";
|
||||
String skillS = getWithIcon("Skill", Icon.called("star"));
|
||||
String levelS = getWithIcon("Level", Icon.called("plus"));
|
||||
TableContainer skillTable = new TableContainer(skillS, levelS);
|
||||
skillTable.setColor("indigo");
|
||||
|
||||
|
@ -54,9 +55,9 @@ public class McMmoData extends PluginData {
|
|||
|
||||
@Override
|
||||
public AnalysisContainer getServerData(Collection<UUID> uuids, AnalysisContainer analysisContainer) {
|
||||
String skillS = Html.FONT_AWESOME_ICON.parse("star") + " Skill";
|
||||
String tLevel = Html.FONT_AWESOME_ICON.parse("plus") + " Total Level";
|
||||
String aLevel = Html.FONT_AWESOME_ICON.parse("plus") + " Average Level";
|
||||
String skillS = getWithIcon("Skill", Icon.called("star"));
|
||||
String tLevel = getWithIcon("Total Level", Icon.called("plus"));
|
||||
String aLevel = getWithIcon("Average Level", Icon.called("plus"));
|
||||
|
||||
DatabaseManager databaseManager = mcMMO.getDatabaseManager();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -10,6 +10,8 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
import com.djrapitops.pluginbridge.plan.viaversion.Protocol;
|
||||
import com.djrapitops.pluginbridge.plan.viaversion.ProtocolTable;
|
||||
|
@ -31,8 +33,7 @@ public class ProtocolSupportData extends PluginData {
|
|||
|
||||
public ProtocolSupportData(ProtocolTable table) {
|
||||
super(ContainerSize.THIRD, "ProtocolSupport");
|
||||
super.setPluginIcon("gamepad");
|
||||
super.setIconColor("cyan");
|
||||
setPluginIcon(Icon.called("gamepad").of(Color.CYAN).build());
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
|
@ -41,7 +42,7 @@ public class ProtocolSupportData extends PluginData {
|
|||
try {
|
||||
int protocolVersion = table.getProtocolVersion(uuid);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Last Join Version", "signal", "light-green"),
|
||||
inspectContainer.addValue(getWithIcon("Last Join Version", Icon.called("signal").of(Color.CYAN)),
|
||||
protocolVersion != -1 ? Protocol.getMCVersion(protocolVersion) : "Not Yet Known");
|
||||
} catch (DBOpException ex) {
|
||||
Log.toLog(this.getClass().getName(), ex);
|
||||
|
@ -64,10 +65,10 @@ public class ProtocolSupportData extends PluginData {
|
|||
Map<UUID, String> userVersions = versions.entrySet().stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, entry -> Protocol.getMCVersion(entry.getValue())));
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Last Version", "signal"), userVersions);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Last Version", Icon.called("signal")), userVersions);
|
||||
|
||||
String versionS = getWithIcon("Version", "signal");
|
||||
String membersS = getWithIcon("Users", "users");
|
||||
String versionS = getWithIcon("Version", Icon.called("signal"));
|
||||
String membersS = getWithIcon("Users", Icon.called("users"));
|
||||
TableContainer versionTable = new TableContainer(versionS, membersS);
|
||||
versionTable.setColor("cyan");
|
||||
Map<String, Integer> usersPerVersion = getUsersPerVersion(versions);
|
||||
|
|
|
@ -11,6 +11,9 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Family;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -26,45 +29,37 @@ public class RedProtectData extends PluginData {
|
|||
|
||||
public RedProtectData() {
|
||||
super(ContainerSize.THIRD, "RedProtect");
|
||||
super.setPluginIcon("map-o");
|
||||
super.setIconColor("shield");
|
||||
setPluginIcon(Icon.called("shield-alt").of(Color.RED).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) {
|
||||
Set<Region> regions = RedProtect.get().getAPI().getPlayerRegions(uuid.toString());
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Regions", "map-marker", "red"), regions.size());
|
||||
addRegionData(inspectContainer, regions);
|
||||
|
||||
return inspectContainer;
|
||||
}
|
||||
|
||||
private void addRegionData(InspectContainer inspectContainer, Set<Region> regions) {
|
||||
inspectContainer.addValue(getWithIcon("Regions", Icon.called("map-marker").of(Color.RED)), regions.size());
|
||||
|
||||
TableContainer regionTable = new TableContainer(
|
||||
getWithIcon("Region", "map-marker"),
|
||||
getWithIcon("World", "map"),
|
||||
getWithIcon("Area", "map-o")
|
||||
getWithIcon("Region", Icon.called("map-marker")),
|
||||
getWithIcon("World", Icon.called("map")),
|
||||
getWithIcon("Area", Icon.called("map").of(Family.REGULAR))
|
||||
);
|
||||
long areaTotal = getTotalAndAddRows(regions, regionTable);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Total Area", "map-o", "red"), areaTotal);
|
||||
inspectContainer.addValue(getWithIcon("Total Area", Icon.called("map").of(Family.REGULAR).of(Color.RED)), areaTotal);
|
||||
inspectContainer.addTable("regionTable", regionTable);
|
||||
|
||||
return inspectContainer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnalysisContainer getServerData(Collection<UUID> collection, AnalysisContainer analysisContainer) {
|
||||
Set<Region> regions = RedProtect.get().getAPI().getAllRegions();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("All Regions", "map-marker", "red"), regions.size());
|
||||
|
||||
TableContainer regionTable = new TableContainer(
|
||||
getWithIcon("Region", "map-marker"),
|
||||
getWithIcon("World", "map"),
|
||||
getWithIcon("Area", "map-o")
|
||||
);
|
||||
|
||||
long areaTotal = getTotalAndAddRows(regions, regionTable);
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Total Area", "map-o", "red"), areaTotal);
|
||||
analysisContainer.addTable("regionTable", regionTable);
|
||||
addRegionData(analysisContainer, regions);
|
||||
return analysisContainer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -8,6 +8,8 @@ import com.djrapitops.plan.data.element.AnalysisContainer;
|
|||
import com.djrapitops.plan.data.element.InspectContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import io.minimum.minecraft.superbvote.storage.VoteStorage;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -25,8 +27,7 @@ public class SuperbVoteData extends PluginData {
|
|||
|
||||
public SuperbVoteData(VoteStorage store) {
|
||||
super(ContainerSize.THIRD, "SuperbVote");
|
||||
super.setPluginIcon("check");
|
||||
super.setIconColor("teal");
|
||||
setPluginIcon(Icon.called("check").of(Color.TEAL).build());
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
|
@ -34,7 +35,7 @@ public class SuperbVoteData extends PluginData {
|
|||
public InspectContainer getPlayerData(UUID uuid, InspectContainer inspectContainer) {
|
||||
int votes = store.getVotes(uuid).getVotes();
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Votes", "check", "teal"), votes);
|
||||
inspectContainer.addValue(getWithIcon("Votes", Icon.called("check").of(Color.TEAL)), votes);
|
||||
|
||||
return inspectContainer;
|
||||
}
|
||||
|
@ -49,9 +50,9 @@ public class SuperbVoteData extends PluginData {
|
|||
total += votesCount;
|
||||
}
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Total Votes", "check", "teal"), total);
|
||||
analysisContainer.addValue(getWithIcon("Total Votes", Icon.called("check").of(Color.TEAL)), total);
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Votes", "check"), votes);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Votes", Icon.called("check")), votes);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@ import com.djrapitops.plan.data.store.keys.PlayerKeys;
|
|||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.data.store.mutators.SessionsMutator;
|
||||
import com.djrapitops.plan.utilities.html.HtmlStructure;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icons;
|
||||
import com.djrapitops.plan.utilities.html.structure.AbstractAccordion;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElement;
|
||||
import com.djrapitops.plan.utilities.html.structure.AccordionElementContentBuilder;
|
||||
|
@ -70,16 +73,16 @@ public class TownsAccordion extends AbstractAccordion {
|
|||
String htmlID = "town_" + townName.replace(" ", "-");
|
||||
|
||||
String leftSide = new AccordionElementContentBuilder()
|
||||
.addRowBold("brown", "user", "Major", mayorName)
|
||||
.addRowBold("brown", "users", "Residents", residentCount)
|
||||
.addRowBold("brown", "map", "Town Blocks", landCount)
|
||||
.addRowBold("brown", "map-pin", "Location", coordinates)
|
||||
.addRowBold(Icon.called("user").of(Color.BROWN), "Major", mayorName)
|
||||
.addRowBold(Icon.called("users").of(Color.BROWN), "Residents", residentCount)
|
||||
.addRowBold(Icon.called("map").of(Color.BROWN), "Town Blocks", landCount)
|
||||
.addRowBold(Icon.called("map-pin").of(Color.RED), "Location", coordinates)
|
||||
.toHtml();
|
||||
|
||||
String rightSide = new AccordionElementContentBuilder()
|
||||
.addRowBold("red", "crosshairs", "Player Kills", playerKills)
|
||||
.addRowBold("green", "crosshairs", "Mob Kills", mobKills)
|
||||
.addRowBold("red", "frown-o", "Deaths", deaths)
|
||||
.addRowBold(Icons.PLAYER_KILLS, "Player Kills", playerKills)
|
||||
.addRowBold(Icons.MOB_KILLS, "Mob Kills", mobKills)
|
||||
.addRowBold(Icons.DEATHS, "Deaths", deaths)
|
||||
.toHtml();
|
||||
|
||||
addElement(new AccordionElement(htmlID, townName + "<span class=\"pull-right\">" + separated + "</span>")
|
||||
|
|
|
@ -14,6 +14,8 @@ import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
|||
import com.djrapitops.plan.system.cache.DataCache;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import com.djrapitops.plan.utilities.html.Html;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.utilities.Verify;
|
||||
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
||||
import com.palmergames.bukkit.towny.exceptions.TownyException;
|
||||
|
@ -34,8 +36,7 @@ public class TownyData extends PluginData {
|
|||
|
||||
public TownyData() {
|
||||
super(ContainerSize.TAB, "Towny");
|
||||
super.setPluginIcon("bank");
|
||||
super.setIconColor("brown");
|
||||
setPluginIcon(Icon.called("university").of(Color.BROWN).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,18 +52,18 @@ public class TownyData extends PluginData {
|
|||
String mayorName = town.getMayor().getName();
|
||||
String townMayor = Html.LINK.parse(PlanAPI.getInstance().getPlayerInspectPageLink(mayorName), mayorName);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Town", "bank", "brown"), townName);
|
||||
inspectContainer.addValue(getWithIcon("Town Mayor", "user", "brown"), townMayor);
|
||||
inspectContainer.addValue(getWithIcon("Town", Icon.called("university").of(Color.BROWN)), townName);
|
||||
inspectContainer.addValue(getWithIcon("Town Mayor", Icon.called("user").of(Color.BROWN)), townMayor);
|
||||
|
||||
try {
|
||||
Coord homeBlock = town.getHomeBlock().getCoord();
|
||||
String coordinates = "x: " + homeBlock.getX() + " z: " + homeBlock.getZ();
|
||||
inspectContainer.addValue(getWithIcon("Town Coordinates", "map-pin", "red"), coordinates);
|
||||
inspectContainer.addValue(getWithIcon("Town Coordinates", Icon.called("map-pin").of(Color.RED)), coordinates);
|
||||
} catch (TownyException e) {
|
||||
}
|
||||
|
||||
int residents = town.getResidents().size();
|
||||
inspectContainer.addValue(getWithIcon("Town Residents", "users", "brown"), residents);
|
||||
inspectContainer.addValue(getWithIcon("Town Residents", Icon.called("users").of(Color.BROWN)), residents);
|
||||
return inspectContainer;
|
||||
}
|
||||
} catch (NotRegisteredException ignore) {
|
||||
|
@ -76,7 +77,7 @@ public class TownyData extends PluginData {
|
|||
public AnalysisContainer getServerData(Collection<UUID> collection, AnalysisContainer analysisContainer) {
|
||||
List<Town> towns = getTopTowns();
|
||||
|
||||
analysisContainer.addValue(getWithIcon("Number of Towns", "bank", "brown"), towns.size());
|
||||
analysisContainer.addValue(getWithIcon("Number of Towns", Icon.called("university").of(Color.BROWN)), towns.size());
|
||||
|
||||
if (!towns.isEmpty()) {
|
||||
|
||||
|
@ -92,7 +93,7 @@ public class TownyData extends PluginData {
|
|||
.filter(Verify::notNull)
|
||||
.forEach(uuid -> userTowns.put(uuid, uuid.equals(mayorUUID) ? "<b>" + townName + "</b>" : townName));
|
||||
}
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Town", "bank"), userTowns);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Town", Icon.called("university")), userTowns);
|
||||
|
||||
TownsAccordion townsAccordion = new TownsAccordion(
|
||||
towns,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -12,6 +12,8 @@ import com.djrapitops.plan.data.store.keys.AnalysisKeys;
|
|||
import com.djrapitops.plan.data.store.mutators.PlayersMutator;
|
||||
import com.djrapitops.plan.system.cache.DataCache;
|
||||
import com.djrapitops.plan.utilities.FormatUtils;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.pluginbridge.plan.FakeOfflinePlayer;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
|
@ -30,8 +32,7 @@ public class VaultEcoData extends PluginData {
|
|||
|
||||
public VaultEcoData(Economy econ) {
|
||||
super(ContainerSize.THIRD, "Economy (" + econ.getName() + ")");
|
||||
super.setIconColor("green");
|
||||
super.setPluginIcon("money");
|
||||
setPluginIcon(Icon.called("money-bill-wave").of(Color.GREEN).build());
|
||||
this.econ = econ;
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ public class VaultEcoData extends PluginData {
|
|||
return inspectContainer;
|
||||
}
|
||||
OfflinePlayer p = new FakeOfflinePlayer(uuid, name);
|
||||
inspectContainer.addValue(getWithIcon("Balance", "money", "green"), econ.format(econ.getBalance(p)));
|
||||
inspectContainer.addValue(getWithIcon("Balance", Icon.called("money-bill-wave").of(Color.GREEN)), econ.format(econ.getBalance(p)));
|
||||
|
||||
return inspectContainer;
|
||||
}
|
||||
|
@ -61,8 +62,8 @@ public class VaultEcoData extends PluginData {
|
|||
totalBalance += bal;
|
||||
balances.put(p.getUniqueId(), econ.format(bal));
|
||||
}
|
||||
analysisContainer.addValue(getWithIcon("Server Balance", "money", "green"), FormatUtils.cutDecimals(totalBalance));
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Balance", "money"), balances);
|
||||
analysisContainer.addValue(getWithIcon("Server Balance", Icon.called("money-bill-wave").of(Color.GREEN)), FormatUtils.cutDecimals(totalBalance));
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Balance", Icon.called("money-bill-wave")), balances);
|
||||
|
||||
return analysisContainer;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Licence is provided in the jar as license.yml also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||
*/
|
||||
|
@ -10,6 +10,8 @@ import com.djrapitops.plan.data.element.InspectContainer;
|
|||
import com.djrapitops.plan.data.element.TableContainer;
|
||||
import com.djrapitops.plan.data.plugin.ContainerSize;
|
||||
import com.djrapitops.plan.data.plugin.PluginData;
|
||||
import com.djrapitops.plan.utilities.html.icon.Color;
|
||||
import com.djrapitops.plan.utilities.html.icon.Icon;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -29,8 +31,7 @@ public class ViaVersionData extends PluginData {
|
|||
|
||||
public ViaVersionData(ProtocolTable table) {
|
||||
super(ContainerSize.THIRD, "ViaVersion");
|
||||
super.setPluginIcon("gamepad");
|
||||
super.setIconColor("light-green");
|
||||
setPluginIcon(Icon.called("gamepad").of(Color.LIGHT_GREEN).build());
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
|
@ -39,7 +40,7 @@ public class ViaVersionData extends PluginData {
|
|||
try {
|
||||
int protocolVersion = table.getProtocolVersion(uuid);
|
||||
|
||||
inspectContainer.addValue(getWithIcon("Last Join Version", "signal", "light-green"),
|
||||
inspectContainer.addValue(getWithIcon("Last Join Version", Icon.called("signal").of(Color.LIGHT_GREEN)),
|
||||
protocolVersion != -1 ? Protocol.getMCVersion(protocolVersion) : "Not Yet Known");
|
||||
} catch (DBOpException ex) {
|
||||
Log.toLog(this.getClass(), ex);
|
||||
|
@ -62,10 +63,10 @@ public class ViaVersionData extends PluginData {
|
|||
Map<UUID, String> userVersions = versions.entrySet().stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, entry -> Protocol.getMCVersion(entry.getValue())));
|
||||
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Last Version", "signal"), userVersions);
|
||||
analysisContainer.addPlayerTableValues(getWithIcon("Last Version", Icon.called("signal")), userVersions);
|
||||
|
||||
String versionS = getWithIcon("Version", "signal");
|
||||
String membersS = getWithIcon("Users", "users");
|
||||
String versionS = getWithIcon("Version", Icon.called("signal"));
|
||||
String membersS = getWithIcon("Users", Icon.called("users"));
|
||||
TableContainer versionTable = new TableContainer(versionS, membersS);
|
||||
versionTable.setColor("light-green");
|
||||
Map<String, Integer> usersPerVersion = getUsersPerVersion(versions);
|
||||
|
|
Loading…
Reference in New Issue
Block a user