mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 13:15:52 +01:00
Added a null check for the optional converter (#2485)
This commit is contained in:
parent
98fbcc6585
commit
e219103a25
@ -168,6 +168,7 @@ public class Converters {
|
||||
|
||||
@Override
|
||||
public Optional<T> getSpecific(Object generic) {
|
||||
if (generic == null) return Optional.empty();
|
||||
Optional<Object> optional = (Optional<Object>) generic;
|
||||
return optional.map(converter::getSpecific);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user