Attempted to fix error: Internal error:
Command not registered to command caller
This commit is contained in:
parent
4a0f711682
commit
bdc565492b
2 changed files with 9 additions and 11 deletions
|
@ -1,20 +1,14 @@
|
||||||
package alisolarflare.components.metrics;
|
package alisolarflare.components.metrics;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import alisolarflare.components.Component;
|
import alisolarflare.components.Component;
|
||||||
import alisolarflare.components.metrics.commands.GetLoginMetrics;
|
import alisolarflare.components.metrics.commands.GetLoginMetrics;
|
||||||
import alisolarflare.components.metrics.listeners.PlayerJoinListener;
|
import alisolarflare.components.metrics.listeners.PlayerJoinListener;
|
||||||
import buttondevteam.lib.TBMCCoreAPI;
|
|
||||||
|
|
||||||
public class MetricsComponent extends Component{
|
public class MetricsComponent extends Component{
|
||||||
|
|
||||||
|
@ -25,19 +19,19 @@ public class MetricsComponent extends Component{
|
||||||
public void register(JavaPlugin plugin){
|
public void register(JavaPlugin plugin){
|
||||||
registerCommand(plugin, new GetLoginMetrics(this));
|
registerCommand(plugin, new GetLoginMetrics(this));
|
||||||
registerListener(plugin, new PlayerJoinListener(this));
|
registerListener(plugin, new PlayerJoinListener(this));
|
||||||
|
|
||||||
metricsList = new ArrayList<String>();
|
|
||||||
|
|
||||||
|
metricsList = new ArrayList<String>();
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
metricsYml = loadFileConfiguration(plugin, "metrics.yml");
|
metricsYml = loadFileConfiguration(plugin, "metrics.yml");
|
||||||
metricsList = metricsYml.getStringList("playerLogins");
|
metricsList = metricsYml.getStringList("playerLogins");
|
||||||
} catch (IOException | InvalidConfigurationException e) {
|
} catch (IOException | InvalidConfigurationException e) {
|
||||||
TBMCCoreAPI.SendException("metrics.yml in AliPresents could not be created!", e);
|
TBMCCoreAPI.SendException("metrics.yml in AliPresents could not be created!", e);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private FileConfiguration loadFileConfiguration(JavaPlugin plugin, String fileName) throws FileNotFoundException, IOException, InvalidConfigurationException {
|
private FileConfiguration loadFileConfiguration(JavaPlugin plugin, String fileName) throws FileNotFoundException, IOException, InvalidConfigurationException {
|
||||||
|
|
||||||
File file = new File(plugin.getDataFolder(), fileName);
|
File file = new File(plugin.getDataFolder(), fileName);
|
||||||
|
@ -52,5 +46,5 @@ public class MetricsComponent extends Component{
|
||||||
config.load(file);
|
config.load(file);
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,5 +23,9 @@ public class GetLoginMetrics extends ModCommand{
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String GetCommandPath(){
|
||||||
|
return "getLoginMetrics";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue