#null item

1 messages · Page 1 of 1 (latest)

brave oyster
#

test

#

this is DctrSpaceHelmCMD

worldly chasm
#

you're not setting the itemstack

#

spacehelm

brave oyster
#

soo this is my main class

#
public class DctrSpaceHelm extends JavaPlugin {

    FileConfiguration config = getConfig();
    public int editionNumber;

    @Override
    public void onEnable() {
        config.addDefault("editionNumber", 1);
        config.options().copyDefaults(true);
        this.saveConfig();
        editionNumber = config.getInt("editionNumber");

        getCommand("spacehelm").setExecutor(new DctrSpaceHelmCMD(this));
        getServer().getPluginManager().registerEvents(new DctrSpaceHelmListener(), this);
    }
    
    @Override
    public void onDisable() {
        config.set("editionNumber", editionNumber);
        saveConfig();
    }
}```
brave oyster
#

or will the command class do?

#

in the previous update it was done with somehting like this

#
   new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : Bukkit.getOnlinePlayers()) {

                    ItemStack item = player.getInventory().getHelmet();
brave oyster
#

right and whys that?

#

the rest is fine?

#

alrighty will check this one out

#

thanks man

brave oyster
#

uhhh

#

now this happens

#

oh nvm

brave oyster
#

well now this happens