Fixes the check for testing if a paid sign already exists
This commit is contained in:
		| @@ -50,13 +50,12 @@ public class AddCommand implements CommandExecutor { | ||||
|  | ||||
|         try { | ||||
|             PaidSign sign = new PaidSign(signName, cost, permission, ignoreCase, ignoreColor); | ||||
|             /* TODO: Rewrite the method for comparing if paid signs are duplicated | ||||
|             for (PaidSign similarSign : manager.getPaidSigns(sign.getCleanId(), sign.getLineIndex())) { | ||||
|                 if (sign.matches(similarSign)) { | ||||
|                     sender.sendMessage("A paid sign with the same id and line already exists"); | ||||
|             for (PaidSign otherSign : manager.getAllPaidSigns()) { | ||||
|                 if (sign.getName().equals(otherSign.getName())) { | ||||
|                     sender.sendMessage("A paid sign with the same name already exists"); | ||||
|                     return false; | ||||
|                 } | ||||
|             }*/ | ||||
|             } | ||||
|             manager.addPaidSign(sign); | ||||
|             sender.sendMessage("Successfully added new paid sign"); | ||||
|             return true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user