Buggy code:
player . sendMessage ( ( ( ChatColor . GREEN ) + "Ranks<seq2seq4repair_space>moved." ) ) ; saveTeams ( ) ; } break ; case "RINFO" : case "RANKINFO" : if ( ! ( tPlayer . hasTeam ( ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>team." ) ) ; return true ; } else if ( ( args . length ) != 2 ) { player . sendMessage ( ( ( ChatColor . RED ) + "Invalid<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>command.<seq2seq4repair_space>Use<seq2seq4repair_space>//team<seq2seq4repair_space>rinfo<seq2seq4repair_space><ranknumber><seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>permissions." ) ) ; return true ; } else if ( ! ( isInteger ( args [ 1 ] ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "Rank<seq2seq4repair_space>Numbers<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>digits." ) ) ; return true ; } else if ( ( 1 > ( Integer . parseInt ( args [ 1 ] ) ) ) || ( ( Integer . parseInt ( args [ 1 ] ) ) > ( getTeam ( PlayerName ) . getRankCount ( ) ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "Rank<seq2seq4repair_space>number<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; return true ; } else { Team team = Clans . Teams . get ( tPlayer . getTeamKey ( ) ) ; if ( ( team . getRankCount ( ) ) < ( Integer . parseInt ( args [ 1 ] ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "Rank<seq2seq4repair_space>number<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; return true ; } else { TeamRank rank = getTeam ( PlayerName ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) ; player . sendMessage ( ( ( ( ChatColor . DARK_GREEN ) + ( rank . getRankName ( ) ) ) + "<seq2seq4repair_space>Permissions:" ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Set<seq2seq4repair_space>Ranks<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canSetRanks ( ) ) ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Invite<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canInvite ( ) ) ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Edit<seq2seq4repair_space>Ranks<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canEditRanks ( ) ) ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Kick<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canKick ( ) ) ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Team<seq2seq4repair_space>Chat<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canTeamChat ( ) ) ) ) ; player . sendMessage ( ( ( ( ChatColor . GREEN ) + "Area<seq2seq4repair_space>Info<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( rank . canSeeAreaInfo ( ) ) ) ) ; } } break ; case "RPERMISSION" : case "RANKPERMISSION" : if ( ! ( tPlayer . hasTeam ( ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>team." ) ) ; return true ; } else if ( ! ( getRank ( PlayerName ) . canEditRanks ( ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>lack<seq2seq4repair_space>sufficent<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>edit<seq2seq4repair_space>rank<seq2seq4repair_space>permissions." ) ) ; return true ; } else if ( ( args . length ) != 4 ) { player . sendMessage ( ( ( ChatColor . RED ) + "Invalid<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>command.<seq2seq4repair_space>Use<seq2seq4repair_space>//team<seq2seq4repair_space>rpermission<seq2seq4repair_space><ranknumber><seq2seq4repair_space><kick//teamchat//rankedit//invite//promote><seq2seq4repair_space><true|false>." ) ) ; return true ; } else if ( ! ( isInteger ( args [ 1 ] ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "Rank<seq2seq4repair_space>Numbers<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>digits." ) ) ; return true ; } else if ( ( 1 > ( Integer . parseInt ( args [ 1 ] ) ) ) || ( ( Integer . parseInt ( args [ 1 ] ) ) > ( getTeam ( PlayerName ) . getRankCount ( ) ) ) ) { player . sendMessage ( ( ( ChatColor . RED ) + "Rank<seq2seq4repair_space>number<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; return true ; } else <START_BUG> if ( ( Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRankNumber ( PlayerName ) ) < ( Integer . parseInt ( args [ 1 ] ) ) ) { <END_BUG> player . sendMessage ( ( ( ChatColor . RED ) + "Cannot<seq2seq4repair_space>edit<seq2seq4repair_space>ranks<seq2seq4repair_space>higher<seq2seq4repair_space>than<seq2seq4repair_space>your<seq2seq4repair_space>own." ) ) ; } else { switch ( args [ 2 ] . toUpperCase ( ) ) { case "KICK" : Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) . setCanKick ( Boolean . parseBoolean ( args [ 3 ] ) ) ; saveTeams ( ) ; break ; case "TEAMCHAT" : Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) . setCanTeamChat ( Boolean . parseBoolean ( args [ 3 ] ) ) ; saveTeams ( ) ; break ; case "RANKEDIT" : Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) . setCanEditRanks ( Boolean . parseBoolean ( args [ 3 ] ) ) ; saveTeams ( ) ; break ; case "INVITE" : Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) . setCanInvite ( Boolean . parseBoolean ( args [ 3 ] ) ) ; saveTeams ( ) ; break ; case "PROMOTE" : Clans . Teams . get ( tPlayer . getTeamKey ( ) ) . getRank ( Integer . parseInt ( args [ 1 ] ) ) . setCanSetRanks ( Boolean . parseBoolean ( args [ 3 ] ) ) ; saveTeams ( ) ; break ; default : player . sendMessage ( ( ( ChatColor . RED ) + "Invalid<seq2seq4repair_space>permission.<seq2seq4repair_space>Use<seq2seq4repair_space>//team<seq2seq4repair_space>rpermission<seq2seq4repair_space><ranknumber><seq2seq4repair_space><kick//teamchat//rankedit//invite//promote><seq2seq4repair_space><true|false>." ) ) ; return true ; } player . sendMessage ( ( ( ChatColor . GREEN ) + "Changed<seq2seq4repair_space>rank<seq2seq4repair_space>permission." ) ) ; } break ;

Fix:
if ( ( ( getTeam ( PlayerName ) . getRankNumber ( PlayerName ) ) < ( Integer . parseInt ( args [ 1 ] ) ) ) && ( ! ( getTeam ( PlayerName ) . isLeader ( PlayerName ) ) ) ) {