Play nicer with naughty plugins.

This commit is contained in:
wizjany 2019-07-06 09:44:53 -04:00
parent f0c0eedde7
commit a18f26f8af

View File

@ -335,7 +335,11 @@ public class BukkitAdapter {
* @return WorldEdit EntityType
*/
public static EntityType adapt(org.bukkit.entity.EntityType entityType) {
return EntityTypes.get(entityType.getName().toLowerCase(Locale.ROOT));
final String name = entityType.getName();
if (name == null) {
return null;
}
return EntityTypes.get(name.toLowerCase(Locale.ROOT));
}
public static org.bukkit.entity.EntityType adapt(EntityType entityType) {