Games/Minecraft

[CommandHelper/Function] 특정 거리안의 플레이어 찾기

Kua 2021. 2. 21. 19:11
1
2
3
4
5
6
7
8
9
register_command('localplayers', array(
    'aliases': array('lp'),
    'executor': closure(@cmd, @sender, @cmdArgs) {
        @radiusPlayers = array_filter(players_in_radius(ploc(@sender), 100), closure(@key, @index) {
            return(pmode(@index) != 'SPECTATOR')
        })
        msg('거리안의 플레이어:'array_implode(@radiusPlayers, ', ''§7('.array_size(@radiusPlayers).'명)')
    }
))
cs
반응형
1 2 3 4 5 6