Skip to content
Merged

V1 #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
57dab3b
added the info object
filliravaz Aug 18, 2022
4ed79b8
Added getInfo method, commented out deprecated methods, for future re…
filliravaz Aug 18, 2022
9a611cc
Added exceptions
filliravaz Aug 18, 2022
a482cdc
Added server object and serverAction enum
filliravaz Aug 18, 2022
221ceab
Update gradle files
filliravaz Aug 18, 2022
f48e4a5
Added comments
filliravaz Aug 18, 2022
b6ffb16
Added multiple commands execution
filliravaz Aug 18, 2022
ecf7825
Reworked multiple commands execution, added disconnects
filliravaz Aug 18, 2022
dd5d920
Added version mismatch checks
filliravaz Aug 18, 2022
b2bec72
Rework Version Mismatch detection
filliravaz Aug 18, 2022
a62ec0f
Added getServers() method
filliravaz Aug 18, 2022
37f5546
Gradle files update
filliravaz Aug 18, 2022
f78886e
Added badges :+1:
filliravaz Aug 18, 2022
07a370b
Fix formatting
filliravaz Aug 18, 2022
1487b79
Fix Pull Request badge
filliravaz Aug 18, 2022
f8036e9
Removed unnecessary import
filliravaz Aug 18, 2022
040f2d8
Removed old import
filliravaz Aug 18, 2022
be52c57
Add console handling
filliravaz Aug 18, 2022
6ba7ee2
Rework getServerCount
filliravaz Aug 18, 2022
1a71a89
Added Enums for ServerStatus
filliravaz Aug 18, 2022
9821fbb
Same method signature as python API
filliravaz Aug 18, 2022
b1ff140
Added comment/jvadoc
filliravaz Aug 18, 2022
964db4e
Rename ServerStatus enum to ServerFilter
filliravaz Aug 19, 2022
1de4f50
Use Enums as ServerStatus and KeepOnline
filliravaz Aug 19, 2022
4cb52fe
Started work on scheduler integration
filliravaz Aug 20, 2022
f7aebef
Added Task deleted checks
filliravaz Aug 20, 2022
4057c67
Slight refractor
filliravaz Aug 20, 2022
4a86f3d
Added changeName to Task
filliravaz Aug 20, 2022
bd0e3ec
Added getTime, getInterval and setInterval to the task object
filliravaz Aug 20, 2022
2220797
Added isRepeating check
filliravaz Aug 20, 2022
c8007f3
Reworked Task to implement new additions to the API
filliravaz Aug 22, 2022
174073e
Removed unnecessary imports
filliravaz Aug 22, 2022
8d9ebed
Removed old methods
filliravaz Aug 28, 2022
4bba3b6
Added getScheduler method
filliravaz Aug 28, 2022
92c57e8
Added getJob() and figureOutTaskJobType to task
filliravaz Aug 28, 2022
49ea1c6
Added task Jobs
filliravaz Aug 28, 2022
765437b
First step of createTask implementation
filliravaz Aug 28, 2022
49eb791
Fixed missing return statement
filliravaz Aug 28, 2022
cbc6a66
Delete barebones requests
filliravaz Sep 4, 2022
5ff5e8b
Rename Server Action Job
filliravaz Sep 4, 2022
c074398
Use enums for errors instead of literal strings
filliravaz Sep 4, 2022
acf5f5a
Used Endpoints enum instead of literal IP strings
filliravaz Sep 4, 2022
22817a4
Refractor Job class to be better :tm:
filliravaz Sep 4, 2022
4cdd233
Refractor for publishing to Maven Central
filliravaz Sep 5, 2022
441d2a0
First step to Unit Tests
filliravaz Sep 5, 2022
c00b968
Switch from Gradle to Maven
filliravaz Sep 5, 2022
11d966b
Allow connections with unverified SSL certificates
filliravaz Sep 5, 2022
5703f89
Added methods to get stats of the server
filliravaz Sep 5, 2022
94337e4
small refractor
filliravaz Sep 5, 2022
1049b3a
Fixed requests not working
filliravaz Sep 5, 2022
2ac62a4
First JUnit Tests
filliravaz Sep 5, 2022
90ed133
Added two more tests
filliravaz Sep 5, 2022
4959231
Added tearDown method
filliravaz Sep 5, 2022
cdcda07
Removed automatic catches that were not needed
filliravaz Sep 5, 2022
b8cd49c
Configured unit tests on maven
filliravaz Sep 8, 2022
74ae51e
Release Candidate 1
filliravaz Oct 7, 2022
0674c4c
Fix formatting
filliravaz Oct 7, 2022
ba3ce87
More fixes
filliravaz Oct 7, 2022
6383646
Update Maven-Test.yml
filliravaz Oct 7, 2022
69f4ffd
Yet another worflow fix
filliravaz Oct 7, 2022
a5f7f69
Wrong unzip command
filliravaz Oct 7, 2022
156ab5d
Wrong directory name
filliravaz Oct 7, 2022
ae63cea
Update Maven-Test.yml
filliravaz Oct 7, 2022
705fe7f
Try new fix + add debug
filliravaz Oct 7, 2022
74c45e4
Update 7z command with correct argument hopefully
filliravaz Oct 7, 2022
2c11629
Update Java version to LTS
filliravaz Oct 7, 2022
2010ac7
Fix test class annotation
filliravaz Oct 7, 2022
050b5c3
Added more fixes to test class
filliravaz Oct 7, 2022
5ad4659
More updates to Workflows
filliravaz Oct 7, 2022
2c659bc
More typos
filliravaz Oct 7, 2022
c86441f
Added default value + logs
filliravaz Oct 8, 2022
c455588
Update TestMCSSApi.java
filliravaz Oct 8, 2022
27c39aa
Update TestMCSSApi.java
filliravaz Oct 8, 2022
00ca4a4
More delay to let API startup
filliravaz Oct 8, 2022
e7ad107
More debug + fix hopefully?
filliravaz Oct 8, 2022
03a374f
Update Maven-Test.yml
filliravaz Oct 8, 2022
8a99e6b
disabled tests on v1 branch
filliravaz Oct 23, 2022
d79ea2d
bumped API version
filliravaz Oct 23, 2022
812b74b
Added NO_SERVER_ACCESS error message
filliravaz Oct 23, 2022
8f404a5
Added APINoServerAccessException
filliravaz Oct 23, 2022
24228cd
Fix IDEA issues
filliravaz Oct 23, 2022
a93bded
Added player requirement enum
filliravaz Oct 23, 2022
2a31a4f
Added Backup classes, errors and enums
filliravaz Oct 23, 2022
8845f71
Added server_details endpoint
filliravaz Oct 23, 2022
8e9317b
Added missing request properties
filliravaz Oct 23, 2022
c044ca7
Code cleanup + new setters
filliravaz Oct 23, 2022
f970551
Add "setJavaAllocatedMemory" in Server object
filliravaz Oct 24, 2022
c258a8f
Add PlayerRequirement for Tasks
filliravaz Oct 24, 2022
e463315
small cleanup of Scheduler class
filliravaz Oct 24, 2022
5edd712
Added JavaDocs Everywhere
filliravaz Oct 24, 2022
e27d9fa
Bumped versions
filliravaz Oct 25, 2022
2ce220d
Disable tests
filliravaz Oct 25, 2022
f041e73
Update .gitignore
filliravaz Oct 25, 2022
6ddc8e5
License + other maven stuff
filliravaz Oct 29, 2022
902d019
Add contributors section in Readme
filliravaz Nov 1, 2022
b3b75ad
Merge branch 'V1' of https://github.com/Les-Projects/mcss-api-java in…
filliravaz Nov 1, 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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"projectName": "mcss-api-java",
"projectOwner": "Les-Projects",
"repoType": "github",
"repoHost": "https://github.com",
"linkToUsage": false,
"skipCi": true,
"contributors": []
}
42 changes: 42 additions & 0 deletions .github/workflows/Maven-Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Maven-Test
on:
push:
branches:
- main
- develop
jobs:
download-mcss:
runs-on: ubuntu-latest
steps:
- run: |
wget -O mcss.7z "${{ secrets.MCSS_DOWNLOAD_LINK }}"
7z x ./mcss.7z
ls
sudo chmod +x GithubWorkflowsTest/mcss.exe
sudo apt update
sudo apt install -y screen
shell: bash
test:
runs-on: ubuntu-latest
needs: download-mcss
steps:
- uses: actions/checkout@v2
name: Run tests
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- run: |
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-6.0
sudo screen -d -m GithubWorkflowsTest/mcss.exe --no-ui
sleep 35
sudo screen -ls
mvn --batch-mode --update-snapshots package
shell: bash
env:
MCSS_API_TOKEN: ${{ secrets.MCSS_API_KEY }}
MCSS_API_IP: ${{ secrets.MCSS_API_IP }}
38 changes: 38 additions & 0 deletions .github/workflows/Release-GH-Packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
download-mcss:
runs-on: ubuntu-latest
steps:
- run: |
wget -O mcss.7z "${{ secrets.MCSS_DOWNLOAD_LINK }}"
7z x ./mcss.7z
ls
sudo chmod +x GithubWorkflowsTest/mcss.exe
sudo apt update
sudo apt install screen
shell: bash
publish:
needs: download-mcss
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Start MCSS
run: |
sudo screen -d -m GithubWorkflowsTest/mcss.exe --no-ui
sleep 15
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MCSS_API_TOKEN: ${{ secrets.MCSS_API_KEY }}
MCSS_API_IP: ${{ secrets.MCSS_API_IP }}
36 changes: 28 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/
Expand Down Expand Up @@ -75,3 +75,23 @@ fabric.properties

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
secrets.gradle

# Eclipse
.classpath
.project
.settings/

# Intellij
.idea/
*.iml

# Mac
.DS_Store

# Maven
log/
target/
.idea/discord.xml
.idea/compiler.xml
.idea/misc.xml
Binary file not shown.
Empty file.
Binary file removed .gradle/7.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file removed .gradle/7.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file removed .gradle/7.1/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle/7.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file removed .gradle/7.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file removed .gradle/7.1/gc.properties
Empty file.
Binary file removed .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 0 additions & 2 deletions .gradle/buildOutputCleanup/cache.properties

This file was deleted.

Binary file removed .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file removed .gradle/checksums/checksums.lock
Binary file not shown.
Binary file removed .gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file removed .gradle/checksums/sha1-checksums.bin
Binary file not shown.
Empty file removed .gradle/vcs-1/gc.properties
Empty file.
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

9 changes: 8 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

10 changes: 5 additions & 5 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading