Lowered the Pinata's internal entity max health to 1024 from 2048.
Vanilla's default max health is 1024 and Spigot can change this limit and it usually gets defaulted to 2048 but for whatever reason it wasn't in some server environments (Sometime in the 1.21.4 update, it defaulted to lower or the higher 2048 just didn't work), if the Pinata attempts to set its health to 2048 and it's lower in the Spigot config then it'll silently error (Still have no idea why) and not process anymore code thus making the Pinata naked. If you're still having issues, please check that your max health limit is at least 1024, this is not a PinataParty bug directly but was hard to track down due to it silently erroring and it being such an odd thing since you'd think Spigot would at least round it down to the max limit if it was higher instead of just giving up completely. I deeply apologize for not taking a deeper look sooner and thought it was isolated to a few instances but I was wrong.
This update is marked as a
BETA due to the nature of the reward system being changed and may not work the exact same as previously, however it should not be any noticeable changes.
This update also allows for more reward customization such as not giving a player anymore rewards if one is rolled or only giving a player one single reward from the chance list, for example:
If the player gets the diamond, they will not have a chance to get anything else:
Code (YAML):
# ... the pinata is hit by a player. hit:
'1':
chance: 10.0
stop: true
# If the player gets this reward then it won't roll for anymore command: - 'minecraft:give
%player% minecraft:diamond 1' '2':
chance: 50.0
command: - 'minecraft:give
%player% minecraft:leather 1' '3':
chance: 25.0
command: - 'minecraft:give
%player% minecraft:iron_ingot 1'
The player will only get one single reward from this list or maybe nothing at all.
Code (YAML):
# ... the pinata is hit by a player. hit:
'1':
chance: 20.0
stop: true
command: - 'minecraft:give
%player% minecraft:diamond 1' '2':
chance: 12.5
stop: true
command: - 'minecraft:give
%player% minecraft:gold_ingot 1' '3':
chance: 5.0
stop: true
command: - 'minecraft:give
%player% minecraft:iron_ingot 1'
Removed Pinata#whenExploding since it's been deprecated for a long time now.
Added a whitelist for advanced pathfinding. (Sadly, this may break current advanced pathfinding setups. To restore old behaviour add the new whitelist and empty it)
Improved the pinata spawn error message.
Increased the max location finding attempts to 25 from 20.
Fixed the advanced pathfinding attempting to find locations when on incompatible environments when still enabled.
Improved the advanced pathfinding, it will now stop all vanilla pathfinding so the pinata will only move when made with the advanced pathfinding.
Fixed the PinataHitEvent firing even when the hit was going to be cancelled from cooldowns and the event now fires for each hit damage, not just one and now no longer fires for 0 damage events.
Fixed the last hit time getting set and hit sound playing even if the hit was going to do 0 damage.
Improved some config comments on the hit permission.
Fixed an issue with negative votes, especially around offline voting and added a recovery for any servers with negative votes needed, it will be automatically fixed after another vote has been registered.
Developers: Changed Pinata#whenExploding to Pinata#triggerDeath, Pinata#whenExploding is still there but will just call Pinata#triggerDeath and is Deprecated and will be removed in the future.
Added commands to execute for the player that got the last hit on the Pinata.
Fixed a bunch of internal and config settings using the incorrect primitives. This caused a few issues such as some abilities only having 1/2/3 seconds as their length instead of 1.32/2.51/3.87 seconds for example.
Updated the config to add a .0 to values that support decimal points to show that they can.
Changed the countdown length to ticks from seconds.
Added a count interval config setting to config when the player the sound for the countdown boss bar.
Fixed the ability type in the ability API event not being final.
Fixed some API events not having cancelled boolean field false by default.
Cleaned up a bunch of API event names and formatting.
Developers: Removed VoteReceivedEvent(String) and VoteReceivedEvent#getUsername as they have been deprecated for a long time now. Use VoteReceivedEvent(Vote) and VoteReceivedEvent#getVote -> Vote#getUsername respectively.
Moved to a static VersionHelper to handle version detections.
The plugin is now built against 1.18.2 (No difference and an update wasn't needed).
bStats is now shaded into the plugin instead of being manually copy-pasted in.
Fixed a bunch of cases where the sound was played in the world instead of directly to the player causing some sounds like the countdown start, mid tick and end sounds playing multiple times if near other players.
The plugin will now return a different placeholder text for the two formatted last and next vote time placeholders when the player has never voted previously. This would result in "0" being formatted into a date which would be the date for the start of UNIX time which is not very nice looking so instead we return a nice "You haven't voted before" text. Thanks to @thiagogebrim for pointing this out.
!!! MAKE SURE TO UPDATE YOUR CONFIG WHEN UPDATING !!!
Updated Metrics/bStats.
Added some more default commands in player-votes to show you can add more than a single command.
Added Cumulative voting! You can add a total or repeat rewards. Total being you vote X times for a reward and repeat means you get a reward every X times you vote.
Changed how increasing player votes is handled, it will now only run an async task when the voting player is offline instead of always running for both online and offline voting players. This allows the cumulative rewards feature to get the accurate total vote count when voting.
Removed the "increase-player-vote" config setting due to the new cumulative feature always needs it to be counted and I doubt anyone even disabled this and offline vote counts are now increased on player login instead of the time when they vote.
Added two new placeholders %pinataparty_votes_queued% to get the amount of votes that are currently queued for a player and %pinataparty_votes_total_and_queued% to get both total and queued votes to retain previous behaviour of what %pinataparty_votes_total% used to return when offline votes were counted at the time of voting instead of the new behaviour of counting only on login.
The Pinata's baby transform ability will now use the cached random calculator instead of making a new one each time.
Changed how the player cooldown is handled, now instead of storing the player and removing them after X ticks resulting in a task creation each time a player hits the pinata, it'll now just store the player's last hit time and compare it against the current system time to see if their hit is on cooldown.
Moved the PinataSpawnEvent to fire after the Pinata has been initialized and added into the world, canceling will remove the pinata and its extra features
Added a countdown boss bar for when the Pinata will spawn into the world, has sounds for the start, middle and end. You can change the title, bar color, sounds and length.
Changed the top header of the config.
Improved the config calls by just using a single one when the Pinata get initialized.
API Note: If you are using Pinata#getBossBar in your plugins, change it to Pinata#GetHealthBossBar instead, the old method is deprecated and will be removed soon.
Added a player argument to the /pinataparty summon command so now you can do /pinataparty summon (player) and it'll spawn at that player.
Added a message if you try and do /pinataparty summon as the console instead of just not saying anything, however adding the player argument works as normal from the console.
The plugin will now only hook into its dependencies if that plugin is loaded and enabled, fixes the plugin not starting up when a soft-depend had issues starting up itself.
The plugin is now compiled against GlowAPI 1.4.15-SNAPSHOT and PacketListenerAPI 3.9.1-SNAPSHOT
Exposed the Vote object directly in the VoteReceivedEvent instead of just a username. Deprecates the old event constructer and the getUsername() method as getVote().getUsername() should be used instead, these will still work but may be removed in any future update.
Updated NuVotifier version to 2.7.2 from 2.6.0 to build against.
Updated Crackshot to 0.98.11 to build against and improved its lib location.
The plugin now caches almost every single config option used by the Pinata when the Pinata instance is made. Before it would ask the config multiple times every tick for all the Pinata's features.
Some default config changes to make it more clear to users. (You don't need to change anything if you're updating, below is just a link for consistency and info)
Added a new restriction feature that makes it so only players that have voted at least once in x time (Set in config) can hit the Pinata, this means all the players that don't vote yet go to the PinataParty every time can't hit it/get rewards.
Fixed an issue with the Pinata being removed when a player was far away (I messed up a previous update, sorry).
Added a "ticket" to the chunk that the Pinata spawns in, the ticket stops the chunk from being unloaded, this helps when the Pinata spawns but no one is around it shouldn't despawn anymore.
Changed two bukkit runnables into normal run tasks into the scheduler in the vote event. Reduces file size and is better since we don't need to have variables inside the runnable.
Overhaul of command and event registering. This fixes the whole /vote command being registered even if it's disabled due to the plugin still taking the command but not using it.
Fixed the votes needed going into negative numbers, this happens when you have an invalid spawn location for the pinata, please update to this if you have that bug, it will get fixed after a vote if its negative before upgrading to this version.
Added Hexcolor support for each message! Add <HEX> to messages to use them, for example "<#eb0578>Hello" will turn out to be a hot pink "Hello" (1.16+).
Added a "smooth-rainbow" setting to the Pinata section of the config to make the <rainbow> in the Pinata's name be smooth and use Hex colors, instead of flashing between them. (1.16+).
Moved the Pinata's name into the actual language part.
Changed the "no-perm" path to "no-permission".
Changed the "llama" path to "pinata".
Changed the "message" path to "language".
Changed the &rdm to <rainbow>.
Added a better checking of the Llama color from config.
Changed how local placeholders are getting replaced to be cleaner.
Changed some comments and default values in the config.
Improved how the Hologram and the Pinata's name is updated.
Won't attempt the web connection if the update notification is disabled in config.yml - previously it would always check for an update even if it was disabled, it just wouldn't tell you.
Fixed very high tick times from offline voting, the connection between your server and Mojang to get the information on the player voting can sometimes take a while and will block the main thread, making very bad lag spikes.
I
HIGHLY recommend upgrading to this version if you use offline voting.
Improved the carpet selection to not always use legacy carpet which will cause Spigot to load the legacy API and freeze the server for a few seconds if not already loaded at the server start or by another plugin.
Fixed config setting using the glowing not carpet boolean.
I highly recommend updating if you use PP for registering votes or have been having issues with the hologram/Pinata turning into a normal llama New Features:
Added the last time the player voted in data.yml
Added 5 new placeholders, a bunch of last and next vote times in Unix, formatted and a new countdown placeholder that will show a 24 hour countdown until the player can vote again!
Added a vote sound and particle effect to the player that voted when they vote
Added some more config comments and defaults
Added a whole placeholders section into the config so you can change them if you so wish
Fixes:
Fixed testvote command not using the correct hour of day formatted
Fixed a weird issue with console: true needing to be used before other commands with %player% work
Fixed the long-standing issue where the pinata would bug out and turn into a vanilla Llama with a stuck particle effect and hologram, Massive thanks to @Raigna for the providing the information needed
Fixed an exploit to vote more than once with similar usernames
Other:
Updated Metrics and changed internal package/class names and cleaned up some static abuse
Added PinataHitEvent - Called when a player hits the pinata and ISN'T cancelled by the hit cooldown in PP (the event is cancellable) and BEFORE they are added into the reward list
Due to the nature of this update and thus being 2.0.0, All API hooks will be broken!
Added a new damage system with permissions, e.g when a player has permission "pinataparty.hitamount.6" they will deal 6 damage and have 6x the number of rolls per hit, to not use this just simply don't give anyone the permissions
Fixed a bug when it wouldn't check if the pinata is dead due to the teleport ability returning null and returning the code block
Added a double-check so the Pinata can only be damaged by players, previously fireworks and other mobs could not DEAL damage but could set off abilities
Removed the messages for the data.yml save task apart from on plugin disable
Moved the 2 event calls for Pinata Die/Spawn events to not do useless code blocks before checking if the event was cancelled in the first place
Reloading the plugin will now remove all active Pinatas due to issues
Added a warning to the reload command to say not all settings will be fully reloaded
Added a config setting to add a chest to the Llama (Default: False)
Added an Anti-Stuck system! The Pinata will now teleport/respawn back to its summoned location when it falls into the void or doesn't get hit by a player for 30 seconds.
Completely re-made the thread design
Config changes are now hosted on Gist/GitHub for easier updating
Set the damage on the Pinata hit to 0 in case you have insane swords that do 100's of damage
Fixed send vote command not having a response to tell you it worked
Moved native build to 1.15.1 from 1.13.2 (Doesn't change anything)
Added some ignoreCancelled to events so they don't fire all the time if cancelled, e.g when a player joins but they get kicked.
Added a save task for the data.yml (enabled/disabled in the config with time)
Added comment about restarting not reloading
Added an offline voting queue system (If a player votes offline, they are added into the data.yml and then when they log in it'll send the commands
Config changes:
Add:
Code (YAML):
# Should we save the data.yml every so often to ensure no data loss on any crashses save-task: true
# Time in seconds (Default 900 / 15 mins) save-timer: 900
Under update-notify
Change
do-commands to
queue-commands in the offline voting section
- Added new config settings about offline voting to enable/disable fully or certain settings when the player from the vote is offline. Requested by
@mrfloris
Add this to your config or regen:
Code (YAML):
# Change how offline voting works here. offline-voting:
# Enable offline voting? enabled: true
# If offline voting is enabled what should we do with offline votes? # Should we still send the player-vote commands? do-commands: false
# Should we increase the certain counters? increase-pinata-vote: true
increase-player-vote: true
- Fixed test vote command always doing the test for the sender, not the target player
- Fixed NPE with getVotes method using placeholders (Was a problem with plugins like
TAB)
Fixed the Pinata not running around when hit when not using the advanced pathfinding.
Cleaned up and added a little more details to the main plugin page
Without using advanced pathfinding: The Pinata will only move when hit for 2~ seconds
With using advanced pathfinding: The Pinata will ALWAYS move even when not being hit and you can change how often it will run around, how fast to get to the location and range etc.
I recommend using Advanced pathfinding if you're on 1.13+ and using PaperMC but the plugin works fine without it to the best I can with the Spigot API
Added Advanced Pathfinding! (It's actually not that advanced) BUT! It'll now make the Pinata actually MOVE all the time instead of just sitting there 90% of the time getting slapped to death. You NEEDPaperMC to use this feature since the API used is not in Spigot at least right now. This fixes ALL issues with the Pinata not moving! Obviously you can enable/disable this and change all the settings!
The pathfinding API isn't in version 1.12.2 of PaperMC so I just included the 1.7.0 version inside the .zip!
The plugin is now having a 20% off sale since I've patched up the plugin a reasonable amount.
Config changes if upgrading:
Code (YAML):
# Should the Pinata use a better pathfinding method # where it will actively move around instead of just # standing there and moving once in a while like a # vanilla llama (Not possible in Spigot) # # !!! ONLY SET THIS TO TRUE IF YOU USE PAPERMC !!! advanced-pathfinding:
# Enabled or not # Speed amplifier will not do anything if this is enabled due to the new speed below enabled: false
# Time in ticks to get a new path/location to move to interval: 20
# How fast to move to the new said location (1 is vanilla moving Llama speed) # I would mess around with this setting with a few different values to get what # you like, one little value can REALLY change the speed speed: 1.325
# Max range it'll try to find a pathfind location to move to range: 14
# Max Y difference it'll do to find a location to move to max-y: 4
You can now Multiply the health of the Pinata for every player online! Requested by @Derpulli
Add this to your config under the Pinata's health or regen it!
Code (YAML):
# If true it will get the above health and add itself for each player online # e.g if there is 4 players online and the above is 20 it'll do 20 + (20 x 4) = 100 total health! multiply-health-per-player-online: false
Fixed the tab completion permission to be pinataparty.admin not cursedpinata.op (Old plugin name)
Added more messages for hooks on startup, e.g telling you that you don't have vault installed so the pinata pool system won't be enabled with install links
Added Vault and PlaceholderAPI to be a soft-depend (Note, you do not need any other plugin to run PinataParty but features will be disabled) If you receive errors from not having a depend on don't just install it tell me, please.
Added a new command, /pp testvote <player> which will force send a "real" but fake vote to the player for debugging/testing or if you want to give a player a vote if a website bugged etc. Won't work without Votifier
Added new start and disable messages including the time taken in ms to enable/disable
Firstly I want to say hello to everyone that has purchased PP, I'm a friend of Indyuce and the man behind the whole plugin idea. Indyuce has given me the developer role of the plugin due to him basically leaving for school, I don't have much planned for this plugin other than just keeping it updated for the latest versions of Minecraft (1.13+) that being said I have removed 1.12 support due to the big difference in API between the two versions. If you have features you would like, feel free to suggest them!
Removed 1.12 support, if you wish to use 1.12.x use version 1.3.2
The plugin is now natively built on 1.13 with 1.14+ support
Converted the whole "backend" of the plugin into a maven format
Pinata now has 100% knockback resistance
Pinata now spawns with 2048 Vanilla health (Stops unusual high damage items killing the Pinata the vanilla way)
Added more colors to the Pinata's name to cycle through
Added a new hit cooldown config! some side effect of new Minecraft versions is that the llama could be hit 10s of times a second with auto clickers so I added a config setting for this due to many players were confused as why their hit isn't registering when they ARE actually hitting them and also stop the exploit with auto clickers, if you reduce the hit cooldown it'll make the pinata easier/faster to bring down due to the number of hits per second being allowed is more, if you set it to 6.2 for example, people won't be able to hit the pinata for 6.2 seconds and this is global for everyone UNLESS you toggle the per player mode which makes it 6.2 seconds individually for each player.
I've had a few players talking about the Pinata not moving or being scared when you hit them, I am looking into it in the near future but I don't think its a thing that can be changed honestly due to Mojang changing how Llamas work in vanilla to not run anymore (Not 100% sure)
Config changes (Add this inside of the llama section) or re-gen your config.yml
Code (YAML):
# Cooldown of when the pinata can be hit again in seconds # If you want the cooldown to be PER player and not global # then set the below setting to true hit-cooldown: 0.5
hit-cooldown-per-player: true
/pp spawn <location> now supports multiple locations, use this: /pp spawn <loc-name1>/<loc-name2>/...
By separating the location names with a / the plugin will choose a random location among the ones you specified and will spawn the pinata there (if there is no issue with the coords setup).
Added an option to add multiple spawn locations for the auto-summon feature.
You need to add this to your current config.yml (the string option is now a list):
Code (Text):
# When enabled, the pinata will summon every X votes.
# Supports Votifier. Set votes-needed to 0 to disable.
auto-summon:
votes-needed: 20
spawn-locations:
- spawn
GlowAPI + PacketListenerAPI are now soft dependencies. The pinatas will now glow but in white instead of the rainbow effect if these plugins are not installed.