Hey rune-server, on my server i have a serious trade issue where when two people are trading they both accept at the first screen than on the second screen when one of the two parties click accept the trade is automatically declined and the message is brought up "You can't trade two people at once!", now I know that this is in clicking buttons possibly tradeandduel but doubtful. I have examined the clickbutton case multiple times and compared and contrasted it to other servers but I can't seem to find out what wrong. The dupe fix that is implemented in my code is [PI] Fix 3 Trader Dupe. I would like to keep the dupe fix on for obvious reasons. Any thoughts on a solution to my problem?

Case 13218: @ClickingButtons.java
Code:
case 13218:
			Client ot1 = (Client) Server.playerHandler.players[c.tradeWith];
                        if (System.currentTimeMillis() - c.lastButton < 400) {
				c.lastButton = System.currentTimeMillis();
					break;

			} else {
				c.lastButton = System.currentTimeMillis();
					}
			
			if(TradeAndDuel.twoTraders(c, ot1)) {
			c.tradeAccepted = true;
			try{
				if (ot1 == null) {
					c.getTradeAndDuel().declineTrade();
					c.sendMessage("Trade declined as the other player has disconnected.");
					break;
				}
				if (c.inTrade && c.tradeConfirmed && ot1.tradeConfirmed && !c.tradeConfirmed2) {
					c.tradeConfirmed2 = true;
					if(ot1.tradeConfirmed2) {	
						c.acceptedTrade = true;
						ot1.acceptedTrade = true;
						c.getTradeAndDuel().giveItems();
						ot1.getTradeAndDuel().giveItems();
						c.sendMessage("Trade accepted.");
						c.getTradeAndDuel().resetTrade();
						ot1.sendMessage("Trade accepted.");
						ot1.getTradeAndDuel().resetTrade();
						break;
					}
				ot1.getPA().sendFrame126("Other player has accepted.", 3535);
				c.getPA().sendFrame126("Waiting for other player...", 3535);
				}
				} catch (Exception e) {
						c.getTradeAndDuel().declineTrade();
					}
				} else {
					c.getTradeAndDuel().declineTrade();
					c.sendMessage("You can't trade two people at once!");
					ot1.sendMessage("You can't trade two people at once!");
				}
			break;