Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 7.6 #5

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
49e8a3d
Added compat with api 7.X
sarhatabaot Aug 7, 2019
770c5e3
Create .travis.yml
sarhatabaot Aug 7, 2019
4df2642
Create README.md
sarhatabaot Aug 7, 2019
e3f0a0d
Added annotations
sarhatabaot Aug 7, 2019
aa44186
Added gradle wrapper
sarhatabaot Aug 7, 2019
3b09d26
Added travis badge
sarhatabaot Aug 7, 2019
753e0fe
Merge pull request #1 from sarhatabaot/api-7
sarhatabaot Aug 10, 2019
3e5a012
Chnaged version number
sarhatabaot Aug 11, 2019
a714a2d
Merge pull request #2 from sarhatabaot/api-7
sarhatabaot Aug 11, 2019
525d32a
loadTracks method gracefully fails
sarhatabaot Oct 31, 2019
69b4e59
Merge pull request #4 from sarhatabaot/issue/out-of-bounds
sarhatabaot Oct 31, 2019
46ef11c
Fixed formatting issue
sarhatabaot Oct 31, 2019
57b0541
Create LICENSE
sarhatabaot Nov 1, 2019
825ec3f
Update build.gradle
sarhatabaot Nov 1, 2019
6ca3886
Fixed generation of mcmod.info
sarhatabaot Nov 2, 2019
146b670
Fixes #5
sarhatabaot Nov 4, 2019
67b1fd9
Update build.gradle
sarhatabaot Nov 4, 2019
2aa0184
Update Composer.java
sarhatabaot Nov 4, 2019
6b62a69
Merge pull request #6 from sarhatabaot/issue/layered-tracks
sarhatabaot Nov 4, 2019
6f6df80
Update .travis.yml
sarhatabaot Nov 9, 2019
c29b1f5
Merge pull request #8 from sarhatabaot/discord-webhook
sarhatabaot Nov 9, 2019
3c1d87e
Renamed Pitch to PitchUtils
sarhatabaot Dec 25, 2019
392626c
Now correctly display the amount of loaded tracks
sarhatabaot Mar 29, 2020
8f39bb1
Create maven.yml
sarhatabaot Oct 31, 2020
5c3c793
Create codeql-analysis.yml
sarhatabaot Oct 31, 2020
c78307f
Create gradle.yml
sarhatabaot Oct 31, 2020
ccc7092
Delete maven.yml
sarhatabaot Oct 31, 2020
0de7c71
Added commands
sarhatabaot Oct 31, 2020
76a47af
Create Playlist.java
sarhatabaot Oct 31, 2020
5903584
Create PlaylistCommandElement.java
sarhatabaot Oct 31, 2020
34996b8
Added entries for playlists
sarhatabaot Oct 31, 2020
286d96a
Added support for playlists
sarhatabaot Oct 31, 2020
0bf22b8
Added support for playlists
sarhatabaot Oct 31, 2020
cf18e1f
Added pagination to playlists list
sarhatabaot Oct 31, 2020
d1aad6d
Update Composer.java
sarhatabaot Oct 31, 2020
e572bbf
Update ComposerCommands.java
sarhatabaot Oct 31, 2020
5e473db
Merge branch 'master' into playlist
sarhatabaot Oct 31, 2020
a732a12
Added loop options
sarhatabaot Oct 31, 2020
6d54f14
Added stop command
sarhatabaot Oct 31, 2020
3f73c2f
Added clickables to pagination
sarhatabaot Oct 31, 2020
1d3efd4
Added play once command
sarhatabaot Oct 31, 2020
5e6933d
Added some hover messages
sarhatabaot Oct 31, 2020
3e3d812
Fixed playonce
sarhatabaot Nov 1, 2020
25ae723
Version bump for dev
sarhatabaot Nov 1, 2020
9e0f850
Fixed hover on space
sarhatabaot Nov 1, 2020
9779b76
Track list now displays the playlist name
sarhatabaot Nov 1, 2020
24f2bcf
Added some logger messages
sarhatabaot Nov 1, 2020
60e49a1
Fixed track looping
sarhatabaot Nov 1, 2020
0d73f44
Update build.gradle
sarhatabaot Nov 1, 2020
3c6f140
Updated readme with 4.1.0 info
sarhatabaot Nov 1, 2020
716dbfd
Fixes shuffle error
sarhatabaot Nov 8, 2020
72ba80a
Version bump
sarhatabaot Nov 8, 2020
35b0095
Update for newer NBS files
DrZoddiak Aug 1, 2021
b3d5557
Bump version
DrZoddiak Aug 1, 2021
d0e6b57
Fix some stuff I forgot about
DrZoddiak Aug 1, 2021
b4d32bb
Bump version
DrZoddiak Aug 1, 2021
be7f8b0
Fix command when ran from console
DrZoddiak Aug 1, 2021
cceca0a
Merge pull request #12 from DrZoddiak/master
sarhatabaot Aug 1, 2021
5369a74
Update build.gradle
sarhatabaot Aug 1, 2021
de23157
Minor cleanup
sarhatabaot Nov 20, 2022
b356fd4
Sponge 7.4.0
sarhatabaot Nov 20, 2022
9ec9abf
Added a check for "classic" version of the NBS file format
sarhatabaot Dec 21, 2022
d30f6a1
Update to gradle 7.6
sarhatabaot Dec 21, 2022
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
68 changes: 68 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
# ******** NOTE ********

