Open ghost opened 8 years ago
Not a NullPointerException but okay.
In the attached pastebin are two exception - title of issue is type of first exception:
[17:39:10] [Server thread/ERROR] [Sponge]: Could not pass DisplaceEntityEvent$Move$TargetPlayer$Impl to org.spongepowered.mod.plugin.SpongeModPluginContainer@6ba5d2c4 java.lang.NullPointerException
@hunter688 can you provide information about your setup? Songe version, (forge version), Minecraft version etc?
By the way, I took a quick peek over the trace:
Problematic part: PlayerMoveListener.java#88
if (!event.getFromTransform().getExtent().getUniqueId().equals(event.getToTransform().getExtent().getUniqueId()))
{
World oldWorld = event.getFromTransform().getExtent();
World newWorld = event.getToTransform().getExtent();
Utils.savePlayerInventory(player, oldWorld.getUniqueId());
if (!Utils.doShareInventories(oldWorld.getName(), newWorld.getName()))
{
Utils.updatePlayerInventory(player, newWorld.getUniqueId());
}
player.offer(Keys.GAME_MODE, newWorld.getProperties().getGameMode());
}
-> newWorld.getUniqueId() causes problems in: Utils.java#1296
String worldName = Sponge.getServer().getWorld(worldUuid).get().getName();
Seems like that either the UUID is invalid or null, or that the world with that UUID is not returned by #getWorld
Anyways: The Optional is not present.
Also:
Is this necessary? World->uuid->world->name?
You could e.g. just use the world as a parameter for #savePlayerInventory
its 1.8.9 spongeforge build 1625, forge 1890
http://pastebin.com/iK89auJQ