MultiInv.log.debug(player.getName() + " changed from " + player.getGameMode().toString() + " to " + event.getNewGameMode().toString());
// We only want to save the old inventory if we didn't switch worlds in the same tick. Inventory problems otherwise.
if(!playerchangeworlds.containsKey(player.getName())) {
if(!player.hasPermission("multiinv.enderchestexempt")) {
miPlayer.saveEnderchestInventory(group, player.getGameMode().toString());
}
if(!player.hasPermission("multiinv.exempt")) {
miPlayer.saveInventory(group, player.getGameMode().toString());
}
}