Skip to content

Commit

Permalink
- Add Placeholder: %notquests_player_questpoints%
Browse files Browse the repository at this point in the history
- Fix another Placeholder
  • Loading branch information
AlessioGr committed Sep 20, 2021
1 parent 98fc687 commit ca365c7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 3 deletions.
Binary file modified .gradle/7.1.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.1.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.1.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'notquests'
version = '1.3.2'
version = '1.3.3'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion build/resources/main/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: NotQuests
version: '1.3.2'
version: '1.3.3'
main: notquests.notquests.NotQuests
api-version: 1.17
authors: [ NoeX ]
Expand Down
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ public String onPlaceholderRequest(Player player, String identifier) {
return "";
}

if (identifier.startsWith("player_questpoints")) {
final QuestPlayer questPlayer = main.getQuestPlayerManager().getQuestPlayer(player.getUniqueId());
if (questPlayer != null) {
return "" + questPlayer.getQuestPoints();
}
return "";

}

if (identifier.startsWith("player_has_completed_quest_")) {
final String questName = identifier.replace("player_has_completed_quest_", "");
final Quest quest = main.getQuestManager().getQuest(questName);
Expand Down Expand Up @@ -134,7 +143,7 @@ public String onPlaceholderRequest(Player player, String identifier) {

}

if (identifier.startsWith("player_iss_objective_unlocked_and_active") && identifier.contains("_from_active_quest_")) {
if (identifier.startsWith("player_is_objective_unlocked_and_active") && identifier.contains("_from_active_quest_")) {
String objectiveIDName = identifier.replace("player_is_objective_unlocked_and_active_", "");
objectiveIDName = objectiveIDName.substring(0, objectiveIDName.indexOf("_from_active_quest_"));
final int objectiveID = Integer.parseInt(objectiveIDName);
Expand Down

0 comments on commit ca365c7

Please sign in to comment.