mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-21 15:41:38 +01:00
Inline node creation
This commit is contained in:
parent
e300d3ec57
commit
8d284649f4
@ -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 -> {
|
||||
|
Loading…
Reference in New Issue
Block a user