crwdns149921:0crwdne149921:0
crwdns149923:0crwdne149923:0
crwdns149925:0crwdne149925:0
crwdns149927:0crwdne149927:0
crwdns149929:0crwdne149929:0
crwdns149931:0crwdne149931:0

crwdns149933:0crwdne149933:0
public void someEventHandler(Entity someEntity) {
Foo entityFoo = someEntity.getFoo();
entityFoo.bar();
}
crwdns149935:0crwdne149935:0
crwdns149937:0crwdne149937:0
crwdns149939:0crwdne149939:0

crwdns149941:0crwdne149941:0
public void someEventHandler(Entity someEntity) {
Foo entityFoo = someEntity.getFoo();
entityFoo.bar();
}
crwdns149943:0crwdne149943:0
public void someEventHandler(Entity someEntity) {
Foo entityFoo = someEntity.getFoo();
if (entityFoo == null) {
entityFoo = MyPlugin.DEFAULT_FOO;
}
entityFoo.bar();
}
crwdns149945:0crwdne149945:0
crwdns149947:0crwdne149947:0
crwdns149949:0crwdne149949:0
crwdns149951:0crwdne149951:0
crwdns149953:0crwdne149953:0
crwdns149955:0crwdne149955:0
crwdns149957:0crwdne149957:0
crwdns149959:0crwdne149959:0
crwdns149961:0crwdne149961:0
crwdns149963:0crwdne149963:0
crwdns149965:0crwdne149965:0
crwdns149967:0crwdne149967:0
crwdns149969:0crwdne149969:0
crwdns149971:0crwdne149971:0

crwdns149973:0crwdne149973:0
crwdns149975:0crwdne149975:0
crwdns149977:0crwdne149977:0
crwdns149979:0crwdne149979:0
public void someEventHandler(Entity someEntity) {
Optional<Foo> entityFoo = someEntity.getFoo();
if (entityFoo.isPresent()) {
entityFoo.get().bar();
}
}
crwdns149981:0crwdne149981:0
crwdns149983:0crwdne149983:0
crwdns149985:0crwdne149985:0
public void someEventHandler(Entity someEntity) {
Foo entityFoo = someEntity.getFoo().orElse(MyPlugin.DEFAULT_FOO);
entityFoo.bar();
}
crwdns149987:0crwdne149987:0
public void someEventHandler(Entity someEntity) {
someEntity.getFoo().orElse(MyPlugin.DEFAULT_FOO).bar();
}
crwdns149989:0crwdne149989:0
crwdns149991:0crwdne149991:0
public void someEventHandler(Entity someEntity, Entity entity2) {
Foo entityFoo = someEntity.getFoo();
if (entityFoo == null) {
entityFoo = entity2.getFoo();
}
if (entityFoo == null) {
entityFoo = MyPlugin.DEFAULT_FOO;
}
entityFoo.bar();
}
crwdns149993:0crwdne149993:0
public void someEventHandler(Entity someEntity, Entity entity2) {
someEntity.getFoo().orElse(entity2.getFoo().orElse(MyPlugin.DEFAULT_FOO)).bar();
}
crwdns149995:0:doc:crwdne149995:0
Note
crwdns149997:0crwdne149997:0