Skip to content

Commit

Permalink
Ignore a duel request if a player is already in a duel. 0.9.14.3 Pre …
Browse files Browse the repository at this point in the history
…Release
  • Loading branch information
teozfrank committed May 17, 2015
1 parent fb85ce2 commit 1da5c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ public void sendNormalDuelRequest(Player duelSender, String duelTargetIn) {

UUID duelTargetUUID = duelTarget.getUniqueId();

if(isInDuel(duelTargetUUID)) {
Util.sendMsg(duelSender, ChatColor.RED + "This player is already in a duel!");
return;
}

if (this.duelRequests.containsKey(duelSenderUUID) && this.duelRequests.containsValue(duelTargetUUID)) {
Util.sendMsg(duelSender, ChatColor.YELLOW + "You have already sent a request to " +
ChatColor.AQUA + duelTargetIn + ".");
Expand Down Expand Up @@ -341,6 +346,10 @@ public void sendBetDuelRequest(Player duelSender, String duelTargetIn, double am

UUID duelTargetUUID = duelTarget.getUniqueId();

if(isInDuel(duelTargetUUID)) {
Util.sendMsg(duelSender, ChatColor.RED + "This player is already in a duel!");
return;
}

if (this.duelRequests.containsKey(duelSenderUUID) && this.duelRequests.containsValue(duelTargetUUID)) {
Util.sendMsg(duelSender, ChatColor.YELLOW + "You have already sent a request to " +
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: DuelMe
version: 0.9.14.2 Pre Release
version: 0.9.14.3 Pre Release
author: teozfrank
description: allows players to duel each other in a controlled environment
main: com.teozcommunity.teozfrank.duelme.main.DuelMe
Expand Down

0 comments on commit 1da5c04

Please sign in to comment.