Skip to content

Clearing Inventory using API #43

Description

@ChimpGamer

Hey,

I'm trying to clear an player inventory on world change like:
@EventHandler public void onWorldChange(PlayerChangedWorldEvent e){ Player p = e.getPlayer(); MIInventory cleaninv = new MIInventory((String) null); if (p != null) { if (p.getWorld().getName().equalsIgnoreCase("creative")) { MultiInv.getPlugin().getAPI().setPlayerInventory(p, "kitpvp", GameMode.SURVIVAL, cleaninv); } } }

But that doesn't seem to work at all. Can someone help me with this?

Kind Regards,
ChimpGamer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions