Skip to content

Commit

Permalink
Added "%parkour_course_displayname_(course)%" placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
A5H73Y committed Apr 9, 2021
1 parent af37c95 commit 69d75a1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 deletions.
24 changes: 24 additions & 0 deletions docs/changelogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ Changelogs

Please note that each version of Parkour is backwards compatible with the previous version and will automatically upgrade your config upon start up. There will be no manual intervention unless stated in breaking changes.

## Parkour 6.5
### Changes
* Added Course display names `/pa setcourse (course) displayname (value)` (with new placeholders)
* Added Join Broadcast (OnJoin.BroadcastLevel)
* Added "JoinCourse" Sounds
* Added "%parkour_player_course_completed_(course)%" placeholder
* Added "%parkour_course_joinfee_(course)%" placeholder
* Added "%parkour_course_ecoreward_(course)%" placeholder
* Added "%parkour_course_players_(course)%" placeholder
* Added "%parkour_course_playerlist_(course)%" placeholder
* Added ability for commands to be run from Player starting with prefix "player:"
* Added "addlevel" to "setplayer" command
* Added optional Maximum ParkourLevel (ParkourTool.Restart.SecondCooldown)
* Added "ParkourTool.Restart.SecondCooldown" for Restart tool countdown (Other.Parkour.MaximumParkourLevel)
* Added new 'PlayerParkourRankEvent' event
* Added "/pa placeholder (placeholder)" to quickly test placeholder integration and expected output.
* Improvement to not send messages if blank
* Fix `PlayerParkourLevelEvent` not being fired
* Fix for 'Unbreakable' flag on 1.8 servers
* Made Parkour messages more consistent (replacing internal Parkour placeholders)
* Renamed "ResetTimeWithNoCheckpoint" to "ResetProgressWithNoCheckpoint" as all session details are reset now
* Changed AutoStart reactivation to reset session rather than restart course
* Fixed config issues after a fresh install

## Parkour 6.4
### Changes
* Added ability to remove Parkour messages
Expand Down
8 changes: 0 additions & 8 deletions docs/essential/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ Frequently Asked Questions

To disable the Parkour Join message, in the `config.yml` find `Other.Display.JoinWelcomeMessage` and set it to `false`.

##### Update Player Database Time

To keep a single database row per Player per Course, in the `config.yml` find `OnFinish.UpdatePlayerDatabaseTime` and set it to `true`.

##### Stuck Pressure Plates

To allow for multiple Players to stand on a pressure plate at once, in the `config.yml` find `OnCourse.PreventPlateStick` and set it to `true`.

##### Available Placeholders

Each of the Parkour PlaceholderAPI placeholders are available here: [Parkour Placeholders](/tutorials/compatible-plugins?id=parkour-placeholders)

## Terms / Meanings

#### Course
Expand Down
5 changes: 5 additions & 0 deletions docs/files/parkourPlaceholders.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
"alias": "co",
"description": "These are values with context to a provided Course.",
"placeholders": [
{
"placeholder": "%parkour_course_displayname_(course)%",
"output": "&4Easy &6Course",
"description": "TODO."
},
{
"placeholder": "%parkour_course_record_(course)_time%",
"output": "00:01:23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ private String getPlayerPlaceholderValue(OfflinePlayer offlinePlayer, String...

private String getCoursePlaceholderValue(OfflinePlayer offlinePlayer, String... arguments) {
switch (arguments[1]) {
case "displayname":
if (arguments.length != 3) {
return INVALID_SYNTAX;
}

return CourseInfo.getCourseDisplayName(arguments[2]);

case "record":
if (arguments.length != 4) {
return INVALID_SYNTAX;
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/parkourPlaceholders.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
"alias": "co",
"description": "These are values with context to a provided Course.",
"placeholders": [
{
"placeholder": "%parkour_course_displayname_(course)%",
"output": "&4Easy &6Course",
"description": "TODO."
},
{
"placeholder": "%parkour_course_record_(course)_time%",
"output": "00:01:23",
Expand Down

0 comments on commit 69d75a1

Please sign in to comment.