Players can now get the quest cape at the current # of acquirable points

This commit is contained in:
Ceikry 2020-03-23 18:08:29 -05:00
parent f0e40199be
commit fb67c8be93

View file

@ -14,6 +14,7 @@ import org.crandor.plugin.Plugin;
*/
@InitializablePlugin
public final class QuestCapePlugin extends OptionHandler {
final int MAX_QP = 63;
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
@ -24,7 +25,7 @@ public final class QuestCapePlugin extends OptionHandler {
@Override
public boolean handle(Player player, Node node, String option) {
if (!player.getQuestRepository().hasCompletedAll()) {
if (!(player.getQuestRepository().getPoints() == MAX_QP)) {
player.getPacketDispatch().sendMessage("You cannot wear this " + node.getName().toLowerCase() + " yet.");
return true;
}