mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-31 16:01:00 +01:00
f9fbf17fe6
- Changed format of all BukkitRunnables to be the same. - Added a delayed task for cache clearing if data is being saved. - Changed PlanLite packages from com.djrapitops.plan to com.djrapitops.planlite - Moved useful utilities to com.djrapitops.plan.utilities and removed rest - Location Handling (and saving) disabled for now because of inefficient saving to SQL. - Added more javadocs Fixed bugs: - Locations not saved when player moves (Fixed, but location handling will be disabled for now) Known Bugs: - Times don't update on inspect (Just need to call update if player is online, one line missing.) - ClassCastException on start-up when PlanLite is not installed. (Will fix with try catch tomorrow.)
39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
package com.djrapitops.plan.command.commands;
|
|
|
|
import com.djrapitops.plan.Phrase;
|
|
import com.djrapitops.plan.Plan;
|
|
import com.djrapitops.plan.command.CommandType;
|
|
import com.djrapitops.plan.command.SubCommand;
|
|
import com.djrapitops.plan.utilities.MiscUtils;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
public class InfoCommand extends SubCommand {
|
|
|
|
private Plan plugin;
|
|
|
|
public InfoCommand(Plan plugin) {
|
|
super("info", "plan.info", "View version and enabled hooks", CommandType.CONSOLE);
|
|
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
|
plugin.reloadConfig();
|
|
ChatColor oColor = Phrase.COLOR_MAIN.color();
|
|
ChatColor tColor = Phrase.COLOR_SEC.color();
|
|
String[] messages = {
|
|
tColor +"--["+oColor+"PLAN - Info"+tColor+"]--",
|
|
oColor+"Version: "+tColor+plugin.getDescription().getVersion(),
|
|
tColor+MiscUtils.checkVersion(),
|
|
oColor+"Cache Size: "+tColor+plugin.getHandler().getDataCache().keySet().size(),
|
|
oColor+"InspectCache Size: "+tColor+plugin.getInspectCache().getCache().keySet().size()
|
|
};
|
|
sender.sendMessage(messages);
|
|
return true;
|
|
}
|
|
|
|
}
|