Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.caleb.minecraftbackpack;
- import org.bukkit.Bukkit;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.event.Listener;
- import org.bukkit.inventory.Inventory;
- import org.bukkit.plugin.java.JavaPlugin;
- public class MinecraftBackpack extends JavaPlugin implements Listener {
- public static Inventory smallInventory;
- public void onEnable(){
- smallInventory = Bukkit.createInventory(null, 9,
- "Small Backpack");
- getServer().getPluginManager().registerEvents(this, this);
- }
- public boolean onCommand(CommandSender sender, Command command,
- String label, String[] args) {
- if (label.equalsIgnoreCase("smallbackpack")) {
- if (sender instanceof Player) {
- ((Player) sender).openInventory(smallInventory);
- }
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement