public static Member createElement(final int id, final int x, final int y,
			final ElementData ed) {
		Member e = null;

		switch (ed.elementType.toLowerCase()) {
		case "prop":
			e = props.get(id).clone();
			break;
		case "decoration":
			e = decorations.get(id).clone();
			break;
		case "player":
			final Player t = players.get(id);
			final Player p = new Player(t.get(PhysicsComponent.class),
					t.get(GraphicsComponent.class),
					t.get(InteractComponent.class),
					t.get(AttackComponent.class), t.get(InputComponent.class));
			if (ed.mainPlayer) {
				ed.level.setMainPlayer(p);
				p.setMainPlayer(ed.mainPlayer);
				p.set(new PlayerInput());
			}

			t.copy(p);
			p.setName(ed.name);

			e = p;
			break;
		case "item":
			e = items.get(id).clone();
			break;
		case "container":
			e = containers.get(id).clone();
			break;
		default:
			return null;
		}

		e.get(PhysicsComponent.class).setX(x);
		e.get(PhysicsComponent.class).setY(y);
		e.setLevel(ed.level);
		e.setName(ed.name);
		return e;
	}