Your implementation didn't work properly and added bugs of incomplete upgrades not being able to be purchased.
1.9(current) + 0.3(addLevels) > 2 (maxLevel)
Hence not purchasable when 1.9 is not yet the max level. It should be purchasable.
Checking if (spawner.getCurrentLevel() < maxLevel) is a better solution as it allows them to fully stack the forge.
Plus the bug only affected spawners assigned to a team as spawners unassigned worked properly with a max upgrade.
Fixed in https://github.com/boiscljo/SBA/commit/1adcb46a0aadb41992c25c54c5de6341c8f28630 Line 522(new)
if (spawner.getCurrentLevel() < maxLevel) spawnersToUpgrade.add(spawner);
Line 545if (newLevel < maxLevelF) spawnersToUpgrade.add(closestSpawner);
Your implementation didn't work properly and added bugs of incomplete upgrades not being able to be purchased.
1.9(current) + 0.3(addLevels) > 2 (maxLevel)
Hence not purchasable when 1.9 is not yet the max level. It should be purchasable.Checking
if (spawner.getCurrentLevel() < maxLevel)
is a better solution as it allows them to fully stack the forge. Plus the bug only affected spawners assigned to a team as spawners unassigned worked properly with a max upgrade.