Closed SquidDev closed 7 years ago
Perhaps the ability to get the block the player is viewing (if any)? I have a rather hackish method which assumes all blocks are full blocks - it will fail if the player is looking past a torch, or something similar.
@KingofGamesYami With respect to scoreboards: are you aware of /scoreboard players list <player name>
? This lists all scoreboard values for a particular player and could be parsed to get the relevant data.
With respect to looking at blocks, I'd rather stick most metadata gathering in Plethora so I'm not going to add that.
At the moment, this actually seems to work:
function getScoreboardValue( playerName, objectiveName )
local ok, result = commands.scoreboard( "players list", playerName )
table.remove( result, 1 )
for i, str in ipairs( result ) do
print( str )
if( str:match( "^- " .. objectiveName .. ":" ) ) then
return str:match( ": (.+) %(" )
end
end
end
Right, I think I've decided that I'm not going to implement this: most of this can be done with Plethora or existing commands.
See #7 and #102