mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-12 06:41:50 +01:00
Version 1.6.2
Debug command, bugfixes, less errors to log.
This commit is contained in:
parent
ae4d1138f8
commit
c1603198ba
@ -2,6 +2,19 @@
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group/>
|
||||
<group>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/PlayerLoggerHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/EssentialsHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/PlaceholderAPIHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/AdvancedAchievementsHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/FactionsHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/BukkitDataHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/Plan.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/VaultHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/SuperbVoteHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/TownyHook.java</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/plugin.yml</file>
|
||||
<file>file:/C:/Users/Risto/Documents/NetBeansProjects/Plan/src/com/djrapitops/plan/command/hooks/OnTimeHook.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
@ -121,7 +121,9 @@ public class Plan extends JavaPlugin {
|
||||
hookFail.add(ChatColor.YELLOW + pluginName);
|
||||
}
|
||||
});
|
||||
logToFile(errors.toString());
|
||||
if (!errors.toString().equals("MAIN-HOOKINIT\n")) {
|
||||
logToFile(errors.toString());
|
||||
}
|
||||
for (String extraHook : this.extraHooks.keySet()) {
|
||||
this.hooks.put(extraHook, this.extraHooks.get(extraHook));
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.djrapitops.plan;
|
||||
import com.djrapitops.plan.command.CommandType;
|
||||
import com.djrapitops.plan.command.SubCommand;
|
||||
import com.djrapitops.plan.command.commands.AnalyzeCommand;
|
||||
import com.djrapitops.plan.command.commands.DebugCommand;
|
||||
import com.djrapitops.plan.command.commands.HelpCommand;
|
||||
import com.djrapitops.plan.command.commands.InfoCommand;
|
||||
import com.djrapitops.plan.command.commands.InspectCommand;
|
||||
@ -32,6 +33,7 @@ public class PlanCommand implements CommandExecutor {
|
||||
commands.add(new SearchCommand(plugin));
|
||||
commands.add(new InfoCommand(plugin));
|
||||
commands.add(new ReloadCommand(plugin));
|
||||
commands.add(new DebugCommand(plugin));
|
||||
}
|
||||
|
||||
public List<SubCommand> getCommands() {
|
||||
|
@ -4,6 +4,7 @@ package com.djrapitops.plan.api;
|
||||
public enum DataType {
|
||||
STRING, // Any preformatted data & words
|
||||
TIME, // Long in milliseconds
|
||||
TIME_TIMESTAMP, // Long in milliseconds since Epoch Date 1970, will be subtracted from current time.
|
||||
DATE, // Long in milliseconds since Epoch Date 1970
|
||||
LOCATION, // X:# Y:# Z:#
|
||||
AMOUNT, // Number
|
||||
|
37
src/com/djrapitops/plan/command/commands/DebugCommand.java
Normal file
37
src/com/djrapitops/plan/command/commands/DebugCommand.java
Normal file
@ -0,0 +1,37 @@
|
||||
package com.djrapitops.plan.command.commands;
|
||||
|
||||
import com.djrapitops.plan.Plan;
|
||||
import com.djrapitops.plan.command.CommandType;
|
||||
import com.djrapitops.plan.command.SubCommand;
|
||||
import com.djrapitops.plan.command.utils.DataUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public class DebugCommand extends SubCommand {
|
||||
|
||||
private Plan plugin;
|
||||
|
||||
public DebugCommand(Plan plugin) {
|
||||
super("debug", "plan.debug", "Test plugin for possible errors (debug feature)", CommandType.PLAYER);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||
if (!plugin.getConfig().getBoolean("debug")) {
|
||||
sender.sendMessage(ChatColor.RED+"[Plan] Debug disabled in config");
|
||||
return true;
|
||||
}
|
||||
String[] commands = {"plan", "plan info", "plan reload", "plan inspect",
|
||||
"plan inspect "+sender.getName()+"-a", "plan inspect reinogiern",
|
||||
"plan analyze", "plan search", "plan search "+sender.getName()+" -p"};
|
||||
for (String command : commands) {
|
||||
Bukkit.dispatchCommand(sender, command);
|
||||
}
|
||||
sender.sendMessage(ChatColor.GREEN+"[Plan] Debug successful, possible errors written in file.");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -3,11 +3,7 @@ package com.djrapitops.plan.command.commands;
|
||||
import com.djrapitops.plan.Plan;
|
||||
import com.djrapitops.plan.command.CommandType;
|
||||
import com.djrapitops.plan.command.SubCommand;
|
||||
import com.djrapitops.plan.command.hooks.PlaceholderAPIHook;
|
||||
import com.djrapitops.plan.command.utils.DataUtils;
|
||||
import com.djrapitops.plan.command.utils.MiscUtils;
|
||||
import java.util.List;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
@ -78,16 +78,19 @@ public class AdvancedAchievementsHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
if (totalAchievements > 0) {
|
||||
if (this.usingUUID) {
|
||||
data.put("AAC-ACHIEVEMENTS", new DataPoint(aAPlugin.getDb().getPlayerAchievementsAmount(uuid.toString()) + " / " + totalAchievements, DataType.AMOUNT_WITH_MAX));
|
||||
} else {
|
||||
plugin.log("You're using outdated version of AdvancedAchievements!");
|
||||
try {
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
if (totalAchievements > 0) {
|
||||
if (this.usingUUID) {
|
||||
data.put("AAC-ACHIEVEMENTS", new DataPoint(aAPlugin.getDb().getPlayerAchievementsAmount(uuid.toString()) + " / " + totalAchievements, DataType.AMOUNT_WITH_MAX));
|
||||
} else {
|
||||
plugin.log("You're using outdated version of AdvancedAchievements!");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -22,14 +22,17 @@ public class BukkitDataHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("BUK-REGISTERED", new DataPoint("" + p.getFirstPlayed(), DataType.DATE));
|
||||
data.put("BUK-LAST LOGIN", new DataPoint("" + p.getLastPlayed(), DataType.DATE));
|
||||
if (p.isBanned()) {
|
||||
data.put("BUK-BANNED", new DataPoint("" + p.isBanned(), DataType.BOOLEAN));
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("BUK-REGISTERED", new DataPoint("" + p.getFirstPlayed(), DataType.DATE));
|
||||
data.put("BUK-LAST LOGIN", new DataPoint("" + p.getLastPlayed(), DataType.DATE));
|
||||
if (p.isBanned()) {
|
||||
data.put("BUK-BANNED", new DataPoint("" + p.isBanned(), DataType.BOOLEAN));
|
||||
}
|
||||
data.put("BUK-ONLINE", new DataPoint("" + p.isOnline(), DataType.BOOLEAN));
|
||||
}
|
||||
data.put("BUK-ONLINE", new DataPoint("" + p.isOnline(), DataType.BOOLEAN));
|
||||
} catch (IllegalArgumentException | NullPointerException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -38,14 +41,17 @@ public class BukkitDataHook implements Hook {
|
||||
public HashMap<String, DataPoint> getAllData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
data.putAll(getData(player));
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
Location loc = p.getBedSpawnLocation();
|
||||
if (Optional.of(loc).isPresent()) {
|
||||
data.put("BUK-BED LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("BUK-BED LOCATION", new DataPoint(" X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
Location loc = p.getBedSpawnLocation();
|
||||
if (Optional.of(loc).isPresent()) {
|
||||
data.put("BUK-BED LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("BUK-BED LOCATION", new DataPoint(" X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
}
|
||||
data.put("BUK-UUID", new DataPoint("" + p.getUniqueId(), DataType.OTHER));
|
||||
}
|
||||
data.put("BUK-UUID", new DataPoint("" + p.getUniqueId(), DataType.OTHER));
|
||||
} catch (IllegalArgumentException | NullPointerException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -32,44 +32,47 @@ public class EssentialsHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
User user = this.ess.getOfflineUser(player);
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
if (Optional.of(user).isPresent()) {
|
||||
if (this.ess.getServer().getBanList(BanList.Type.IP).isBanned(player)
|
||||
|| BanLookup.isBanned(this.ess, player)) {
|
||||
data.put("ESS-BANNED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-BAN REASON", new DataPoint("" + BanLookup.getBanEntry(this.ess, player).getReason(), DataType.STRING));
|
||||
}
|
||||
if (user.isJailed()) {
|
||||
data.put("ESS-JAILED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-JAIL TIME", new DataPoint("" + user.getJailTimeout(), DataType.TIME));
|
||||
}
|
||||
if (user.isMuted()) {
|
||||
data.put("ESS-MUTED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-MUTE TIME", new DataPoint("" + user.getMuteTimeout(), DataType.TIME));
|
||||
}
|
||||
try {
|
||||
if (user.isReachable()) {
|
||||
Location loc = user.getLocation();
|
||||
data.put("ESS-LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("ESS-LOCATION", new DataPoint(" X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
} else {
|
||||
Location loc = user.getLogoutLocation();
|
||||
data.put("ESS-LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("ESS-LOCATION", new DataPoint("X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
try {
|
||||
User user = this.ess.getOfflineUser(player);
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
if (Optional.of(user).isPresent()) {
|
||||
if (this.ess.getServer().getBanList(BanList.Type.IP).isBanned(player)
|
||||
|| BanLookup.isBanned(this.ess, player)) {
|
||||
data.put("ESS-BANNED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-BAN REASON", new DataPoint("" + BanLookup.getBanEntry(this.ess, player).getReason(), DataType.STRING));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.plugin.logToFile("ESSENTIALSHOOK\n" + e + "\n" + e.getMessage());
|
||||
if (user.isJailed()) {
|
||||
data.put("ESS-JAILED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-JAIL TIME", new DataPoint("" + user.getJailTimeout(), DataType.TIME_TIMESTAMP));
|
||||
}
|
||||
if (user.isMuted()) {
|
||||
data.put("ESS-MUTED", new DataPoint("" + true, DataType.BOOLEAN));
|
||||
data.put("ESS-MUTE TIME", new DataPoint("" + user.getMuteTimeout(), DataType.TIME_TIMESTAMP));
|
||||
}
|
||||
try {
|
||||
if (user.isReachable()) {
|
||||
Location loc = user.getLocation();
|
||||
data.put("ESS-LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("ESS-LOCATION", new DataPoint(" X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
} else {
|
||||
Location loc = user.getLogoutLocation();
|
||||
data.put("ESS-LOCATION WORLD", new DataPoint(loc.getWorld().getName(), DataType.STRING));
|
||||
data.put("ESS-LOCATION", new DataPoint("X:" + loc.getBlockX() + " Y:" + loc.getBlockY() + " Z:" + loc.getBlockZ(), DataType.LOCATION));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.plugin.logToFile("ESSENTIALSHOOK\n" + e + "\n" + e.getMessage());
|
||||
|
||||
}
|
||||
data.put("ESS-NICKNAME", new DataPoint("" + user.getDisplayName(), DataType.STRING));
|
||||
if (user.isReachable()) {
|
||||
data.put("ESS-ONLINE SINCE", new DataPoint("" + user.getLastLogin(), DataType.TIME));
|
||||
} else {
|
||||
data.put("ESS-OFFLINE SINCE", new DataPoint("" + user.getLastLogout(), DataType.TIME));
|
||||
}
|
||||
data.put("ESS-NICKNAME", new DataPoint("" + user.getDisplayName(), DataType.STRING));
|
||||
if (user.isReachable()) {
|
||||
data.put("ESS-ONLINE SINCE", new DataPoint("" + user.getLastLogin(), DataType.TIME_TIMESTAMP));
|
||||
} else {
|
||||
data.put("ESS-OFFLINE SINCE", new DataPoint("" + user.getLastLogout(), DataType.TIME_TIMESTAMP));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -78,18 +81,20 @@ public class EssentialsHook implements Hook {
|
||||
public HashMap<String, DataPoint> getAllData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
data.putAll(getData(player));
|
||||
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
User user = this.ess.getOfflineUser(player);
|
||||
if (Optional.of(user).isPresent()) {
|
||||
data.put("ESS-UUID", new DataPoint("" + user.getBase().getUniqueId().toString(), DataType.OTHER));
|
||||
data.put("ESS-HEALTH", new DataPoint("" + user.getBase().getHealth(), DataType.AMOUNT));
|
||||
data.put("ESS-HUNGER", new DataPoint("" + user.getBase().getFoodLevel(), DataType.AMOUNT));
|
||||
data.put("ESS-XP LEVEL", new DataPoint("" + user.getBase().getLevel(), DataType.AMOUNT));
|
||||
data.put("ESS-OPPED", new DataPoint("" + user.getBase().isOp(), DataType.BOOLEAN));
|
||||
data.put("ESS-FLYING", new DataPoint("" + user.getBase().isFlying(), DataType.BOOLEAN));
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
User user = this.ess.getOfflineUser(player);
|
||||
if (Optional.of(user).isPresent()) {
|
||||
data.put("ESS-UUID", new DataPoint("" + user.getBase().getUniqueId().toString(), DataType.OTHER));
|
||||
data.put("ESS-HEALTH", new DataPoint("" + user.getBase().getHealth(), DataType.AMOUNT));
|
||||
data.put("ESS-HUNGER", new DataPoint("" + user.getBase().getFoodLevel(), DataType.AMOUNT));
|
||||
data.put("ESS-XP LEVEL", new DataPoint("" + user.getBase().getLevel(), DataType.AMOUNT));
|
||||
data.put("ESS-OPPED", new DataPoint("" + user.getBase().isOp(), DataType.BOOLEAN));
|
||||
data.put("ESS-FLYING", new DataPoint("" + user.getBase().isFlying(), DataType.BOOLEAN));
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -27,20 +27,23 @@ public class FactionsHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
MPlayer mplayer;
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
mplayer = MPlayer.get(uuid);
|
||||
if (mplayer.hasFaction()) {
|
||||
data.put("FAC-FACTION", new DataPoint(mplayer.getFactionName(), DataType.STRING));
|
||||
if (mplayer.hasTitle()) {
|
||||
data.put("FAC-TITLE", new DataPoint(mplayer.getTitle(), DataType.STRING));
|
||||
try {
|
||||
MPlayer mplayer;
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
mplayer = MPlayer.get(uuid);
|
||||
if (mplayer.hasFaction()) {
|
||||
data.put("FAC-FACTION", new DataPoint(mplayer.getFactionName(), DataType.STRING));
|
||||
if (mplayer.hasTitle()) {
|
||||
data.put("FAC-TITLE", new DataPoint(mplayer.getTitle(), DataType.STRING));
|
||||
}
|
||||
}
|
||||
data.put("FAC-POWER", new DataPoint(mplayer.getPowerRounded() + " / " + mplayer.getPowerMax(), DataType.AMOUNT_WITH_MAX));
|
||||
data.put("FAC-POWER PER HOUR", new DataPoint("" + mplayer.getPowerPerHour(), DataType.AMOUNT));
|
||||
data.put("FAC-POWER PER DEATH", new DataPoint("" + mplayer.getPowerPerDeath(), DataType.AMOUNT));
|
||||
}
|
||||
data.put("FAC-POWER", new DataPoint(mplayer.getPowerRounded() + " / " + mplayer.getPowerMax(), DataType.AMOUNT_WITH_MAX));
|
||||
data.put("FAC-POWER PER HOUR", new DataPoint("" + mplayer.getPowerPerHour(), DataType.AMOUNT));
|
||||
data.put("FAC-POWER PER DEATH", new DataPoint("" + mplayer.getPowerPerDeath(), DataType.AMOUNT));
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -24,20 +24,23 @@ public class OnTimeHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
data.put("ONT-LAST LOGIN", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.LASTLOGIN), DataType.DEPRECATED));
|
||||
data.put("ONT-TOTAL PLAY", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALPLAY), DataType.TIME));
|
||||
data.put("ONT-TOTAL VOTES", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALVOTE), DataType.AMOUNT));
|
||||
data.put("ONT-TOTAL REFERRED", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALREFER), DataType.AMOUNT));
|
||||
} catch (NoClassDefFoundError e) {
|
||||
plugin.logToFile("ONTIME HOOK ERROR"
|
||||
+ "\nOntimeHook enabled but failing, could not get data."
|
||||
+ "\n" + e
|
||||
+ "\n" + e.getMessage());
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
data.put("ONT-LAST LOGIN", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.LASTLOGIN), DataType.DEPRECATED));
|
||||
data.put("ONT-TOTAL PLAY", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALPLAY), DataType.TIME));
|
||||
data.put("ONT-TOTAL VOTES", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALVOTE), DataType.AMOUNT));
|
||||
data.put("ONT-TOTAL REFERRED", new DataPoint("" + OnTimeAPI.getPlayerTimeData(player, OnTimeAPI.data.TOTALREFER), DataType.AMOUNT));
|
||||
} catch (NoClassDefFoundError e) {
|
||||
plugin.logToFile("ONTIME HOOK ERROR"
|
||||
+ "\nOntimeHook enabled but failing, could not get data."
|
||||
+ "\n" + e
|
||||
+ "\n" + e.getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -26,15 +26,18 @@ public class PlayerLoggerHook implements Hook {
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
FileConfiguration file = SettingsManager.getInstance().getData();
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("PLG-REGISTERED", new DataPoint(file.getString("Players." + uuid + ".DateJoined"), DataType.DEPRECATED));
|
||||
data.put("PLG-LAST LOGIN", new DataPoint(file.getString("Players." + uuid + ".LastSeen"), DataType.DEPRECATED));
|
||||
data.put("PLG-TIMES JOINED", new DataPoint(file.getString("Players." + uuid + ".TimePlayed"), DataType.AMOUNT));
|
||||
data.put("PLG-KILLS", new DataPoint(file.getString("Players." + uuid + ".Kills"), DataType.AMOUNT));
|
||||
data.put("PLG-DEATHS", new DataPoint(file.getString("Players." + uuid + ".Deaths"), DataType.AMOUNT));
|
||||
data.put("PLG-TIMES KICKED", new DataPoint(file.getString("Players." + uuid + ".Kicks"), DataType.AMOUNT));
|
||||
try {
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("PLG-REGISTERED", new DataPoint(file.getString("Players." + uuid + ".DateJoined"), DataType.DEPRECATED));
|
||||
data.put("PLG-LAST LOGIN", new DataPoint(file.getString("Players." + uuid + ".LastSeen"), DataType.DEPRECATED));
|
||||
data.put("PLG-TIMES JOINED", new DataPoint(file.getString("Players." + uuid + ".TimePlayed"), DataType.AMOUNT));
|
||||
data.put("PLG-KILLS", new DataPoint(file.getString("Players." + uuid + ".Kills"), DataType.AMOUNT));
|
||||
data.put("PLG-DEATHS", new DataPoint(file.getString("Players." + uuid + ".Deaths"), DataType.AMOUNT));
|
||||
data.put("PLG-TIMES KICKED", new DataPoint(file.getString("Players." + uuid + ".Kicks"), DataType.AMOUNT));
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -43,13 +46,16 @@ public class PlayerLoggerHook implements Hook {
|
||||
public HashMap<String, DataPoint> getAllData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
data.putAll(getData(player));
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
FileConfiguration file = SettingsManager.getInstance().getData();
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("PLG-STICKS MADE", new DataPoint(file.getString("Players." + uuid + ".Sticks"), DataType.AMOUNT));
|
||||
data.put("PLG-STEPS", new DataPoint(file.getString("Players." + uuid + ".Steps"), DataType.AMOUNT));
|
||||
data.put("PLG-CROUCHES", new DataPoint(file.getString("Players." + uuid + ".Twerks"), DataType.AMOUNT));
|
||||
try {
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
FileConfiguration file = SettingsManager.getInstance().getData();
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("PLG-STICKS MADE", new DataPoint(file.getString("Players." + uuid + ".Sticks"), DataType.AMOUNT));
|
||||
data.put("PLG-STEPS", new DataPoint(file.getString("Players." + uuid + ".Steps"), DataType.AMOUNT));
|
||||
data.put("PLG-CROUCHES", new DataPoint(file.getString("Players." + uuid + ".Twerks"), DataType.AMOUNT));
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -24,10 +24,13 @@ public class SuperbVoteHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("SVO-VOTES", new DataPoint("" + hookP.getVoteStorage().getVotes(uuid), DataType.AMOUNT));
|
||||
try {
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("SVO-VOTES", new DataPoint("" + hookP.getVoteStorage().getVotes(uuid), DataType.AMOUNT));
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -33,33 +33,36 @@ public class TownyHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
Resident resident = TownyUniverse.getDataSource().getResident(player);
|
||||
if (resident != null) {
|
||||
data.put("TOW-ONLINE", new DataPoint("" + BukkitTools.isOnline(player), DataType.BOOLEAN));
|
||||
data.put("TOW-REGISTERED", new DataPoint(registeredFormat.format(resident.getRegistered()), DataType.DEPRECATED));
|
||||
data.put("TOW-LAST LOGIN", new DataPoint(lastOnlineFormat.format(resident.getLastOnline()), DataType.DEPRECATED));
|
||||
data.put("TOW-OWNER OF", new DataPoint(resident.getTownBlocks().size() + " plots", DataType.STRING));
|
||||
try {
|
||||
if (resident.hasTown()) {
|
||||
data.put("TOW-TOWN", new DataPoint(getFormattedName(resident.getTown()), DataType.STRING));
|
||||
}
|
||||
if (resident.hasNation()) {
|
||||
if (!resident.getNationRanks().isEmpty()) {
|
||||
data.put("TOW-NATION", new DataPoint(resident.getTown().getNation().getName(), DataType.STRING));
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
Resident resident = TownyUniverse.getDataSource().getResident(player);
|
||||
if (resident != null) {
|
||||
data.put("TOW-ONLINE", new DataPoint("" + BukkitTools.isOnline(player), DataType.BOOLEAN));
|
||||
data.put("TOW-REGISTERED", new DataPoint(registeredFormat.format(resident.getRegistered()), DataType.DEPRECATED));
|
||||
data.put("TOW-LAST LOGIN", new DataPoint(lastOnlineFormat.format(resident.getLastOnline()), DataType.DEPRECATED));
|
||||
data.put("TOW-OWNER OF", new DataPoint(resident.getTownBlocks().size() + " plots", DataType.STRING));
|
||||
try {
|
||||
if (resident.hasTown()) {
|
||||
data.put("TOW-TOWN", new DataPoint(getFormattedName(resident.getTown()), DataType.STRING));
|
||||
}
|
||||
if (resident.hasNation()) {
|
||||
if (!resident.getNationRanks().isEmpty()) {
|
||||
data.put("TOW-NATION", new DataPoint(resident.getTown().getNation().getName(), DataType.STRING));
|
||||
}
|
||||
}
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK\n" + e + "\n" + e.getMessage());
|
||||
|
||||
}
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK\n" + e + "\n" + e.getMessage());
|
||||
|
||||
}
|
||||
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK\n" + e + "\nError resident: " + player);
|
||||
}
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK\n" + e + "\nError resident: " + player);
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -68,19 +71,22 @@ public class TownyHook implements Hook {
|
||||
public HashMap<String, DataPoint> getAllData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
data.putAll(getData(player));
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
Resident resident = TownyUniverse.getDataSource().getResident(player);
|
||||
try {
|
||||
OfflinePlayer p = getOfflinePlayer(UUIDFetcher.getUUIDOf(player));
|
||||
if (p.hasPlayedBefore()) {
|
||||
try {
|
||||
Resident resident = TownyUniverse.getDataSource().getResident(player);
|
||||
|
||||
data.put("TOW-PLOT PERMS", new DataPoint(resident.getPermissions().getColourString(), DataType.STRING));
|
||||
data.put("TOW-PLOT OPTIONS", new DataPoint("PVP: " + ((resident.getPermissions().pvp) ? "ON" : "OFF") + " Explosions: " + ((resident.getPermissions().explosion) ? "ON" : "OFF") + " Firespread: " + ((resident.getPermissions().fire) ? "ON" : "OFF") + " Mob Spawns: " + ((resident.getPermissions().mobs) ? "ON" : "OFF"), DataType.STRING));
|
||||
List<Resident> friends = resident.getFriends();
|
||||
data.put("TOW-FRIENDS", new DataPoint(getFormattedResidents("Friends", friends).toString(), DataType.STRING));
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK-All\n" + e + "\nError resident: " + player);
|
||||
data.put("TOW-PLOT PERMS", new DataPoint(resident.getPermissions().getColourString(), DataType.STRING));
|
||||
data.put("TOW-PLOT OPTIONS", new DataPoint("PVP: " + ((resident.getPermissions().pvp) ? "ON" : "OFF") + " Explosions: " + ((resident.getPermissions().explosion) ? "ON" : "OFF") + " Firespread: " + ((resident.getPermissions().fire) ? "ON" : "OFF") + " Mob Spawns: " + ((resident.getPermissions().mobs) ? "ON" : "OFF"), DataType.STRING));
|
||||
List<Resident> friends = resident.getFriends();
|
||||
data.put("TOW-FRIENDS", new DataPoint(getFormattedResidents("Friends", friends).toString(), DataType.STRING));
|
||||
} catch (TownyException e) {
|
||||
plugin.logToFile("TOWNYHOOK-All\n" + e + "\nError resident: " + player);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -25,10 +25,13 @@ public class VaultHook implements Hook {
|
||||
@Override
|
||||
public HashMap<String, DataPoint> getData(String player) throws Exception {
|
||||
HashMap<String, DataPoint> data = new HashMap<>();
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("ECO-BALANCE", new DataPoint(this.econ.format(this.econ.getBalance(p)), DataType.AMOUNT_WITH_LETTERS));
|
||||
try {
|
||||
UUID uuid = UUIDFetcher.getUUIDOf(player);
|
||||
OfflinePlayer p = getOfflinePlayer(uuid);
|
||||
if (p.hasPlayedBefore()) {
|
||||
data.put("ECO-BALANCE", new DataPoint(this.econ.format(this.econ.getBalance(p)), DataType.AMOUNT_WITH_LETTERS));
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ public class Analysis {
|
||||
HashMap<String, DataType> dataTypes = new HashMap<>();
|
||||
// Ignore following keys (Strings, unprocessable or irrelevant data)
|
||||
DataType[] ignoreType = {DataType.DEPRECATED, DataType.STRING, DataType.LOCATION, DataType.LINK, DataType.HEATMAP,
|
||||
DataType.MAP, DataType.OTHER, DataType.DATE};
|
||||
String[] ignore = {"ESS-ONLINE SINCE", "ESS-OFFLINE SINCE", "ESS-HEALTH", "ESS-HUNGER", "ESS-XP LEVEL", "ESS-OPPED"};
|
||||
DataType.MAP, DataType.OTHER, DataType.DATE, DataType.TIME_TIMESTAMP};
|
||||
String[] ignore = {"ESS-HEALTH", "ESS-HUNGER", "ESS-XP LEVEL", "ESS-OPPED"};
|
||||
List<String> ignoreKeys = new ArrayList<>();
|
||||
List<DataType> ignoreTypes = new ArrayList<>();
|
||||
try {
|
||||
@ -61,29 +61,43 @@ public class Analysis {
|
||||
|
||||
// Analyze
|
||||
playerDataLists.keySet().parallelStream().forEach((dataKey) -> {
|
||||
if (null != dataTypes.get(dataKey)) {
|
||||
switch (dataTypes.get(dataKey)) {
|
||||
case AMOUNT:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.AmountAverage(playerDataLists.get(dataKey)), DataType.AMOUNT));
|
||||
break;
|
||||
case AMOUNT_WITH_LETTERS:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.AmountWLettersAverage(playerDataLists.get(dataKey)), DataType.AMOUNT));
|
||||
break;
|
||||
case AMOUNT_WITH_MAX:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.AmountWMaxAverage(playerDataLists.get(dataKey)), DataType.AMOUNT));
|
||||
break;
|
||||
case TIME:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.TimeAverage(playerDataLists.get(dataKey)), DataType.TIME));
|
||||
break;
|
||||
case BOOLEAN:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.BooleanPercent(playerDataLists.get(dataKey)), DataType.PERCENT));
|
||||
break;
|
||||
case PERCENT:
|
||||
analyzedData.put(dataKey, new DataPoint(AnalysisUtils.AmountWLettersAverage(playerDataLists.get(dataKey))+"%", DataType.PERCENT));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
DataType type = dataTypes.get(dataKey);
|
||||
if (type == DataType.AMOUNT
|
||||
|| type == DataType.AMOUNT_WITH_LETTERS
|
||||
|| type == DataType.AMOUNT_WITH_MAX
|
||||
|| type == DataType.PERCENT) {
|
||||
// Get a clean list of dataPoints with only numbers
|
||||
List<String> dataPoints = playerDataLists.get(dataKey);
|
||||
if (null != type) {
|
||||
switch (type) {
|
||||
case AMOUNT_WITH_LETTERS:
|
||||
dataPoints = AnalysisUtils.parseWLetters(playerDataLists.get(dataKey));
|
||||
break;
|
||||
case PERCENT:
|
||||
dataPoints = AnalysisUtils.parseWLetters(playerDataLists.get(dataKey));
|
||||
break;
|
||||
case AMOUNT_WITH_MAX:
|
||||
dataPoints = AnalysisUtils.parseWMax(playerDataLists.get(dataKey));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (type == DataType.PERCENT) {
|
||||
String averageAmount = AnalysisUtils.AmountAverage(dataPoints);
|
||||
analyzedData.put(dataKey, new DataPoint(averageAmount + "%", DataType.PERCENT));
|
||||
} else {
|
||||
String averageAmount = AnalysisUtils.AmountAverage(dataPoints);
|
||||
analyzedData.put(dataKey, new DataPoint(averageAmount, DataType.AMOUNT));
|
||||
// String highestAmount = AnalysisUtils.AmountHighest(dataPoints);
|
||||
// analyzedData.put(dataKey + " (HIGHEST)", new DataPoint(highestAmount, DataType.AMOUNT));
|
||||
}
|
||||
} else if (type == DataType.TIME) {
|
||||
String averageTime = AnalysisUtils.TimeAverage(playerDataLists.get(dataKey));
|
||||
analyzedData.put(dataKey, new DataPoint(averageTime, DataType.TIME));
|
||||
} else if (type == DataType.BOOLEAN) {
|
||||
String percent = AnalysisUtils.BooleanPercent(playerDataLists.get(dataKey));
|
||||
analyzedData.put(dataKey, new DataPoint(percent, DataType.PERCENT));
|
||||
}
|
||||
});
|
||||
return DataFormatUtils.formatAnalyzed(analyzedData);
|
||||
|
@ -19,20 +19,20 @@ class AnalysisUtils {
|
||||
return "" + (sum * 1.0 / dataPoints.size());
|
||||
}
|
||||
|
||||
static String AmountWLettersAverage(List<String> dataPoints) {
|
||||
static List<String> parseWLetters(List<String> dataPoints) {
|
||||
List<String> parsed = new ArrayList<>();
|
||||
dataPoints.parallelStream().forEach((dataPoint) -> {
|
||||
parsed.add(DataFormatUtils.removeLetters(dataPoint));
|
||||
});
|
||||
return AmountAverage(parsed);
|
||||
return parsed;
|
||||
}
|
||||
|
||||
static String AmountWMaxAverage(List<String> dataPoints) {
|
||||
static List<String> parseWMax(List<String> dataPoints) {
|
||||
List<String> parsed = new ArrayList<>();
|
||||
dataPoints.parallelStream().forEach((dataPoint) -> {
|
||||
parsed.add(dataPoint.split(" ")[0]);
|
||||
});
|
||||
return AmountAverage(parsed);
|
||||
return parsed;
|
||||
}
|
||||
|
||||
static String TimeAverage(List<String> dataPoints) {
|
||||
@ -59,4 +59,18 @@ class AnalysisUtils {
|
||||
return "" + ((amount * 1.0 / dataPoints.size())*100)+"%";
|
||||
}
|
||||
|
||||
static String AmountHighest(List<String> dataPoints) {
|
||||
int highest = 0;
|
||||
for (String dataPoint : dataPoints) {
|
||||
try {
|
||||
int value = Integer.parseInt(dataPoint);
|
||||
if (value > highest) {
|
||||
highest = value;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
return ""+highest;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
|
||||
public class DataFormatUtils {
|
||||
|
||||
public static HashMap<String, DataPoint> removeExtraDataPoints(HashMap<String, DataPoint> data) throws NumberFormatException {
|
||||
Date now = new Date();
|
||||
Date dateNow = new Date();
|
||||
List<String> remove = new ArrayList<>();
|
||||
Plan plugin = getPlugin(Plan.class);
|
||||
data.keySet().parallelStream().forEach((key) -> {
|
||||
@ -90,26 +90,32 @@ public class DataFormatUtils {
|
||||
data.keySet().parallelStream()
|
||||
.filter((key) -> (data.get(key).type() == DataType.DEPRECATED))
|
||||
.forEach((key) -> {
|
||||
remove.add(key);
|
||||
});
|
||||
remove.add(key);
|
||||
});
|
||||
remove.parallelStream().forEach((key) -> {
|
||||
data.remove(key);
|
||||
});
|
||||
// Format TimeStamps and Time Amounts
|
||||
for (String key : data.keySet()) {
|
||||
if (data.get(key).type() == DataType.DATE) {
|
||||
String formatted = formatTimeStamp(data.get(key).data());
|
||||
data.get(key).setData(formatted);
|
||||
} else if (data.get(key).type() == DataType.TIME) {
|
||||
String formatted;
|
||||
if (key.equals("ESS-ONLINE SINCE") || key.equals("ESS-OFFLINE SINCE")) {
|
||||
formatted = formatTimeAmountSinceString(data.get(key).data(), now);
|
||||
} else {
|
||||
formatted = formatTimeAmount(data.get(key).data());
|
||||
}
|
||||
if (formatted != null) {
|
||||
data.get(key).setData(formatted);
|
||||
}
|
||||
DataPoint dataPoint = data.get(key);
|
||||
if (null != dataPoint.type()) switch (dataPoint.type()) {
|
||||
case DATE:{
|
||||
String formatted = formatTimeStamp(dataPoint.data());
|
||||
dataPoint.setData(formatted);
|
||||
break;
|
||||
}
|
||||
case TIME:{
|
||||
String formatted = formatTimeAmount(dataPoint.data());
|
||||
dataPoint.setData(formatted);
|
||||
break;
|
||||
}
|
||||
case TIME_TIMESTAMP:{
|
||||
String formatted = formatTimeAmountSinceString(dataPoint.data(), dateNow);
|
||||
dataPoint.setData(formatted);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Plan
|
||||
main: com.djrapitops.plan.Plan
|
||||
version: 1.6.1
|
||||
version: 1.6.2
|
||||
|
||||
commands:
|
||||
plan:
|
||||
@ -18,6 +18,9 @@ commands:
|
||||
search:
|
||||
usage: /plan <search terms> -p add -p to make not search playername
|
||||
description: search data of multiple players with search terms
|
||||
debug:
|
||||
usage: /plan debug
|
||||
description: run commands to debug the plugin.
|
||||
|
||||
softdepend:
|
||||
- OnTime
|
||||
@ -45,7 +48,7 @@ permissions:
|
||||
default: true
|
||||
plan.analyze.refresh:
|
||||
description: Allows you to refresh the analyse result with -r argument
|
||||
default: false
|
||||
default: op
|
||||
plan.reload:
|
||||
description: Allows to reload plugin config
|
||||
default: true
|
||||
@ -55,6 +58,9 @@ permissions:
|
||||
plan.info:
|
||||
description: Allows to view info
|
||||
default: true
|
||||
plan.debug:
|
||||
description: Allows debug command
|
||||
default: op
|
||||
plan.basic:
|
||||
children:
|
||||
plan.?: true
|
||||
@ -67,6 +73,7 @@ permissions:
|
||||
plan.analyze: true
|
||||
plan.staff:
|
||||
children:
|
||||
plan.debug: true
|
||||
plan.advanced: true
|
||||
plan.inspect.other: true
|
||||
plan.analyze.refresh: true
|
||||
|
Loading…
Reference in New Issue
Block a user