mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-28 06:27:32 +02:00
6ae61230df
Fixed Bugs: - database now contains LoginTimes - Commandlistener now gives proper command. - Logintimes no longer null on inspect - ServerData load SQL format fixed - NickList and IpList changed to Set Known bugs: - (Id while saving might be faulty) - (Database saves multiples of known things.) - LastGameMode is set to null when player joins - (Playtime is negative) - ServerData not updating properly - (DataBase saves non-existent ids) - (LoginTimes is not updated) - Locations not saved when player moves - Location ID not primary key
38 lines
1.2 KiB
Java
38 lines
1.2 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.command.hooks.PlaceholderAPIHook;
|
|
import com.djrapitops.plan.command.utils.DataUtils;
|
|
import java.util.List;
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
public class ReloadCommand extends SubCommand {
|
|
|
|
private Plan plugin;
|
|
|
|
public ReloadCommand(Plan plugin) {
|
|
super("reload", "plan.reload", "Reload plugin config & save cached data", CommandType.CONSOLE);
|
|
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
|
plugin.reloadConfig();
|
|
plugin.getHandler().saveCachedData();
|
|
plugin.hookPlanLite();
|
|
ChatColor operatorColor = Phrase.COLOR_MAIN.color();
|
|
ChatColor textColor = Phrase.COLOR_SEC.color();
|
|
sender.sendMessage(textColor + "[" + operatorColor + "PLAN" + textColor + "] Reload complete.");
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|