Skip to content
Success

Changes

Summary

  1. Jobs Events Addition & Bridge Cleanup (#378) (commit: 87a0e19) (details)
Commit 87a0e1923c615d94455702497bae7149ca1fbb83 by noreply
Jobs Events Addition & Bridge Cleanup (#378)

* Jobs Events Addition & Bridge Cleanup

JobsJobTag.xp.level is now deprecated in favor of JobsJobTag.level
JobsJobTag.xp.max is now deprecated in favor of JobsJobTag.max_xp
JobsJobTag.name.short is now deprecated in favor of JobsJobTag.short_name
JobsJobTag.description is now deprecated in favor of JobsJobTag.full_description due to a deprecation in Jobs Reborn
Added new mechanism JobsJobTag.xp to match existing tag
New events:
- jobs player leaves <'job'>
- jobs player earns exp for <'job'> (action <'action'>)
- jobs player earns money for <'job'> (action <'action'>)
- jobs player levels up <'job'>
- jobs player joins <'job'>
<jobs> for retrieving all of the server jobs is now deprecated in favor of <jobs.server_jobs>
Job tags now use the tag registration system

* Couple missed fixes

Removed unused imports
Moved attribute fulfilling until confirmed that the next attribute would also be filled

* Fix JobsJobTag.name.short

* Resolve PR Comments

Fixed comment blocks in bridge
Fixed meta lines that didn't end in periods
Eliminated unneeded property
Changed "action" to be a switch in applicable events
Action switch supports advanced matching
Job names support advanced matching
Fixed some new line issues
Changed to switch/case blocks in context to replace multiple if statements
Moved mechanism declaration below tag declaration in tag class
Added link to Jobs ActionType enum
Removed couldMatch blocks in favor of generic checks
Added slow warnings for deprecated tags

* Fix remaining instances of ScriptEvent.ScriptPath

* More adjustments as per review comments

Remove <jobs.server_jobs> - <jobs> now returns a ListTag of the server's jobs
Add <jobs_job[<name>]> as the constructor for jobs
The identity format for jobs can now contain the player UUID instead of being a property
Remove the <JobsJobTag.player> mechanism in favor of <PlayerTag.job[<job>]> since it never really served a purpose anyway
The <PlayerTag.job[<job>]> tag now supports actual JobsJobTag elements instead of just the job names
Several other minor meta tweaks for consistency

* Extended tweaks as per review, plus changes to reflect core updates

Revert change that removed existing <jobs[<job>]> constructor, but fixed and readded deprecation notice
All job events now use switch blocks for context matching
Updated events and properties to reflect recent core changes
(commit: 87a0e19)
The file was addedsrc/main/java/com/denizenscript/depenizen/bukkit/events/jobs/JobsJobsJoinScriptEvent.java
The file was modifiedsrc/main/java/com/denizenscript/depenizen/bukkit/properties/jobs/JobsPlayerProperties.java (diff)
The file was modifiedsrc/main/java/com/denizenscript/depenizen/bukkit/bridges/JobsBridge.java (diff)
The file was addedsrc/main/java/com/denizenscript/depenizen/bukkit/events/jobs/JobsJobsLevelUpScriptEvent.java
The file was addedsrc/main/java/com/denizenscript/depenizen/bukkit/events/jobs/JobsJobsLeaveScriptEvent.java
The file was removedsrc/main/java/com/denizenscript/depenizen/bukkit/properties/jobs/JobPlayer.java
The file was addedsrc/main/java/com/denizenscript/depenizen/bukkit/events/jobs/JobsJobsPaymentScriptEvent.java
The file was modifiedsrc/main/java/com/denizenscript/depenizen/bukkit/objects/jobs/JobsJobTag.java (diff)
The file was addedsrc/main/java/com/denizenscript/depenizen/bukkit/events/jobs/JobsJobsExpGainScriptEvent.java