So. I have my func startDuel(). I want players to /duel <player>. Then a request is sent to the other player. If they type /duel accept the function startDuel() executes. So, how can I execute the function on the condition that the other player types /duel accept <player> Use boolean object?
when the other player execute accept command calls accept since you dont need to check if the issuer accepted it anyways
I would suggest creating a 2 dimensional array with a key for each player. When a player receives a duel request, add the requester's name to the target player's array. Then, when the target player tries to accept the request, you can check if the requester's name/identifier is in the target array. Also, boolean is a data type, not an object.