This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
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); } } }
@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.