1.6.0 - New Data Structure, API changes, data handling changes, Player Logger Hook, Info Command
- Changed data format to include the Type the data is for easier
analysis (Of Future data and API Using plugins)
- API Changes:
- Hook moved to com.djrapitops.plan.api
- Hook now returns HashMap<Strring, DataPoint>
- added DataPoint to ..plan.api
- added DataType Enum to ..plan.api
- New format uses: data.put("XXX-Key", new Datapoint(String data,
Enum(DataType) datatype));
- Depricated getData(String playername) that returns old format of data,
still returns correct format
- Depricated getAllData(String playername)
- Move to get(All)Data(String name, boolean [anything]) to get the new
format of data.
- Added Player Logger Hook
- Added Info Command that gives version, hooks and checks for new
version.
- Check for new version upon startup
2016-12-19 16:30:08 +01:00
|
|
|
package com.djrapitops.plan.command.commands;
|
|
|
|
|
2016-12-31 21:41:10 +01:00
|
|
|
import com.djrapitops.plan.Phrase;
|
1.6.0 - New Data Structure, API changes, data handling changes, Player Logger Hook, Info Command
- Changed data format to include the Type the data is for easier
analysis (Of Future data and API Using plugins)
- API Changes:
- Hook moved to com.djrapitops.plan.api
- Hook now returns HashMap<Strring, DataPoint>
- added DataPoint to ..plan.api
- added DataType Enum to ..plan.api
- New format uses: data.put("XXX-Key", new Datapoint(String data,
Enum(DataType) datatype));
- Depricated getData(String playername) that returns old format of data,
still returns correct format
- Depricated getAllData(String playername)
- Move to get(All)Data(String name, boolean [anything]) to get the new
format of data.
- Added Player Logger Hook
- Added Info Command that gives version, hooks and checks for new
version.
- Check for new version upon startup
2016-12-19 16:30:08 +01:00
|
|
|
import com.djrapitops.plan.Plan;
|
|
|
|
import com.djrapitops.plan.command.CommandType;
|
|
|
|
import com.djrapitops.plan.command.SubCommand;
|
2017-01-09 23:05:37 +01:00
|
|
|
import com.djrapitops.plan.utilities.MiscUtils;
|
1.6.0 - New Data Structure, API changes, data handling changes, Player Logger Hook, Info Command
- Changed data format to include the Type the data is for easier
analysis (Of Future data and API Using plugins)
- API Changes:
- Hook moved to com.djrapitops.plan.api
- Hook now returns HashMap<Strring, DataPoint>
- added DataPoint to ..plan.api
- added DataType Enum to ..plan.api
- New format uses: data.put("XXX-Key", new Datapoint(String data,
Enum(DataType) datatype));
- Depricated getData(String playername) that returns old format of data,
still returns correct format
- Depricated getAllData(String playername)
- Move to get(All)Data(String name, boolean [anything]) to get the new
format of data.
- Added Player Logger Hook
- Added Info Command that gives version, hooks and checks for new
version.
- Check for new version upon startup
2016-12-19 16:30:08 +01:00
|
|
|
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();
|
2016-12-31 21:41:10 +01:00
|
|
|
ChatColor oColor = Phrase.COLOR_MAIN.color();
|
|
|
|
ChatColor tColor = Phrase.COLOR_SEC.color();
|
2017-01-09 23:05:37 +01:00
|
|
|
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);
|
1.6.0 - New Data Structure, API changes, data handling changes, Player Logger Hook, Info Command
- Changed data format to include the Type the data is for easier
analysis (Of Future data and API Using plugins)
- API Changes:
- Hook moved to com.djrapitops.plan.api
- Hook now returns HashMap<Strring, DataPoint>
- added DataPoint to ..plan.api
- added DataType Enum to ..plan.api
- New format uses: data.put("XXX-Key", new Datapoint(String data,
Enum(DataType) datatype));
- Depricated getData(String playername) that returns old format of data,
still returns correct format
- Depricated getAllData(String playername)
- Move to get(All)Data(String name, boolean [anything]) to get the new
format of data.
- Added Player Logger Hook
- Added Info Command that gives version, hooks and checks for new
version.
- Check for new version upon startup
2016-12-19 16:30:08 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|