1
Bukkit Plugin
Dear people,
I'm programming a plugin with a config. But when I try to put the config system into a command it doesn't want to work. Can someone help me please ? :'(
I'm programming a plugin with a config. But when I try to put the config system into a command it doesn't want to work. Can someone help me please ? :'(
public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String[] args) {
if(CommandLabel.equalsIgnoreCase("vip")){
Player p = (Player) sender;
if (getConfig().getString("vips." + p.getName()) == null) {
getConfig().addDefault("vips." + p.getName(), 0);
saveConfig();
}else {
p.sendMessage("wrong");
saveConfig();
}
}
return false;
Create an account or sign in to comment.
7
info Note: You're viewing a single reply. View all replies
1
Context please. If possible include the entire class.