- Баллы
- 61
Код:
package borsch.main;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.event.Listener;
import org.*********ventory.ItemStack;
import org.*********ventory.ShapedRecipe;
import org.*********ventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin implements Listener{
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
Bukkit.getPluginManager().registerEvents(new AdminJoin(), this);
getLogger().info(ChatColor.AQUA + "Plugin enabled!");
getCommand("bget").setExecutor(new Commands(this));
getCommand("bheal").setExecutor(new CommandBheal(this));
getCommand("wasted").setExecutor(new CommandWasted(this));
getCommand("srv").setExecutor(new CommandSRV(this));
getCommand("bhelp").setExecutor(new CommandBhelp(this));
getCommand("cmd").setExecutor(new CommandCMD(this));
getCommand("sunday").setExecutor(new CommandSunday(this));
}
public void onDisabled() {
getLogger().info(ChatColor.AQUA + "Plugin disabled!");
}
public void craft() {
ItemStack item = new ItemStack(Material.BLAZE_POWDER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.RED + "BLAZEPOWDER");
List<String> lore = new ArrayList<String>();
lore.add(ChatColor.DARK_RED + "Blapowstick");
meta.setLore(lore);
meta.addEnchant(Enchantment.LOOT_BONUS_MOBS, 5, true);
item.setItemMeta(meta);
ShapedRecipe s = new ShapedRecipe(item);
s.shape(new String[] {"A A", " B ", "A A"});
s.setIngredient('A', Material.GOLD_INGOT);
s.setIngredient('B', Material.STICK);
Bukkit.getServer().addRecipe(s);
}
}