Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,35 @@ jobs:
CONTRIBUTORS=$(mktemp)
PREVIOUS_CONTRIBUTORS=$(mktemp)

github_coauthors() {
local sha="$1"
local line
local email
local login

while IFS= read -r line; do
if [[ "$line" =~ ^Co-authored-by:[[:space:]]*.*[<]([^>]+)[>][[:space:]]*$ ]]; then
email="${BASH_REMATCH[1]}"
login=""

if [[ "$email" =~ ^[0-9]+\+([^@]+)@users\.noreply\.github\.com$ ]]; then
login="${BASH_REMATCH[1]}"
elif [[ "$email" =~ ^([^@]+)@users\.noreply\.github\.com$ ]]; then
login="${BASH_REMATCH[1]}"
fi

[ -n "$login" ] && echo "$login"
fi
done < <(git show -s --format='%B' "$sha")
}

if [ -n "${CHANGELOG_BASE:-}" ] && git rev-parse "$CHANGELOG_BASE" >/dev/null 2>&1; then
git log --format='%aN' "$CHANGELOG_BASE" \
| sort -fu > "$PREVIOUS_CONTRIBUTORS"
{
git log --format='%aN' "$CHANGELOG_BASE"
while read -r SHA; do
github_coauthors "$SHA"
done < <(git rev-list "$CHANGELOG_BASE")
} | sort -fu > "$PREVIOUS_CONTRIBUTORS"
fi

{
Expand Down Expand Up @@ -193,6 +219,8 @@ jobs:
echo "- $COMMIT_TITLE by $COMMIT_AUTHOR_NAME ($SHORT_SHA)" >> release-notes.md
fi
fi

github_coauthors "$SHA" >> "$CONTRIBUTORS"
done < <(git rev-list --reverse "$RANGE")

if [ "$HAS_CHANGES" = false ]; then
Expand Down
Binary file modified README.md
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "com.bitaspire"
version = "1.2.5"
version = "1.2.6"

repositories {
mavenLocal()
Expand Down
Binary file modified libraries/CyberCore-2.0.0.jar
Binary file not shown.
15 changes: 9 additions & 6 deletions src/main/java/com/bitaspire/cyberlevels/cache/Rewards.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ public void executeCommands(Player player) {
if (main.isEnabled("PlaceholderAPI"))
command = PlaceholderAPI.setPlaceholders(player, main.levelSystem().replacePlaceholders(command, player.getUniqueId(), false));

if (command.toLowerCase().startsWith("[player]")) {
Bukkit.dispatchCommand(player, parseFormat("[player]", command));
continue;
}

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), parseFormat("[console]", command));
String toExecute = command;
main.scheduler().runTask(() -> {
if (toExecute.toLowerCase().startsWith("[player]")) {
Bukkit.dispatchCommand(player, parseFormat("[player]", toExecute));
return;
}

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), parseFormat("[console]", toExecute));
});
}
}

Expand Down
Loading