-
Notifications
You must be signed in to change notification settings - Fork 5
Events Cooldowns and Tasks
The grab-bag of gameplay listeners, item cooldowns, and repeating tasks in ServerTools. Everything here lives in config.yml under Events:, Cooldowns:, Misc:, Disabled:, or a couple top-level keys.
Requires: none for most. Withdraw requires Vault (
@RequiresPlugin({"Vault"})).
Each feature below has its real behavior, config path, whether it ships enabled, and the perms/options that matter. A few pull from companion .yml files (AntiCraft.yml, Announcements.yml, ScheduledTask.yml) that get generated on first run.
Blocks crafting or using stations (anvil, smithing table, grindstone, enchanting) for specific items, unless the player has the bypass perm.
- Config:
Events.AntiCraft - Enabled by default: no
- Companion file:
AntiCraft.ymlholds the actual block lists (unknown materials get skipped with a console warning) - Per-station toggles:
Crafting,Anvil,Smithing,Grindstone,Enchanting(alltrue) - Perms:
AdminPerm(anticraft.admin),Bypass(anticraft.bypass) -
MSGsupports%action%and%item%
Lets normally unstackable items stack. You give it a list of material names.
- Config:
Events.StackUnstackables - Enabled by default: no
-
items:list, e.g.SADDLE,SHEARS,EGG
Applies a permanent potion effect to everyone in a given world.
- Config:
Events.WorldEffects - Enabled by default: yes
-
worlds:entries use the formatworld:EFFECT:level, e.g.world:NIGHT_VISION:1
Runs console commands when a player joins. Two buckets: first-ever unique join, and every join.
- Config:
Misc.OnJoinCommands - Enabled by default: no
-
FirstUniqueJoin.CMDSruns once per player,PlayerRunCommands.CMDSruns every join -
%player%gets substituted in each command
Console-driven. /withdraw AMOUNT player pulls money out of the player's Vault balance and hands them a paper "note" item worth that amount. Players can also /withdraw <amount / all> on themselves.
- Config:
Misc.Withdraw - Enabled by default: no
- Requires Vault. The class is tagged
@RequiresPlugin({"Vault"})and callsecon.withdrawPlayer(...), so no Vault means no Withdraw.
/xpbottle <amount / all> converts a player's experience into bottle items, and drinking those bottles gives the XP back. Purely XP, nothing to do with money or economy.
- Config:
Misc.XPBottle - Enabled by default: no
- Uses
Util.setTotalExperienceandEXPERIENCE_BOTTLEitems only, never touches Vault or balances.
Currently inactive. The class exists but its constructor and config reads are commented out, so there's no live config.yml section for it.
Stops beds from blowing up when used in the Nether/End.
- Config:
Events.NoBedExplosionInNether - Enabled by default: yes
The big one. Custom command aliases plus a few command-gating tricks.
- Config:
Misc.CMDAliases - Enabled by default: yes
- Bypass perm:
cmdalias.bypass -
cmds:maps a short alias to the real command, e.g.colors -> essentials:info colors -
disabled:blocks commands outright (things likepl,plugins,version,bukkit:*) -
preCooldownCommands:delays a command by N seconds usingcommand%secondssyntax, e.g.spawn%5.stopIfMoved: falsecontrols whether moving cancels it -
disabledWorlds:blocks specific commands per world name, e.g. nosethomeinspawnorWarzone
All three sit under Cooldowns: and share Seconds plus message strings. %timeleft% shows remaining time.
Rate-limits throwing ender pearls.
- Config:
Cooldowns.EnderPearlCooldown - Enabled by default: no
- Options:
Seconds(15),Message
Cooldown on eating regular golden apples (GOLDEN_APPLE data 0).
- Config:
Cooldowns.GoldenAppleCooldown - Enabled by default: no
- Options:
Seconds(15),Message,StartCooldownMSG(supports%seconds%)
Same deal for enchanted god apples (GOLDEN_APPLE data 1).
- Config:
Cooldowns.GodAppleCooldown - Enabled by default: no
- Options:
Seconds(45),Message,StartCooldownMSG
Both apple cooldowns extend a shared ConsumeCooldown base class, which reads Seconds / Message / StartCooldownMSG off whatever section it's handed.
These are the repeating / scheduled runnables.
Broadcasts messages on a timer, cycling through what's defined in Announcements.yml.
- Config:
AutoBroadcast(top level) - Enabled by default: yes
- Companion file:
Announcements.yml(auto-created; needs aMessagessection or it warns in console)
Auto-clears ground items (and optionally mobs) on a repeating timer, with a warning message before it fires.
- Config:
Misc.ClearLag - Enabled by default: no (but the nested
AutoClearItems.Enabledistrue) - Options:
ClearMobs(true),ClearDelayin seconds (900),ClearSoonMSG,ClearedMSG - Manual perm:
tools.clearlag
Stand on a pressure plate sitting on an emerald block and get launched into the air. A runnable checks for players on plates.
- Config:
Events.Launchpads - Enabled by default: yes
- Options:
BlockType(EMERALD_BLOCK),PlateType(STONE_PRESSURE_PLATE),LaunchPower(1),RunnableTicksperCheck(7) - Admin perm:
launchpad.admin
Runs tasks defined in ScheduledTask.yml on a schedule.
- Config:
Misc.ScheduledTask - Enabled by default: no
- Companion file:
ScheduledTask.yml(auto-created) - Options:
Debug(false),Permission(tools.scheduledtask.admin)
Not really a toggle-off, more a time controller. It locks configured worlds to day or night and re-syncs on an interval.
- Config:
Disabled.DisableTimeChange - Enabled by default: yes
- Options:
DayInAllWorlds(true),SecondSyncin seconds (60),DayWorlds:list,NightWorlds:list
Getting started
Features
- Core Features
- Chat
- World and Mob Protections
- Moderation
- Events, Cooldowns and Tasks
- Utilities and Misc
- Hopper Optimization