-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3476182
commit eb26de4
Showing
27 changed files
with
921 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ | |
hs_err_pid* | ||
replay_pid* | ||
|
||
# maven files | ||
settings.xml | ||
# gradle | ||
.gradle/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.mineplex.sdk.plugin' version "1.6.0" | ||
} | ||
|
||
group = 'ws.billy.skmineplex' | ||
version = '1.0-SNAPSHOT' | ||
sourceCompatibility = '21' | ||
targetCompatibility = '21' | ||
|
||
ext { | ||
spigotApiVersion = '1.21.1-R0.1-SNAPSHOT' | ||
lombokVersion = '1.18.30' | ||
jacksonCoreVersion = '2.15.2' | ||
jacksonDatabindVersion = '2.15.2' | ||
skriptVersion = '2.9.4' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://repo.papermc.io/repository/maven-public/' } | ||
maven { url 'https://repo.skriptlang.org/releases' } | ||
} | ||
|
||
dependencies { | ||
compileOnly "org.spigotmc:spigot-api:${spigotApiVersion}" | ||
compileOnly "org.projectlombok:lombok:${lombokVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonCoreVersion}" | ||
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}" | ||
implementation "com.github.SkriptLang:Skript:${skriptVersion}" | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
tasks.register('shade', Jar) { | ||
archiveClassifier = 'all' | ||
from sourceSets.main.output | ||
dependsOn configurations.runtimeClasspath | ||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE // or DuplicatesStrategy.IGNORE | ||
manifest { | ||
attributes( | ||
'Implementation-Title': project.name, | ||
'Implementation-Version': project.version | ||
) | ||
} | ||
} | ||
|
||
build.dependsOn shade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
## Effects | ||
# Effects | ||
|
||
## Game | ||
|
||
## World | ||
|
||
### Create a world | ||
|
||
``` | ||
[create] mineplex world with template %string% | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
## Events | ||
# Events | ||
|
||
## Game | ||
|
||
### Game state change | ||
|
||
``` | ||
on game state change | ||
``` | ||
|
||
This also then exposes the previous and new state. | ||
|
||
``` | ||
on game state change: | ||
broadcast "%past event-gamestate%" # the previous state | ||
broadcast "%event-gamestate%" # the new state | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Examples | ||
|
||
## World | ||
|
||
### Loading a world | ||
|
||
Load the world from a template name and save it to a variable for further usage | ||
|
||
``` | ||
set {_world} to "world-name" parsed as a mineplex world | ||
``` | ||
|
||
## Game | ||
|
||
### Creating a game | ||
|
||
Create a game and register it as the current game running on this server | ||
|
||
``` | ||
set {_game} to "Micro Battles" parsed as a mineplex game | ||
set {_game}'s game world to {_world} | ||
set {_game}'s maximum players to 20 | ||
set {_game}'s minimum players to 4 | ||
set the current game to {_game} | ||
``` | ||
|
||
### Starting a game | ||
|
||
``` | ||
on join: | ||
add player to {_players::*} | ||
on player quit: | ||
remove player from {_players::*} | ||
every 1 second: | ||
if size of {_players::*} is greater than or equal to {_game}'s minimum players: | ||
wait 10 seconds | ||
set game state of {_game} to "STARTED" | ||
clear {_players::*} | ||
``` | ||
|
||
### Game state changed | ||
|
||
``` | ||
on game state change: | ||
if event-gamestate = "STARTED": | ||
broadcast "The game has started!" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
## Expressions | ||
# Expressions | ||
|
||
## Game | ||
|
||
### Set game state | ||
|
||
``` | ||
set %game%'s game state to %state% | ||
``` | ||
|
||
State options: `PREPARING`, `PRE_START`, `STARTED`, `ENDED` | ||
|
||
### Get current game state | ||
|
||
``` | ||
%game%'s game state | ||
``` | ||
|
||
### Set game world | ||
|
||
``` | ||
set %game%'s game world to %mineplex world% | ||
``` | ||
|
||
See effects -> Create a world for information | ||
|
||
### Get game world | ||
|
||
``` | ||
%game%'s game world | ||
``` | ||
|
||
## Game Manager | ||
|
||
### Set the current game of the server | ||
|
||
``` | ||
set [the] current game to {_game} | ||
``` | ||
|
||
### Get the current game | ||
|
||
``` | ||
[the] current game | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.