Buggy code:
} } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>party." ) ) ; } } else { player . sendMessage ( "//q<seq2seq4repair_space>party<seq2seq4repair_space>kick<seq2seq4repair_space><playername>" ) ; } } if ( args [ 1 ] . equalsIgnoreCase ( "leader" ) ) { if ( ( args . length ) == 3 ) { EpicParty party = epicPlayer . getParty ( ) ; if ( party != null ) { if ( ( party . getLeader ( ) ) == epicPlayer ) { EpicPlayer newLeader = EpicSystem . getEpicPlayer ( Bukkit . getPlayer ( args [ 2 ] ) ) ; if ( party . getPartyMembers ( ) . contains ( newLeader ) ) { party . setPartyLeader ( newLeader ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "That<seq2seq4repair_space>player<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>party." ) ) ; } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>the<seq2seq4repair_space>party<seq2seq4repair_space>leader." ) ) ; } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>party." ) ) ; } } else { player . sendMessage ( "//q<seq2seq4repair_space>party<seq2seq4repair_space>leader<seq2seq4repair_space><playername>" ) ; } } if ( args [ 1 ] . equalsIgnoreCase ( "leave" ) ) { EpicParty party = epicPlayer . getParty ( ) ; if ( party != null ) { party . removePlayer ( epicPlayer , false ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>party." ) ) ; } } if ( args [ 1 ] . equalsIgnoreCase ( "chat" ) ) { if ( ( epicPlayer . getParty ( ) ) != null ) { epicPlayer . partyChat = ! ( epicPlayer . partyChat ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>party." ) ) ; } } } else { EpicParty party = epicPlayer . getParty ( ) ; if ( party != null ) { party . sendPartyMembers ( epicPlayer ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>party." ) ) ; } } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>that." ) ) ; } return true ; } if ( args [ 0 ] . equalsIgnoreCase ( "turnin" ) ) { if ( epicPlayer . hasPermission ( "epicquest.user.turnin" ) ) { if ( ! ( epicPlayer . getCompleteableQuest ( ) . isEmpty ( ) ) ) { epicPlayer . completeAllQuests ( ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "There<seq2seq4repair_space>are<seq2seq4repair_space>no<seq2seq4repair_space>quests<seq2seq4repair_space>to<seq2seq4repair_space>turn<seq2seq4repair_space>in." ) ) ; } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>that." ) ) ; } return true ; } if ( args [ 0 ] . equalsIgnoreCase ( "give" ) ) { if ( ( ( args . length ) == 1 ) || ( ( args . length ) == 2 ) ) { if ( epicPlayer . hasPermission ( "epicquest.user.give" ) ) { if ( ( args . length ) == 1 ) { if ( epicPlayer . canGetQuest ( ) ) { epicPlayer . addQuestRandom ( ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "There<seq2seq4repair_space>are<seq2seq4repair_space>no<seq2seq4repair_space>more<seq2seq4repair_space>quests<seq2seq4repair_space>available." ) ) ; } } else { int quest = Integer . parseInt ( args [ 1 ] ) ; List < String > availableQuests = epicPlayer . getObtainableQuests ( ) ; <START_BUG> if ( quest <= ( availableQuests . size ( ) ) ) { <END_BUG> epicPlayer . addQuest ( new EpicQuest ( epicPlayer , availableQuests . get ( quest ) ) ) ; } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>can't<seq2seq4repair_space>get<seq2seq4repair_space>that<seq2seq4repair_space>quest." ) ) ; } } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>that." ) ) ; } return true ; } } if ( ( args [ 0 ] . equalsIgnoreCase ( "drop" ) ) || ( args [ 0 ] . equalsIgnoreCase ( "d" ) ) ) { if ( ( args . length ) == 2 ) { if ( epicPlayer . hasPermission ( "epicquest.user.drop" ) ) { List < EpicQuest > questlist = epicPlayer . getQuestList ( ) ; int dispnumber = Integer . parseInt ( args [ 1 ] ) ; if ( ( ( ! ( questlist . isEmpty ( ) ) ) && ( dispnumber >= 0 ) ) && ( dispnumber < ( questlist . size ( ) ) ) ) { EpicQuest quest = questlist . get ( dispnumber ) ; player . sendMessage ( ( ( ( ( ChatColor . GRAY ) + "Quest<seq2seq4repair_space>'" ) + ( quest . getQuestName ( ) ) ) + "'<seq2seq4repair_space>succesfully<seq2seq4repair_space>dropped." ) ) ; epicPlayer . playerStatistics . AddQuestsDropped ( 1 ) ; epicPlayer . removeQuest ( quest ) ; } else { player . sendMessage ( ( ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>quest<seq2seq4repair_space>" ) + ( args [ 1 ] ) ) + "." ) ) ; } } else { player . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>do<seq2seq4repair_space>that." ) ) ; } return true ; } } if ( ( args [ 0 ] . equalsIgnoreCase ( "questbook" ) ) || ( args [ 0 ] . equalsIgnoreCase ( "qb" ) ) ) { if ( ( ( args . length ) == 1 ) || ( ( args . length ) == 2 ) ) { if ( epicPlayer . hasPermission ( "epicquest.user.questbook" ) ) { if ( ( ( args . length ) == 2 ) && ( args [ 1 ] . equalsIgnoreCase ( "give" ) ) ) { epicPlayer . giveQuestBook ( ) ; player . sendMessage ( ( ( ChatColor . GREEN ) + "You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>a<seq2seq4repair_space>Questbook." ) ) ; return true ; } List < EpicQuest > list = epicPlayer . getQuestList ( ) ;

Fix:
if ( quest <= ( ( availableQuests . size ( ) ) - 1 ) ) {