name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '33 0 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
26 changes: 26 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.gradle/
/.idea/
/build/
/gradle/
/out/
*.iml
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: java
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-2020 windy, sarhatabaot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Composer [![Codacy Badge](https://api.codacy.com/project/badge/Grade/e14287e74fb44aeeb1c294ff7959076e)](https://www.codacy.com/app/sarhatabaot/Composer?utm_source=github.com&utm_medium=referral&utm_content=sarhatabaot/Composer&utm_campaign=Badge_Grade) [![Build Status](https://travis-ci.org/sarhatabaot/Composer.svg?branch=api-7)](https://travis-ci.org/sarhatabaot/Composer)

#### This version has been updated to work with Sponge API v7.
Composer is a full featured note block music importer and player. Import Note Block Studio 151 files by placing them in the config/composer/tracks/ directory and the plugin will automatically load them on start.

Composer comes with a full music player built in as shown below. There are commands for each action you can perform within this menu as well as the text itself being clickable.

![Composer Example](./images/composer-overview.png)

## Features
* Per player music player for loaded tracks.
* Play, pause, shuffle, skip, back actions.
* Flexible API to allow developers to create compositions programmatically or import other file formats.

## Installation
1. Place the composer-x.x-SNAPSHOT.jar file in your mods/ folder.
2. Place your .nbs files in the config/composer/tracks/ directory.
3. Run the server.


## Playlists
As of v4.1.0 Composer support playlists. To use playlists enable the option in default.conf
```
use-playlists=true
default-playlist="default"
```
### Creating a playlist
1. Under config/composer/playlists create a folder with the desired name.
2. Place your .nbs files in the folder you created.
3. Run the server.

### Set a playlist
Run the `/music playlist <playlist>` command.

### Setting a default playlist
Change the config option to the playlist name.
```
default-playlist="default"
```
## Commands
Note: The -p lets you target a player other than yourself.
* `/composer` or `/music`: Base command for plugin. These can be used interchangeably.
* `/music list`
Aliases: `list-tracks`, `tracks`, `track-list`
* `/music play [-p <player>] <trackNumber>`
Aliases: `start`, `>`
* `/music play-once [-p <player>] <trackNumber>`
* `/music pause [-p <player>]`
Aliases: `||`
* `/music stop`
* `/music resume [-p <player>]`
* `/music shuffle [-p <player>]`
* `/music queue [-p <player>]`: Shows this player’s play queue
Aliases: `order`
* `/music next [-p <player>]`
Aliases: `skip`, `>|`
* `/music previous [-p <player>]`
Aliases: `back`, `|<`
* `/music playlist <playlist> [-p <player>]`: Sets an active playlist.
* `/music list-playlist`
Aliases: `playlists`
* `/music loop-track`: Loops the track.
* `/music loop-playlist`: Loops the playlist.



## Permissions
* `composer.musicplayer`: Allows access to music player commands.
* `composer.musicplayer.others`: Allows use of -p flag.


28 changes: 21 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'org.spongepowered.plugin' version '0.7'
id 'java'
id 'org.spongepowered.plugin' version '0.9.0'
id "io.freefair.lombok" version "4.1.3"
}

compileJava.options.encoding = 'UTF-8'

group = 'se.walkercrou'
version = '2.0.0'
version = '4.1.4'
description = 'Note block music importer and player.'

sponge.plugin {
id = 'composer'
meta {
name = "Composer"
sourceCompatibility = targetCompatibility = '1.8'


processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}

repositories {
mavenCentral()
}

dependencies {
compile 'org.spongepowered:spongeapi:5.0.0'
compileOnly 'org.spongepowered:spongeapi:7.4.0'
annotationProcessor 'org.spongepowered:spongeapi:7.4.0'
compile 'org.jetbrains:annotations:23.1.0'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading