Deprecate useless getInstance() method, fixes #428

This commit is contained in:
HappyPikachu 2018-07-31 00:56:05 -04:00
parent 6f85e28ed7
commit 9dd1838389
2 changed files with 8 additions and 3 deletions

View File

@ -131,9 +131,9 @@ public abstract class CustomObjective implements Listener {
if (hasQuest && quester.hasCustomObjective(quest, obj.getName())) {
if (quester.getQuestData(quest).customObjectiveCounts.containsKey(obj.getName())) {
int old = quester.getQuestData(quest).customObjectiveCounts.get(obj.getName());
plugin.getInstance().getQuester(player.getUniqueId()).getQuestData(quest).customObjectiveCounts.put(obj.getName(), old + count);
plugin.getQuester(player.getUniqueId()).getQuestData(quest).customObjectiveCounts.put(obj.getName(), old + count);
} else {
plugin.getInstance().getQuester(player.getUniqueId()).getQuestData(quest).customObjectiveCounts.put(obj.getName(), count);
plugin.getQuester(player.getUniqueId()).getQuestData(quest).customObjectiveCounts.put(obj.getName(), count);
}
int index = -1;
for (int i = 0; i < quester.getCurrentStage(quest).customObjectives.size(); i++) {

View File

@ -446,7 +446,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
}
}
}
/**
* See Github issue #428
*
* @deprecated Do not use this method! Will be removed in future release.
*/
public Quests getInstance() {
return this;
}