@Override public SpoutClientWorld getWorld(UUID uid) { SpoutClientWorld world = activeWorld.get(); if (world != null && world.getUID().equals(uid)) { return world; } else { return null; } }
@Override public SpoutClientWorld getWorld(String name, boolean exact) { SpoutClientWorld world = activeWorld.get(); if (world == null) { return null; } if ((exact && world.getName().equals(name)) || world.getName().startsWith(name)) { return world; } else { return null; } }
@Override public SpoutClientWorld worldChanged(String name, UUID uuid, byte[] data) { SpoutClientWorld world = new SpoutClientWorld(name, uuid, this, getEngineItemMap()); SerializableMap map = world.getComponentHolder().getData(); try { map.deserialize(data); } catch (IOException e) { throw new RuntimeException("Unable to deserialize data", e); } SpoutClientWorld oldWorld = activeWorld.getAndSet(world); if (oldWorld != null) { oldWorld.unload(false); } return world; }