register_command('teleport', array(
'description': 'Request to teleport to the specified player',
'usage': '/tp <playername>',
'permission': 'katcraft.tp',
'noPermMsg': 'You should always be able to request to teleport. Please post a bug report immediately on the community forums!',
'aliases': array('tp', 'tpa', 'tpo'),
'executor': closure(@alias, @sender, @args) {
if(@args == array()){
die('You must specify a player to teleport to!')
}
@destination = ploc(@player)
export('teleport.name.'.player(), @player)
export('teleport.temp.'.@player, @destination)
@player = @args[0]
if(has_permission(player(), 'katcraft.tp.override')){
set_ploc(player(), @destination)
} else{
tmsg(@player, player() 'would like to teleport to you. /tpaccept to allow, or /tpdeny to cancel.')
}
}
))