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