Clearing Inventory using API #311


Open
  • _ForgeUser23481353 created this issue Jun 21, 2017

    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


To post a comment, please login or register a new account.