#Fixed: ClassCastException when calculating PhantomStats for MC 1.20.2.
By switching back to the Bukkit Consumer I reintroduced the ClassCastException. However, now everything should be working as expected while remaining backwards compatibility. Sorry for any inconveniences.
Best regards
Alex_qp
PS: Thanks again to
@paulravensky for reporting the bug.
#Fixed: ClassCastException when calculating PhantomStats for MC 1.20.2.
By switching back to the Bukkit Consumer I reintroduced the ClassCastException. However, now everything should be working as expected while remaining backwards compatibility. Sorry for any inconveniences.
Best regards
Alex_qp
PS: Thanks again to
@paulravensky for reporting the bug.
#Added: official support for MC version 1.20.2 and below.
#Changed: warning message about the lack of a valid implementation to make it more clear that the plugin is trying to use the last valid/updated implementation in this case.
I want to stress out the fact that in many cases the plugin does not need to be updated specifically in order to work properly on future versions - especially if the API did not change drastically (which is usually the case).
#Added: the plugin will now inform you if the latest implementation is used and if so, for what version it was last tested.
#Changed: the warning messages about the lack of a valid implementation was more or less replaced by the above info message.
The plugin already tried to use the default implementation if no valid implementation was found. Therefore I think these changes give some clarity over what is actually happening. In addition future versions will now not be "unvalid" so to speak but rather untested (hence the new info message informing you of the last tested version) because the later versions will very likely work except for new attributes or block types.
#Changed: warning message about the lack of a valid implementation to make it more clear that the plugin is trying to use the last valid/updated implementation in this case.
#Added: update checker by
mfnalex along with some config options.
#Added: permission phantomspawncontrol.updatechecker to get notified on login of a new version if existent.
#Changed: updated commons code to v1.10.1.
#Fixed: playerdata_prevent_targeting was not working properly.
IMPORTANT: This update requires editing of the current config. Please add the following to the bottom of the file:
IMPORTANT: This update requires editing of the current config. Please add the following within the phantom_spawn.spawn_conditions.world section:
Code (YAML):
# No phantom will spawn during disabled moon phases. Please add the corresponding integer of the moon phase (i.e. 1 to disable full moon). For a list of all moon phases visit the minecraft wiki: https://minecraft.fandom.com/wiki/Moon disabled_moon_phases: # - 1 # - ...
You can always compare your config with the default one available on the plugin's main page or the GitHub wiki.
#Added: command /psc playerstats to view a player's playerstats (i. e. toggle option status).
#Added: permission phantomspawncontrol.cmd.playerstats (default: op).
#Added: permission phantomspawncontrol.cmd.toggle.other (default: op) to toggle another player's phantom spawning.
#Added: %player% placeholder for messages.toggle.enable and messages.toggle.disable
#Added: option messages.cmd.prefix to configure the plugin's command prefix.
#Changed: toggle command now has an optional parameter for the player for which phantom spawning should be toggled.
#Changed: default values for messages.toggle.enable and messages.toggle.disable.
IMPORTANT: This update needs an addition to the current config. Please compare the message section at the very bottom with the following and edit it accordingly.
Code (YAML):
# Configure nearly all messages. toggle.enable and toggle.disable support the placeholder %player% for the player name. messages:
cmd: # This is the prefix of all command message outputs. An empty string will result in the default prefix. prefix: "" credits: "Use /psc help for all available commands." noPerm: "&4You do not have permission." wrongCmdUsagePrefix: "&CUsage:" noPlayerMsg: "&CThere is no such player." toggle:
help: "toggles phantom spawning" enable: "&2Phantom spawning was activated for %player%." disable: "&4Phantom spawning was deactivated for %player%." playerstats:
help: "shows the playerstats of a specific player"
I would highly appreciate some more/new ratings. Thanks in advance!
#Fixed: spawn cancelling for players in enabled worlds stopped spawning completely until reconnect.
Please note that MC 1.16.5 has little to zero impact on plugins working on MC 1.16.4. That is why this and all of my other plugins are just fine with running on MC 1.16.5.
Best regards
Alex_qp
PS:
@baconsmoothie thank you for providing your debug logs.
#Added: permission phantomspawncontrol.defaultplayerstats to stop loading of player data.
Currently this only effects the toggle command. So if a player has this permission the toggle command will not prevent phantom spawning after login but before the player performed the command.
#Added: config option to enable target blocking by any phantom with the toggle command.
IMPORTANT: This update needs an addition to the current config. Please add the following below save_playerdata (you can always compare the config with the one on the plugin's main page):
Code (YAML):
# Set to true if no phantom should be able to target a player who deactivated phantom spawning by command. playerdata_prevent_targeting: false
Unfortunately I could not test this update but since it is this small I decided to publish it anyway. In case you want to test it: I added very clear debug messages within the debug mode.
#Added: WorldGuard support to check for mob spawn flag.
#Changed: improved spawn algorithm performance even more.
#Fixed: block check was not skipped if noSolidAbove == false and no added blocks.
IMPORTANT: This update needs an addition to the current config. Please add the following to the spawning_conditions section (you can always compare the config with the one on the plugin's main page):
Code (YAML):
# Options regarding worldguard (WorldGuard must be installed). worldguard: # Should phantoms only spawn in regions that allow mob-spawn? check_flags: false
Please note that I did not test the behavior of worldguard at all due to lack of time (it will definitely not mess with your regions). Therefore I ask you to test this one out by yourself (or wait if I may post a fix later next week) and give me feedback (look out for worldguard debug messages with enabled debug mode). If you do not enable WorldGuard features, nothing changes.
Best regards
Alex_qp
PS:
@Shilofax there you go!
PPS: I decided to lower the plugin price back to 10 EUR due to a recent discussion.
#Added: help command for every (sub-)command. Just type "help" as first parameter of the sub-command.
#Added: option "name" to giantPhantom's set command to configure a giant_phantom's name. Use value "reset" to reset the name. Bukkit color codes aka. "&2" etc. are supported!
#Added: ability to configure custom lootTables. Configurations will be saved in giantPhantomLootTables.yml.
#Added: ability to inherit a lootTable's loot from a child. Parents will also add their children's loot when populated.
#Added: option/sub-command "lootTable" to giantPhantom's set command to add/remove a registered lootTable to a giantPhantom.
#Added: ability to apply custom weights (integers) to a giantPhantom's lootTables in order to make some more likely to drop. For example a lootTable with weight 5 is 5 times likelier to drop than a lootTable with weight 1. Please note that the weight parameter is set for each giantPhantom individually.
#Added: command /psc giantPhantoms set <score> loottable add/remove <name> [<weight>] to add/remove a lootTable to a giantPhantom. The weight is an optional integer which can be set in order to make the lootTable more likely to drop.
#Added: command /psc lootTables list to list all registered lootTables.
#Added: command /psc lootTables add <name> to register a lootTable.
#Added: command /psc lootTables remove <name> to unregister a lootTable.
#Added: command /psc lootTables edit <name> loot to edit a lootTables direct loot. This may not be the populated loot!
#Added: command /psc lootTables edit <name> children add/remove <child> to add/remove a child to the given lootTable.
#Added: command /psc lootTables populate to open an inventory with the loot this lootTable will populate.
#Changed: updated EssentialsX dependency to v2.17.2
#Changed: updated commons code to v1.8.0. This massively improves the commands, in particular:
#Changed: the credits (aka. my name) is now clickable and will open my profile page on spigot.
#Changed: sent messages make now use of the BaseComponent API which allows click events (like above) or hover events.
#Changed: commands are now easier to maintain.
#Changed: every (sub-)command will now generate its own help command.
#Changed: every (sub-)command will now generate its own usage message.
#Changed: made changing of data via commands async.
#Changed: did some heavy code cleanup to improve maintainability.
#Changed: improved performance of phantomStats slightly.
#Changed: reworked debug mode to be more precise.
#Changed: the color of the reload command from green to dark_green.
#Changed: relocated config option messages.cmd.help.toggle to messages.cmd.toggle.help
#Changed: renamed all previous commands to configure giantPhantoms, in particular:
#Changed: renamed /psc list to /psc giantPhantoms list
#Changed: renamed /psc add to /psc giantPhantoms add
#Changed: renamed /psc remove to /psc giantPhantoms remove
#Changed: renamed /psc summon to /psc giantPhantoms summon
#Changed: renamed /psc set to /psc giantPhantoms set
#Changed: the old giantPhantom's set command was "replaced" with /psc giantPhantoms set <score> stats <option> <value>
#Changed: all previous permissions regarding the renamed commands, in particular:
#Changed: renamed permission phantomspawncontrol.cmd.list to phantomspawncontrol.cmd.giantphantoms.list
#Changed: renamed permission phantomspawncontrol.cmd.add to phantomspawncontrol.cmd.giantphantoms.add
#Changed: renamed permission phantomspawncontrol.cmd.remove to phantomspawncontrol.cmd.giantphantoms.remove
#Changed: renamed permission phantomspawncontrol.cmd.set to phantomspawncontrol.cmd.giantphantoms.set
#Changed: renamed permission phantomspawncontrol.cmd.summon to phantomspawncontrol.cmd.giantphantoms.summon
IMPORTANT: Be aware of the new needed parent permission phantomspawncontrol.cmd.giantphantoms!
#Fixed: PhantomStatsContainer was not thread safe.
#Fixed: possible complications regarding commons code with some of my other plugins.
#Fixed: api version in plugin.yml was still 1.13
#Removed: ability to configure sent messages for all commands which where categorized as operator commands, in particular:
IMPORTANT: This update needs editing of the existing config. Please remove everything named on the changelog as removed and add the following to the messages.toggle section (you can always compare the config with the one on the plugin's main page):
Code (YAML):
help: "toggles phantom spawning"
You might want to move it from the old location messages.help.toggle
As you can see a lot of work was done before publishing this update. Let me give you some closing words:
Because I had to rewrite all commands I decided to not support changing the messages of all commands which I categorized as operator commands. If you really feel like you need one of the removed options, feel free to contact me.
This update is quite a monster I will admit and I am very glad to finally be able to publish it. However such large updates come with various different bug possibilities. I think I tested everything but you never know so please report bugs as soon as possible in the discussion section.
After finishing coding I felt like doing a proper wiki on github before editing the whole plugin's main page on spigot. I hope you like it - feel free to make any suggestions!
PhantomSpawnControl Wiki on Github
Best regards
Alex_qp
PS: With this update I definitively think the plugin has reached another milestone in terms of quality and scope. Therefore the price will be upped to 12 euros.
#Added: summon command /psc summon <score> with permission phantomspawncontrol.cmd.summon (default op).
#Added: list command /psc list with permission phantomspawncontrol.cmd.list (default op).
#Added: permission phantomspawncontrol.cmd.* to grant access to all commands (default op).
#Added: permission phantomspawncontrol.* to grant access to all permissions (default none).
#Changed: updated commons code to v1.7.2. This fixes a bug regarding the color of console messages.
#Fixed: reload command was not active when giant_phantoms was deactivated.
#Changed: made calculations of spawn algorithm asynchronously.
#Changed: made calculations of phantom stats asynchronously.
#Fixed: if a player entered a deactivated world spawning stopped until relog.
#Fixed: random chance was still messed up a bit but it should now work as intended finally.
I am very happy to finally announce this update.
I managed to improve performance by more than 50% and also fixed bugs along the way. But please bare in mind that even though I did it in university theoretically this is the first time for me to actually do things asynchronously in a plugin.
However as always it should all work - but you never know. Please be advised to observe the plugin's behavior more than usual. But in case you are wondering: Bugs that may occur will not damage your server irreparably. I would never publish something like that without informing you.
#Fixed: setting phantom_spawn.player.blocks.no_solid_blocks_above to false caused the plugin to crash.
#Fixed: reload command caused spawning to stop for all online players.
#Fixed: setting phantom_spawn.player.score.min_score below 72000 (equals 3 vanilla day cycles) did not have any effect.
#Fixed: only the max health of a giant_phantom was modified which missed the actual purpose.
Also please note that while testing the movement speed of a phantom did not change noticeably so changing this attribute may have no effect on the calculations by the vanilla game. Unfortunately in this case there is nothing reasonable to do to change that. However the plugin sets the values correctly, they are just not interpreted by the vanilla game as intended.
Best regards,
Alex_qp
PS: Special thanks to
@REjoin for pointing some of the bugs out to me.
#Added: Reload command /psc reload with permission phantomspawncontrol.cmd.reload (default op)
#Changed: updated commons code to v1.7.1. This slightly improves performance of console messages and might change their appearance a bit.
#Changed: improved performance by making spawn attempts per player (before it was per world). This resolves the issue of computing too much data at once.
#Fixed: calculation of spawn chances for different giantPhantoms was seriously messed up. Now it should work as intended.
#Fixed: a warning message for missing player stats was shown unintentionally.
#Fixed: nighttime was not calculated correctly.
#Fixed: bed protection was always active for unavailable bed spawns.
#Fixed: phantom stats could not be applied because the internal speed attribute was invalid.
Please note that the last bug was critical.
Best regards
Alex_qp
PS: Special thanks to
@MidnightSugar for reporting some of them to me.
#Added: option to disable phantom spawning for players which are flagged afk by essentials.
#Added: option to disable phantom spawning for players which are vanished by essentials.
#Changed: updated commons code to v1.6.0+
#Changed: improved performance
IMPORTANT: This update needs an addition to the current config. So please add the following code within the "phantom_spawn.spawning_conditions.player"-section of the config file OR just move the file out of the plugin's folder in order to get recreated. You can always compare the config with the one on the plugin's main page.
Code (YAML):
# Options regarding essentials (Essentials aka. EssentialsX must be installed). essentials: # Should phantoms spawn for afk players? afk_protection: false
# Should a vanished player spawn phantoms? vanish_protection: false