19 : Player) {
20 val item = Item(id)
21 val position = Position.create(x, y, player.height)
22
23 if (EventDispatcher.execute(player, PickupItemInteractionEvent(item, position))) {
24 if (PlayerRight.isDeveloper(player)) {
25 player.send(
26 SendMessage(
27 String.format(
28 "[%s]: item=%d position=%s",
29 PickupItemInteractionEvent::class.java.simpleName, item.id, position.toString()
30 )
31 )
32 )
33 }
34 return
35 }
36
37 player.pickup(item, position)
38 }