Some minor improvements from static analysis

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-11-07 17:28:28 +11:00
parent 2a82e16c61
commit 417599c2ab
15 changed files with 44 additions and 56 deletions

View File

@@ -356,9 +356,6 @@ public final class FireworkEffect implements ConfigurationSerializable {
*/
public static ConfigurationSerializable deserialize(Map<String, Object> map) {
Type type = Type.valueOf((String) map.get(TYPE));
if (type == null) {
throw new IllegalArgumentException(map.get(TYPE) + " is not a valid Type");
}
return builder()
.flicker((Boolean) map.get(FLICKER))