Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build Artifact
run: gradle build
run: ./gradlew build

- name: Upload Artifact to Actions
uses: actions/upload-artifact@v4
Expand All @@ -40,7 +40,7 @@ jobs:

- name: Publish Artifact
if: ${{ github.event_name == 'release' }}
run: gradle publish
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fr/zetamap/morecommands/misc/Players.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static SearchResult findByName(String arg) {
public static SearchResult findByID(String[] args, int from, int to) {
if (args.length == 0 || from < 0 || to > args.length || from >= to) return new SearchResult(null, args);
if (args[from].length() < 2 || args[from].charAt(0) != '#') return new SearchResult(null, copyIfNeeded(args, from, to));
int id = Strings.parseInt(args[0], 10, Integer.MIN_VALUE, 1, args.length);
int id = Strings.parseInt(args[from], 10, Integer.MIN_VALUE, 1, args[from].length());
return id == Integer.MIN_VALUE ? new SearchResult(null, copyIfNeeded(args, from, to)) :
new SearchResult(PlayerData.id(id), copyIfNeeded(args, from+1, to));
}
Expand Down Expand Up @@ -130,4 +130,4 @@ public SearchResult(PlayerData player, String[] rest) {
this.found = player != null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean canStart(PlayerData player, Context reason) {
Players.err(player, "Only players on your team can be kicked.");
return false;
} else if (!Vars.state.rules.pvp &&
PlayerData.count(p -> player.player.team() == objective().target.player.team()) < 3) {
PlayerData.count(p -> p.player.team() == reason.target.player.team()) < 3) {
Players.err(player, "At least 3 players from your own team are needed to start a votekick.");
return false;
}
Expand Down