-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from gabber235/develop
Small tweaks and bugfixes
- Loading branch information
Showing
224 changed files
with
9,253 additions
and
1,380 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
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 |
---|---|---|
|
@@ -5,8 +5,9 @@ on: | |
branches: | ||
- main | ||
paths: | ||
- 'plugins/**' | ||
- 'plugin/**' | ||
- 'adapters/**' | ||
- 'app/**' | ||
- '.github/workflows/build-development-jars-and-publish.yml' | ||
workflow_dispatch: | ||
|
||
|
@@ -27,8 +28,8 @@ jobs: | |
id: vars | ||
run: | | ||
version=$(cat version.txt) | ||
short_sha=$(echo $GITHUB_SHA | cut -c1-7) | ||
full_version="${version}-dev-${short_sha}" | ||
run_number=${{ github.run_number }} | ||
full_version="${version}-dev-${run_number}" | ||
echo $full_version > version.txt | ||
echo "version=$full_version" >> $GITHUB_OUTPUT | ||
- name: Build Plugin | ||
|
@@ -65,6 +66,14 @@ jobs: | |
uses: ./.github/actions/build-adapter | ||
with: | ||
adapter: WorldGuardAdapter | ||
- name: Build ZNPCsPlus Adapter | ||
uses: ./.github/actions/build-adapter | ||
with: | ||
adapter: ZNPCsPlusAdapter | ||
- name: Build FancyNpcs Adapter | ||
uses: ./.github/actions/build-adapter | ||
with: | ||
adapter: FancyNpcsAdapter | ||
- name: Publish Development Jars | ||
uses: Kir-Antipov/[email protected] | ||
id: publish | ||
|
@@ -83,7 +92,7 @@ jobs: | |
purpur | ||
game-versions: | | ||
1.19.4 | ||
[1.20, 1.20.2] | ||
[1.20, 1.20.4] | ||
- name: Notify Discord | ||
uses: sarisia/actions-status-discord@v1 | ||
with: | ||
|
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
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,29 @@ | ||
name: Generate Sponsors README | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# This is a cron schedule, it will run every day at 15:30. You can change this to whatever you want.x | ||
- cron: 30 15 * * 0-6 | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
|
||
# Generate the sponsors | ||
- name: Generate Sponsors 💖 | ||
uses: JamesIves/github-sponsors-readme-action@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
file: 'README.md' | ||
minimum: 1000 | ||
|
||
# Deploy the changes back to the main branch of the repository | ||
- name: Deploy to GitHub Pages 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: main | ||
# As we're deploying changes to our markdown files, this needs to be . to push the root directory back to the repository. | ||
folder: '.' |
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
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
47 changes: 47 additions & 0 deletions
47
...asicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/action/SetBlockActionEntry.kt
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,47 @@ | ||
package me.gabber235.typewriter.entries.action | ||
|
||
import com.github.shynixn.mccoroutine.bukkit.launch | ||
import me.gabber235.typewriter.adapters.Colors | ||
import me.gabber235.typewriter.adapters.Entry | ||
import me.gabber235.typewriter.adapters.modifiers.Help | ||
import me.gabber235.typewriter.entry.Criteria | ||
import me.gabber235.typewriter.entry.Modifier | ||
import me.gabber235.typewriter.entry.entries.ActionEntry | ||
import me.gabber235.typewriter.plugin | ||
import me.gabber235.typewriter.utils.Icons | ||
import org.bukkit.Location | ||
import org.bukkit.Material | ||
import org.bukkit.entity.Player | ||
|
||
@Entry("set_block", "Set a block at a location", Colors.RED, Icons.CUBE) | ||
/** | ||
* The `SetBlockActionEntry` is an action that sets a block at a specific location. | ||
* | ||
* :::caution | ||
* This will set the block for all the players on the server, not just the player who triggered the action. | ||
* It will modify the world, so be careful when using this action. | ||
* ::: | ||
* | ||
* ## How could this be used? | ||
* | ||
* This action can be useful in a variety of situations. You can use it to create structures, set traps, or any other custom block placements you want to make. The possibilities are endless! | ||
*/ | ||
class SetBlockActionEntry( | ||
override val id: String = "", | ||
override val name: String = "", | ||
override val criteria: List<Criteria> = emptyList(), | ||
override val modifiers: List<Modifier> = emptyList(), | ||
override val triggers: List<String> = emptyList(), | ||
@Help("The material of the block to set.") | ||
val material: Material = Material.AIR, | ||
@Help("The location to set the block at.") | ||
val location: Location = Location(null, 0.0, 0.0, 0.0), | ||
) : ActionEntry { | ||
override fun execute(player: Player) { | ||
super.execute(player) | ||
|
||
plugin.launch { | ||
location.block.type = material | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...BasicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/action/SetItemActionEntry.kt
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,37 @@ | ||
package me.gabber235.typewriter.entries.action | ||
|
||
import me.gabber235.typewriter.adapters.Colors | ||
import me.gabber235.typewriter.adapters.Entry | ||
import me.gabber235.typewriter.adapters.modifiers.Help | ||
import me.gabber235.typewriter.entry.Criteria | ||
import me.gabber235.typewriter.entry.Modifier | ||
import me.gabber235.typewriter.entry.entries.ActionEntry | ||
import me.gabber235.typewriter.utils.Icons | ||
import me.gabber235.typewriter.utils.Item | ||
import org.bukkit.entity.Player | ||
|
||
@Entry("set_item", "Set an item in a specific slot", Colors.RED, Icons.WAND_SPARKLES) | ||
/** | ||
* The `Set Item Action` is an action that sets an item in a specific slot in the player's inventory. | ||
* | ||
* ## How could this be used? | ||
* | ||
* This can be used to equip a player with an elytra, or give them a weapon. | ||
*/ | ||
class SetItemActionEntry( | ||
override val id: String = "", | ||
override val name: String = "", | ||
override val criteria: List<Criteria>, | ||
override val modifiers: List<Modifier>, | ||
override val triggers: List<String> = emptyList(), | ||
@Help("The item to set.") | ||
val item: Item = Item.Empty, | ||
@Help("The slot to set the item in.") | ||
val slot: Int = 0, | ||
) : ActionEntry { | ||
override fun execute(player: Player) { | ||
super.execute(player) | ||
|
||
player.inventory.setItem(slot, item.build(player)) | ||
} | ||
} |
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
Oops, something went wrong.