
Companions | CREATE YOUR OWN 1.9.6
Companions allows you to create your own CUSTOM companions for your players - endless possibilities!
1.19.4 Spigot Support Added.
This version will drop 1.19.2 support, you will have to get the Companions V1.9.5 to use 1.19.2 Spigot.
This might be the last update - I'm no longer able to support this plugin as the code for Companions is very outdated and I have no time to refactor it. Hence, to continue support for Companions, I hope to team up with the community by open sourcing this project.
Do note that the code is very outdated, it's made years ago by me, and probably with many bad habits.
https://github.com/Aster0/Companions-Open-Sourced
In this update, it seems like the armorstands are no longer baby armorstands. You might need to reposition your Companions' placement if it's too high up. You can reposition them in the companions.yml file under
placement:
x: 0
y: 1
z: 0
Spigot 1.18.2 (use 1.9.2 for 1.18.1)
With this, I have dropped support for Spigot 1.17.1 - do note that only Companions v1.9.1 will have support to run Spigot 1.17.1.

Due to some oversight, the plugin only worked in 1.17. Thank you to Ashijin for spotting this mistake out.
Fixed now, there should be no errors in 1.17.1 and should work.
This might have dropped support for 1.17 though. I'm unsure because both 1.17.1 and 1.17 uses the same R1.

Updated to Spigot 1.17.
Sorry for the wait but an update to Spigot 1.17 has been released as **Companions v1.9**. This took longer than expected because Mojang obfuscated most of their codes, as such, I had to look into their **raw** code, and figure out what I needed again. Just for an example, the PlayerConnection variable from playerConnection has been named into just b. I know right?
So I hope you all are still grateful, although I'm really busy to look at some suggestions but I'm still here for the plugin and it'll be updated throughout the versions.

Updated to Spigot v1.16.5
Fixed a visual bugs for older versions such as Spigot v1.8.8 that if you drink a Strength II potion with a Companion that gives Strength, it's visualized as infinite duration.
Fixed a bug where if you drink a potion that has a higher level than what your Companion gives you, it replaces it and never comes back after the duration ends. (It takes 1 second to come back but it does come back)
Added a way to start your Companions' ability as level 2, 3, etc.
Example (Sets both INCREASE_DAMAGE & SPEED to level 2 by adding @2 in front of the ability.):
reaper:
# Sets the companion's unique name - THIS DOES NOT REFLECT IN THE GUI.
name: "&8&lREAPER"
nameVisible: true
sound: ENTITY_PARROT_IMITATE_ENDER_DRAGON
playerSkull: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTM5YjVkMmU2MjRjMTQ3ZWZlNDdiMTMwZTFjZGRiOGEzNzdjZGIzZTc3NDJiZDJjZjRkZGRmNjlhNjg5MjcyIn19fQ=="
# This uses custom model data and it overwrites the player skull if it's not set to "NONE". If you want to use it, "MATERIAL:DATA", e.g., "CLOCK:15" for clock material and nbt data value 15.
customModelData: NONE
# Set to NONE if you don't want a weapon.
weapon: STONE_HOE
# Set to NONE if you don't want an ability.
# 2@ in front of the ability means start at level 2. This will make it a strength and speed level 2 potion when bought.
ability: 2@INCREASE_DAMAGE; SPEED
animation: HEADSHAKE; GHOSTLY
chestplate: LEATHER_CHESTPLATE
leatherColor:
red: 32
green: 32
blue: 32
# Get POSE angles here : https://haselkern.com/Minecraft-ArmorStand/
rightArmPose:
angle1: 360
angle2: 270
angle3: 286
leftArmPose:
angle1: 0
angle2: 0
angle3: 0
headPose:
angle1: 0
angle2: 0
angle3: 0
bodyPose:
angle1: 37
angle2: 0
angle3: 0
placement:
x: 0
y: 1.7
z: 0
GUI:
shop:
type: COMPANION_SKULL
amount: 1
name: "&6&lREAPER"
price: 5000
description:
- " "
- "&7The Reaper that controls death,"
- "&7 transformed into a cute Companion."
- " "
- "&6ABILITIES -"
- "&e➩ INCREASED DAMAGE"
- ""
- "&6&lLEFT CLICK &7to purchase the &6REAPER Companion&7!"
- " "
- "&6PRICE: &e$%price%"

I swapped my entire work station to IntelliJ, please let me know if there're any issues with the current Companions build.
[+] Support for Spigot 1.16.4, some changes in NMS.
[/] Fixed Custom Model Data items not working for the Companions GUI. It should be working now for individual Companions' items.
[/] Fixed a bug where in the later Spigot versions, if you press Q, it triggers the LEAP ability. This is because, Spigot detects player interaction event with arm swings and arm swings for dropping were added in Minecraft in later versions.
[/] Fixed a bug when using MySQL where players' active Companions doesn't save when the server shuts down.

[+] Added a way to independently adjust each Companion's x, y & z.
To do this, add this yml field to each companion,
placement:
x: 0
y: 1.5
z: 0
Requested by @ch627050832.
[/] Fixed the renaming of Companion issue generated in v1.7.13.

[+] Added a way to independently adjust each Companion's x, y & z.
To do this, add this yml field to each companion,
placement:
x: 0
y: 1.5
z: 0
[+] Added a way to add custom model items in the shop GUI, you can do it now the same way you added on a Companion, e.g. CLOCK:4
Requested by @ch627050832.
[/] Fixed the renaming of Companion issue generated in v1.7.13.