1
My Plugin code Is Not Working..
Here is the code.... It won't work - when I do /plugins it shows no plugins
The code is supposed to give a player a diamond pickaxe when they type /bb
I will also give my config.xml file.
BB.java Is Below.
===========================================
package com.enjin.mlgplugins333.BB;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public class BB extends JavaPlugin {
@Override
public void onEnable() {
getLogger().info("BB Has Been Enabled.");
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if(cmd.getName().equalsIgnoreCase("BB")) {
Player.sendMessage("Giving Diamond Pickaxe.");
ItemStack pick = new ItemStack(Material.DIAMOND_PICKAXE);
Player.getInventory().addItem(pick);
return true;
}
return false;
}
@Override
public void onDisable() {
getLogger().info("BB Has Been Disabled.");
}
}
===============================================
config.xml Is Below
===============================================
main: com.enjin.mlgplugins333.BB.BB
version: 1.0
name: BB
commands:
BB:
================================================
I also use eclipse btw..
Please help!
The code is supposed to give a player a diamond pickaxe when they type /bb
I will also give my config.xml file.
BB.java Is Below.
===========================================
package com.enjin.mlgplugins333.BB;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public class BB extends JavaPlugin {
@Override
public void onEnable() {
getLogger().info("BB Has Been Enabled.");
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if(cmd.getName().equalsIgnoreCase("BB")) {
Player.sendMessage("Giving Diamond Pickaxe.");
ItemStack pick = new ItemStack(Material.DIAMOND_PICKAXE);
Player.getInventory().addItem(pick);
return true;
}
return false;
}
@Override
public void onDisable() {
getLogger().info("BB Has Been Disabled.");
}
}
===============================================
config.xml Is Below
===============================================
main: com.enjin.mlgplugins333.BB.BB
version: 1.0
name: BB
commands:
BB:
================================================
I also use eclipse btw..
Please help!
10
hmmm... When I join on 1.9, it says "I am outdated! I am still on {0}"
Any help?
Any help?
Use my template, you are missing things in your YML. Copy and paste it.
Please..
There is nothing wrong with your code, looking at it.
In the yml, that you made an XML, you missed Description. use my template.
I have fixed that.. But it still is not working
And you did not do the YML correct, so I made one for you: http://pastebin.com/HtrnWPvF
No... I think it's now my code. D: Please help
Right click on the project > new > other > call it plugin.yml
Its not config.xml, its config.yml
