@see ConfigurationSerializable @param map the map to deserialize @return the resulting serializable
(@NotNull Map<String, Object> map)
| 370 | * @return the resulting serializable |
| 371 | */ |
| 372 | @NotNull |
| 373 | public static ConfigurationSerializable deserialize(@NotNull Map<String, Object> map) { |
| 374 | Type type = Type.valueOf((String) map.get(TYPE)); |
| 375 | |
| 376 | return builder() |
| 377 | .flicker((Boolean) map.get(FLICKER)) |
| 378 | .trail((Boolean) map.get(TRAIL)) |
| 379 | .withColor((Iterable<?>) map.get(COLORS)) |
| 380 | .withFade((Iterable<?>) map.get(FADE_COLORS)) |
| 381 | .with(type) |
| 382 | .build(); |
| 383 | } |
| 384 | |
| 385 | @NotNull |
| 386 | @Override |