Inline node creation

This commit is contained in:
TheMode 2021-06-03 06:34:01 +02:00
parent e300d3ec57
commit 8d284649f4

View File

@ -171,11 +171,9 @@ public class PlayerInit {
if (source instanceof Player) {
((Player) source).sendMessage("You attacked something!");
}
var test = EventNode.type(EventFilter.ENTITY);
test.addListener(EventListener.of(PlayerMoveEvent.class, (e) ->
System.out.println("Test movement")));
empty.map(source, test);
empty.map(source, EventNode.type(EventFilter.ENTITY)
.addListener(EventListener.of(PlayerMoveEvent.class, (e) ->
System.out.println("Test movement"))));
});
globalEventHandler.addEventCallback(PlayerDeathEvent.class, event -> {