Skip to content

Commit

Permalink
Merge pull request #593 from Shynixn/development
Browse files Browse the repository at this point in the history
Merge changes to master --release
  • Loading branch information
Shynixn committed Jun 22, 2024
2 parents b1c4c37 + 7b87c40 commit d59f242
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PetBlocks is a spigot plugin to use blocks and custom heads as pets in Minecraft

* Use blocks as pets in minecraft
* The GUI and pets are completely customizable
* Version support 1.8.R1 - 1.20.R4
* Version support 1.8.R1 - 1.21.R1
* Check out the [PetBlocks-Spigot-Page](https://www.spigotmc.org/resources/12056/) to get more information.

## Installation
Expand Down
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "com.github.shynixn"
version = "9.8.0"
version = "9.9.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -46,8 +46,8 @@ dependencies {

// Custom dependencies
implementation("com.github.shynixn.shygui:shygui:1.0.0")
implementation("com.github.shynixn.mcutils:common:2024.16")
implementation("com.github.shynixn.mcutils:packet:2024.25")
implementation("com.github.shynixn.mcutils:common:2024.19")
implementation("com.github.shynixn.mcutils:packet:2024.30")
implementation("com.github.shynixn.mcutils:database:2024.2")
implementation("com.github.shynixn.mcutils:pathfinder:2024.3")
implementation("com.github.shynixn.mcutils:guice:2024.2")
Expand Down Expand Up @@ -135,6 +135,7 @@ tasks.register("pluginJarLatest", com.github.jengelman.gradle.plugins.shadow.tas
exclude("com/github/shynixn/petblocks/lib/com/github/shynixn/mcutils/packet/nms/v1_20_R1/**")
exclude("com/github/shynixn/petblocks/lib/com/github/shynixn/mcutils/packet/nms/v1_20_R2/**")
exclude("com/github/shynixn/petblocks/lib/com/github/shynixn/mcutils/packet/nms/v1_20_R3/**")
exclude("com/github/shynixn/petblocks/lib/com/github/shynixn/mcutils/packet/nms/v1_20_R4/**")
exclude("com/github/shynixn/mcutils/**")
exclude("com/github/shynixn/shygui/**")
exclude("com/github/shynixn/mccoroutine/**")
Expand Down
18 changes: 18 additions & 0 deletions docs/wiki/docs/placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,21 @@ The following placeholders are available in PetBlocks and can also be used via P
| %petblocks_eventPlayer_locationYaw% | Yaw rotation of the event trigger player. |
| %petblocks_eventPlayer_locationPitch% | Yaw rotation of the event trigger player. |
| %petblocks_eventPlayer_itemMainHand_type% | Name of the item type in the players's main hand |


| GUI PlaceHolders | Description |
|-------------------------------------------|------------------------------------------------------------|
| %petblocks_player_name% | Player name of the player clicking in the current inventory. |
| %petblocks_player_displayName% | Player displayName of the player session in the current inventory. |
| %petblocks_gui_name% | Name of the current inventory. |
| %petblocks_gui_backName% | Name of the previous inventory (if you have multiple sub pages) |
| %petblocks_gui_param1% | A GUI can have up to 9 parameters. This placeholders access number 1. |
| %petblocks_gui_param2% | A GUI can have up to 9 parameters. This placeholders access number 2. |
| %petblocks_gui_param3% | A GUI can have up to 9 parameters. This placeholders access number 3. |
| %petblocks_gui_param4% | A GUI can have up to 9 parameters. This placeholders access number 4. |
| %petblocks_gui_param5% | A GUI can have up to 9 parameters. This placeholders access number 5. |
| %petblocks_gui_param6% | A GUI can have up to 9 parameters. This placeholders access number 6. |
| %petblocks_gui_param7% | A GUI can have up to 9 parameters. This placeholders access number 7. |
| %petblocks_gui_param8% | A GUI can have up to 9 parameters. This placeholders access number 8. |
| %petblocks_gui_param9% | A GUI can have up to 9 parameters. This placeholders access number 9. |

Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ class PetBlocksPlugin : JavaPlugin() {
Version.VERSION_1_20_R2,
Version.VERSION_1_20_R3,
Version.VERSION_1_20_R4,
Version.VERSION_1_21_R1,
)
} else {
listOf(Version.VERSION_1_20_R4)
listOf(Version.VERSION_1_21_R1)
}

if (!Version.serverVersion.isCompatible(*versions.toTypedArray())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PetListener @Inject constructor(
val pets = petService.getPetsFromPlayer(player)

if (pets.isNotEmpty()) {
plugin.logger.log(Level.FINE,"Loaded [${pets.size}] pets for player ${player.name}.")
plugin.logger.log(Level.FINE, "Loaded [${pets.size}] pets for player ${player.name}.")
}

val petsToReceive = configurationService.findValue<List<Map<String, String>>>(petsToReceiveOnJoinKey)
Expand Down Expand Up @@ -108,11 +108,12 @@ class PetListener @Inject constructor(

if (packet is PacketInInteractEntity) {
plugin.launch {
val physicObject = physicObjectService.findPhysicObjectById(packet.entityId) as PetEntityImpl? ?: return@launch
val physicObject =
physicObjectService.findPhysicObjectById(packet.entityId) as PetEntityImpl? ?: return@launch

if (packet.actionType == InteractionType.LEFT_CLICK) {
if (packet.actionType == InteractionType.ATTACK) {
physicObject.leftClick(event.player)
} else if (packet.actionType == InteractionType.OTHER) {
} else {
physicObject.rightClick(event.player)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/gui/petblocks_main_menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ items:
- type: "PER_PLAYER"
command: "/petblocksgui close"
- type: "SERVER_PER_PLAYER"
command: '/tellraw Shynixn {"text":"","extra":[{"text":"[&9PetBlocks&f] &e<<Click me>> &fto rename your pet.","clickEvent":{"action":"suggest_command","value":"/petblocks rename %petblocks_pet_name_selected% "}}]}'
command: '/tellraw %petblocks_player_name% {"text":"","extra":[{"text":"[&9PetBlocks&f] &e<<Click me>> &fto rename your pet.","clickEvent":{"action":"suggest_command","value":"/petblocks rename %petblocks_pet_name_selected% "}}]}'
- row: 2
col: 2
item:
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/gui/petblocks_skins_plushieskins_menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ items:
displayName: "&eSteve Plushie 1"
commands:
- type: "SERVER_PER_PLAYER"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzgzNWRhMjY4NWY3YWQzZjE5MTlhMDE4OTc2YWQ1NjgyNjY5MWUyNjc1OGEzYTU1YTE5MThmN2YxN2FkOTM4In19fQ= %petblocks_owner_name%"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzgzNWRhMjY4NWY3YWQzZjE5MTlhMDE4OTc2YWQ1NjgyNjY5MWUyNjc1OGEzYTU1YTE5MThmN2YxN2FkOTM4In19fQ== %petblocks_owner_name%"
- row: 2
col: 2
item:
Expand All @@ -66,7 +66,7 @@ items:
displayName: "&eAlex Plushie 1"
commands:
- type: "SERVER_PER_PLAYER"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzFjZDI3NjJhY2I0YjQyNzhjZjExMTc2YTVmODc3OTlmOTNhMWQ5MTE2Y2IzY2I1N2VlNGQxZTYwMTM0NTg4In19fQ= %petblocks_owner_name%"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzFjZDI3NjJhY2I0YjQyNzhjZjExMTc2YTVmODc3OTlmOTNhMWQ5MTE2Y2IzY2I1N2VlNGQxZTYwMTM0NTg4In19fQ== %petblocks_owner_name%"
- row: 2
col: 3
item:
Expand Down Expand Up @@ -96,7 +96,7 @@ items:
displayName: "&5Baby Doll (purple)"
commands:
- type: "SERVER_PER_PLAYER"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJhYjYyNmRiYjc2NTg0NTk3YjU5MDZlZTY5OWVhOTNlNTFkMTc0ZWM2YTIxZWQ5ZjRjMTlmNWU3ZWJmOTM2In19fQ= %petblocks_owner_name%"
command: "/petblocks skinbase64 %petblocks_pet_name_selected% eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTJhYjYyNmRiYjc2NTg0NTk3YjU5MDZlZTY5OWVhOTNlNTFkMTc0ZWM2YTIxZWQ5ZjRjMTlmNWU3ZWJmOTM2In19fQ== %petblocks_owner_name%"
- row: 2
col: 6
item:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin-legacy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PetBlocks
version: 9.8.0
version: 9.9.0
author: Shynixn
main: com.github.shynixn.petblocks.PetBlocksPlugin
softdepend: [ PlaceholderAPI, HeadDatabase]
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PetBlocks
version: 9.8.0
version: 9.9.0
author: Shynixn
main: com.github.shynixn.petblocks.PetBlocksPlugin
softdepend: [ PlaceholderAPI, HeadDatabase]
Expand Down

0 comments on commit d59f242

Please sign in to comment.