Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: dispatch CLV reward commands safely #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
fix: dispatch CLV reward commands safely #33
Changes from all commits
9ec636278f8c221b5831fbd105b952d90a0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
CyberLevels
A leveling system plugin for Spigot and Paper
(Folia-supported)with Folia support. Store player levels and experience, rewardplayers for activities like breaking blocksactivity across your server, sync progress through SQL storage,fishing,andmore.Sshowprogress viaprogression through chat, action bar, PlaceholderAPI, leaderboards, and more.🧩 Supported versions
✨ Features
levels.yml.max-positionsinconfig.yml).earn-exp.yml(break blocks, PvP, fishing, etc.), including block state keys for crops (e.g. fully grown wheat).levels.yml./clv toprankings with PlaceholderAPI leaderboard slots.config.yml,lang.yml, andearn-exp.ymlkeys can be merged from defaults on update.Soft-dependencies:Soft-dependencies declared by the plugin: PlaceholderAPI, Vault, CyberWorldReset, RivalHarvesterHoes, RivalPickaxes(hooks load when present), AxBoosters, AxHoes, AxPickaxes.📦 Installation
server’sserver'spluginsfolder.config.yml,lang.yml,levels.yml,earn-exp.yml, etc.config.yml,lang.yml,levels.yml,earn-exp.yml,rewards.yml, andanti-abuse.yml./clv reloadrequireswith admin permission.For database setup, follow the mysql (or other SQL) section in
config.ymland the wiki.Commands
For database setup, use the
config.mysqlsection inconfig.yml. Setenabled: falsefor flat-file storage, or keep it enabled and choose one ofMYSQL,MARIADB,SQLITE,POSTGRES,POSTGRESQL, orH2.Full documentation: CyberLevels Wiki
🕹️ Commands
Main command:
/clv(aliases:cyberlevels,cyberlevel,cyberlvl,levels,level,lvl,lvls)./clv about/clv help/clv reload/clv top/clv info [player]/clv addExp <amount> [player]/clv setExp <amount> [player]/clv removeExp <amount> [player]/clv addLevel <amount> [player]/clv setLevel <amount> [player]/clv removeLevel <amount> [player]/clv/clv about/clv help/clv reload/clv top/clv info [player]/clv addExp <amount> [player]/clv setExp <amount> [player]/clv removeExp <amount> [player]/clv addLevel <amount> [player]/clv setLevel <amount> [player]/clv removeLevel <amount> [player]/clv purge <player>🔐 Permissions
Players
CyberLevels.player.*CyberLevels.player.helpCyberLevels.player.infoCyberLevels.player.aboutCyberLevels.player.multiplier.<name>CyberLevels.player.*CyberLevels.player.helpCyberLevels.player.infoCyberLevels.player.aboutCyberLevels.player.topCyberLevels.player.multiplier.<amount>CyberLevels.player.multiplier.2cyberlevels.suppress.levelup.playercyberlevels.suppress.levelup.globalcyberlevels.suppress.levelup.*Admins
CyberLevels.admin.*CyberLevels.admin.helpCyberLevels.admin.infoCyberLevels.admin.reload/clv reloadCyberLevels.admin.exp.*CyberLevels.admin.exp.addCyberLevels.admin.exp.setCyberLevels.admin.exp.removeCyberLevels.admin.levels.*CyberLevels.admin.levels.addCyberLevels.admin.levels.setCyberLevels.admin.levels.removeCyberLevels.admin.*CyberLevels.admin.helpCyberLevels.admin.infoCyberLevels.admin.reload/clv reloadCyberLevels.admin.purge/clv purge <player>CyberLevels.admin.exp.*CyberLevels.admin.exp.addCyberLevels.admin.exp.setCyberLevels.admin.exp.removeCyberLevels.admin.levels.*CyberLevels.admin.levels.addCyberLevels.admin.levels.setCyberLevels.admin.levels.remove🧪 PlaceholderAPI
Prefix:
%clv_…...%🏆 Leaderboard
Use
leaderboard_<type>_<position>where:name,displayname,level, orexp1... up to your configured leaderboard size (config.leaderboard.max-positions)Examples:
%clv_leaderboard_name_1%- name at rank 1%clv_leaderboard_level_3%- level at rank 3%clv_leaderboard_exp_5%- EXP at rank 5If the leaderboard is disabled, loading, or the position is out of range, the expansion returns
a short hint string (see config)the configured fallback text.Player (viewer must be online for these)
%clv_player_level%%clv_player_level_next%/%clv_player_next_level%%clv_player_exp%/%clv_player_experience%%clv_player_exp_required%/%clv_player_experience_required%%clv_player_exp_remaining%/%clv_player_experience_remaining%%clv_player_exp_progress_bar%/%clv_player_experience_progress_bar%%clv_player_exp_percent%/%clv_player_experience_percent%Global (no online player restriction in implementation)
%clv_level_maximum%%clv_level_minimum%%clv_exp_minimum%/%clv_experience_minimum%%clv_experience_minimum%👤 Player
The player placeholders require an online player context.
%clv_player_level%%clv_player_level_next%/%clv_player_next_level%%clv_player_exp%/%clv_player_experience%%clv_player_exp_required%/%clv_player_experience_required%%clv_player_exp_remaining%/%clv_player_experience_remaining%%clv_player_exp_progress_bar%/%clv_player_experience_progress_bar%%clv_player_exp_percent%/%clv_player_experience_percent%🌍 Global
%clv_level_maximum%%clv_level_minimum%%clv_exp_minimum%/%clv_experience_minimum%🧬 API (for plugin developers)
CyberLevels exposes a small Bukkit event you can listen to from another plugin.
CyberLevels exposes a Bukkit event for plugins that want to inspect or adjust incoming EXP.
📚 Dependency
compileOnly(or provided) dependency if you build against its API classes, and list it undersoftdepend(ordepend) in yourplugin.ymlso your plugin loads after CyberLevels at runtime.compileOnlyor provided dependency if you build against its API classes.softdependordependin yourplugin.ymlso your plugin loads after CyberLevels at runtime.com.bitaspire.cyberlevels.event.ExpChangeEvent.net.zerotoil.dev.cyberlevels.api.events.XPChangeEventis still present for compatibility, but it is deprecated.ExpChangeEventcom.bitaspire.cyberlevels.event.ExpChangeEventsetExpflows that bypass the same path.async = truewhen the calling thread is not the server main thread (seeEventconstructor). Handle both sync and async listeners as usual.com.bitaspire.cyberlevels.event.ExpChangeEventsetExpAmount(double)orsetAmount(double)can change the EXP amount before CyberLevels applies it.Methods
getUser()LevelUser<?>receiving the EXPgetOldExp()/getNewExp()getOldLevel()/getNewLevel()getExpAmount()/setExpAmount(double)getUser()LevelUser<?>receiving the EXPgetPlayer()getOldExp()/getNewExp()getOldLevel()/getNewLevel()getExpAmount()/setExpAmount(double)getAmount()/setAmount(double)getOldXP()/getNewXP()Example
plugin.yml(ensure CyberLevels loads first):plugin.yml:Register a
Listenerin yourplugin’splugin'sonEnable:🤝 Support & contributing
avoid usingand Spigot reviews should not be used asasupport tickets.—: zerotoildev📜 Resource terms (summary)
Per the Spigot listing: do not redistribute or sell the resource as your own, do not decompile to claim ownership, and follow any updated terms on the resource page.
Authors
👥 Authors
Kihsomray, CroaBeast
🌟 Contributors
Klema_LP
© BitAspire.com | Product of ZeroToil LLC
Uh oh!
There was an error while loading. Please reload this page.