mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-06-27 07:05:04 +02:00
df8e9dcd77
Created two copies of the project, and left plugin yml with version so version checking on current versions will not break. Plan Lite: - Current version - Uses plugins to get the data Plan Advanced: - Will be almost complete rewrite of the plugin. - Will be released as Plan 2.0.0 when ready - Current Plan will be released as Plan Lite 1.6.3 when rewrite is complete. - Will gather data and save it - Better consistency and Time axis to analysis. - Better analysis, possibly web page creation for results - Support for Plan Lite - More options
38 lines
1.4 KiB
Java
38 lines
1.4 KiB
Java
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;
|
|
}
|
|
|
|
}
|