Hi Guys, I have an problem with an projet i'm working on! I want it that the plugin get your scoreboard score and check if it is more that the thirth line of an sign! My Code: Code:java Score score = Bukkit.getScoreboardManager().getMainScoreboard().getObjective("C-Shop").getScore(player); if (score.getScore() <= ((Sign) block.getState()).getLine(3)){ } The error: Code: The operator <= is undefined for the argument type(s) int, String I hope someone can help me out!
You need to convert the string to an integer to compare it against the score. Use Integer.parseInt(yourString);. Code:java Score score = Bukkit.getScoreboardManager( ).getMainScoreboard( ).getObjective( "C-Shop" ).getScore( player ); if( score.getScore( ) <= Integer.parseInt( ( ( Sign ) block.getState( ) ).getLine( 3 ) ) ) { }