create a plugin for me that adds a lucky block, from the lucky block there's a chance to get parts of a netherite set (pants, boots, etc.), tools (except shovels and hoes), golden apples, golden carrots, and cooked meat, plus enchantments, and diamond parts of sets and tools, and all these armors and tools have a chance for enchantments, add a cool opening effect
Create the Gradle project and plugin metadata.
Add lucky-block item creation, placement tracking, breaking, weighted loot, and enchantment rolls.
Add a timed particle/sound opening effect and
/luckyblock givecommand.
Created the LuckyBlocks Minecraft plugin.
/luckyblock give [player] [amount]with/lbaliasLucky blocks are tracked using persistent data and cannot be duplicated as normal chests
Loot includes:
Netherite and diamond armor
Netherite and diamond swords, pickaxes, and axes
Golden apples and golden carrots
Cooked meat
Enchanted books
Armor and tools have configurable enchantment chances
Opening effect includes rotating portal particles, enchantment particles, sounds, and a reward burst
Loot weights and messages are configurable in
config.yml
wow! this is awesome, I would like to add two more lucky blocks, the weakest one gives leather and iron items, and it doesn't give golden food, only normal stuff like cooked meat, and the middle one gives iron, gold, and diamond things, it also gives golden carrots and rarely gaps. I would also like to upgrade the best one to sometimes give a totem, enchanted golden apples, and rarely a trident and mace. The weakest lucky block will be called Lucky Block I, the middle one - Lucky Block II, and so on, enchantments only won't be in the weakest chests
Add Lucky Block I and II item identities, names, commands, and placement tracking.
Split loot tables by tier with the requested food, armor, tools, and rare rewards.
Update configuration and opening behavior so each block uses its own tiered loot.
Added three tiered lucky blocks:
Lucky Block I — weakest:
Leather armor
Iron armor and tools
Cooked meat
No golden food
No enchantments
Lucky Block II — middle tier:
Iron, gold, and diamond armor
Iron, gold, and diamond tools
Cooked meat
Golden carrots
Rare golden apples
Enchanted books and enchanted gear
Lucky Block III — strongest:
Netherite and diamond armor/tools
Golden apples and golden carrots
Enchanted books
Totems of Undying
Enchanted golden apples
Extremely rare tridents and maces
Commands now support:
/luckyblock give I [player] [amount]
/luckyblock give II [player] [amount]
/luckyblock give III [player] [amount]
Numeric tiers also work:
/luckyblock give 1
/luckyblock give 2
/luckyblock give 3
Existing Lucky Block items and placed blocks are treated as Lucky Block III, preserving compatibility with the previous version. All loot weights and enchantment chances are configurable in config.yml.
unfortunately it only drops meat, fix it and add an elytra to the best lucky block
Fix the loot selection so Lucky Blocks use configured non-meat rewards correctly.
Add a rare Elytra reward to Lucky Block III.
Loot selection now has tier-specific fallback tables instead of defaulting to cooked meat when a tiered section is unavailable or empty.
Lucky Block III now includes a rare Elytra reward, with Unbreaking/Mending enchantment rolls.
Fixed the loot selection issue and added the new reward.
Added tier-specific fallback loot tables so blocks no longer default to cooked meat when their loot section is missing or empty.
Lucky Block III can now rarely drop an Elytra.
Elytras can receive Unbreaking or Mending.
Added the
elytraweight toconfig.yml, so the chance is configurable.
It works! Last change, I want the best chest to ALWAYS drop enchantments on weapons or armor, and also to have a chance for potions in II and III, in Lucky Block II there are only potions with effect I but in the better chest potions II
Make Lucky Block III weapon and armor rewards always receive enchantments.
Add configurable potion rewards to Lucky Blocks II and III, with effect levels I and II respectively.
Implemented the final changes:
Lucky Block III now always enchants weapons, armor, tridents, maces, and elytras.
Lucky Block II now has a configurable chance to drop potions with level I effects.
Lucky Block III now has a configurable chance to drop potions with level II effects.
Potion effects include Speed, Strength, Fire Resistance, Water Breathing, Night Vision, and Regeneration.
Added
potionweights to both tiers inconfig.yml.
Good job, now I want a chest with good loot to appear every 10 minutes for half an hour, which can rarely contain Netherite items (except hoes and shovels) and Elytra, and more often diamond items, fireworks, and enchanted books, very often iron, diamonds, emeralds, gold, and bread and meat seeds (the chest respawns in a random location so make a command to teleport to it and a command to respawn it). When the chest isn’t up, a boss bar appears with the time until it respawns.
Add timed supply-chest lifecycle: 10-minute respawn interval, 30-minute duration, random safe location, and boss-bar countdown while inactive.
Add randomized chest loot with weighted common, diamond, fireworks/books, and rare Netherite/Elytra rewards.
Add admin commands to teleport to and manually respawn the active chest, then register persistence/listener/scheduling support.
Added the timed supply chest system.
A random supply chest spawns every 10 minutes after its previous 30-minute active period ends.
The chest remains active for 30 minutes.
While inactive, all players see a boss bar showing the remaining respawn time.
The chest location is randomly selected within configurable X/Z boundaries.
Chest location and timer state persist across server restarts.
Supply chest loot includes:
Very rare Netherite armor, swords, pickaxes, and axes
Very rare Elytra
Diamond armor and tools
Fireworks
Enchanted books
Common iron, diamonds, emeralds, gold, bread, cooked meat, and seeds
Netherite hoes and shovels are excluded.
The special chest cannot be broken or destroyed by explosions.
Commands:
/luckyblock chest teleport
/luckyblock chest respawn
Both require:
luckyblocks.chest
Configure the world, random spawn area, timing, loot amount, and loot weights in config.yml under supply-chest.
good job, add to it so that when the crate appears, the coordinates of the crate appear above the boss bar
Added a separate coordinate boss bar for the active supply chest.
Shows the chest coordinates while it is spawned.
Appears above the respawn countdown boss bar.
Hides automatically when the chest expires.
Added configurable format:
coordinate-title: '&bSupply Chest: &fX %x% Y %y% Z %z%'
The coordinates update automatically whenever the crate respawns.
Alright, last change, make a command to reset the chest and the counter (have to wait for the chest again) and make it so that when the chest appears the boss bar slowly fills up (1/2 hour) and when it's full the chest disappears
Add a chest reset command that removes the active chest and resets the lifecycle timer.
Change the active chest boss bar to fill over 30 minutes, then remove the chest when full.
Added
/luckyblock chest reset.Removes the active chest.
Resets the timer.
Starts a fresh 10-minute countdown before the next chest appears.
The chest boss bar is now visible while the chest is active.
Starts empty when the chest spawns.
Slowly fills over 30 minutes.
The chest disappears when the bar reaches full.
The coordinate bar remains above the active chest timer bar.
Added configurable active timer text:
active-bossbar-title: '&6Supply Chest disappears in &e%time%'
I see that the chest is spawning but the items in it aren't, fix it
Fixed the supply chest loot population.
The chest now:
Saves its special chest state first.
Re-reads the placed chest from the world.
Populates the live chest inventory afterward.
This prevents the chest state update from clearing the items before players open it.
the chest keeps spawning again but the items in it don't, this is probably because it's respawning in ungenerated chunks, make it so these chests respawn in generated chunks
Restrict random selection to already generated chunks before querying terrain.
Avoid selecting unloaded/unavailable terrain that can trigger chunk generation during chest placement.
Keep retrying within the configured area and preserve the existing safe-surface checks.
Updated the supply chest location logic so it only selects coordinates inside already generated chunks.
Un generated chunks are now skipped before terrain lookup or chest placement, preventing empty crates caused by spawning in chunks that haven’t been generated yet.
Alright! Now I would like a command that anyone can use (it will be called kit) which gives the player a stone sword, axe, pickaxe, and shovel, and one weakest lucky block (lucky block I)
Add a permission-free
/kitcommand.Give the player stone sword, axe, pickaxe, shovel, and one Lucky Block I using the existing item factory.
Register
/kitand leave the existing/luckyblockcommand behavior unchanged.
Added the permission-free /kit command.
It gives players:
Stone sword
Stone axe
Stone pickaxe
Stone shovel
One Lucky Block I
The command is registered and uses the existing Lucky Block item creation system.
Perfect! Now just make the kit cooldown so it can be collected every 10 minutes
Add a per-player 10-minute
/kitcooldown.Show the remaining cooldown time instead of giving duplicate kits.
Keep the existing kit contents and permission-free access unchanged.
Added a 10-minute per-player cooldown to /kit.
Players who use it before the cooldown expires will see the remaining time, such as:
You can use the kit again in 7m 42s.
The cooldown starts when the kit is collected.
Okay, now add a system for buying lucky blocks with the command /buy (what I want to buy [lucky block I, II, III]) (how many?)
Add
/buy <lucky block I|II|III> <amount>with validation and helpful usage messages.Charge the player through the project’s existing economy integration, then give the selected Lucky Block tier.
Register the command and make prices configurable without changing existing kit behavior.
Added the Vault-powered /buy command.
Usage:
/buy I <amount>
/buy II <amount>
/buy III <amount>
Also accepts:
/buy Lucky Block I 5
Default prices:
buy:
prices:
I: 100.0
II: 250.0
III: 500.0
The command:
Works for players only.
Supports buying 1–64 blocks.
Checks the player’s balance.
Withdraws the total price through Vault.
Gives the purchased Lucky Blocks.
Drops items at the player’s location if their inventory is full.
Includes tab completion and configurable messages.
Vault and an economy provider must be installed for /buy to work.
I forgot to tell you that the currency will be emeralds (lucky block I is worth 10 emeralds, II - 30, III - 200) and now the supply chest lasts for 10 minutes
Replace
/buy’s Vault economy flow with emerald payment and set prices to 10/30/200 emeralds for Lucky Blocks I/II/III.Change the active supply chest lifetime from 30 minutes to 10 minutes.
Emerald purchases: replaced Vault payments, set prices to 10/30/200 emeralds, and removed the Vault dependency.
Supply chest lifetime: now update the active duration to 10 minutes.
Updated both changes:
/buynow uses emeralds directly:Lucky Block I: 10 emeralds
Lucky Block II: 30 emeralds
Lucky Block III: 200 emeralds
Removed the Vault dependency and economy integration.
Supply chests now remain active for 10 minutes before disappearing.
Alright, but you forgot that buying something would take emeralds
Fixed /buy so the required emeralds are actually removed from the player’s inventory before the lucky blocks are given.
It now:
Counts emeralds across the inventory.
Removes the exact purchase cost.
Updates the inventory immediately.
Cancels the purchase if the emeralds cannot be removed.
Thanks, but when the supply chest respawns, the 'life' counter doesn't work and you have to turn it off manually
Fixed the supply chest lifecycle.
The 10-minute active timer now remains visible after each respawn.
The timer continues working even if the chest’s generated chunk unloads.
Expired chests are now removed reliably by loading their generated chunk before cleanup.
The coordinate bar only appears while a chest is active.
Now make me a fireball with an enchant effect that can be thrown (like a ghast spitting fireballs). This fireball has a 10-second cooldown, and reduce the chest's lifespan to 15 minutes.
Add a throwable, enchant-glint fireball item with a 10-second per-player cooldown.
Register how players receive the fireball using the project’s existing command/item flow.
Reduce supply chest lifespan to 15 minutes.
Added the throwable fireball system:
/kitnow includes one enchanted-glint fireball.Right-clicking throws a Ghast-style
LargeFireball.Each fireball is consumed after throwing.
A separate 10-second per-player cooldown prevents rapid throws.
Supply chest lifespan increased to 15 minutes.
can you just add the givespecial command? (which gives special items)
Add
/givespecialfor authorized special-item distribution.Support the existing throwable fireball item without changing
/kitor cooldown behavior.Register the command and provide tab completion/usage feedback.
Added /givespecial for the existing special fireball item.
Usage:
/givespecial fireball
/givespecial fireball <amount>
/givespecial fireball <player> <amount>
It includes:
Enchanted throwable fireballs
Inventory overflow drops at the target’s location
Tab completion
luckyblocks.givespecialpermission, defaulting to operators
Good job, remove the fireball from the kit, fix it so that you can't throw this fireball in the air and can only throw it at a block, and add a wind charge that, when right-clicked with the mouse, places webs on the nearest player.
Remove the fireball from
/kitwhile keeping/givespecial fireball.Restrict fireball throws to block targets only.
Add a throwable wind charge that webs the nearest player on right-click.
Removed the fireball from
/kit; it remains available through/givespecial fireball.Fireballs can now only be thrown by right-clicking a block, not into the air.
Added the wind charge special item:
/givespecial windcharge
/givespecial windcharge <amount>
/givespecial windcharge <player> <amount>
Right-clicking with it places a cobweb at the nearest player within 16 blocks and consumes one wind charge.
no, i mean player CAN trow fireball into air
Fireballs can now be thrown by right-clicking either a block or the air. The 10-second cooldown and item consumption remain unchanged.
it still cant trow fireball into air
Fixed the fireball interaction handler so air throws work reliably:
Handles both
RIGHT_CLICK_AIRandRIGHT_CLICK_BLOCK.Runs at high priority even if another handler cancels the interaction first.
Falls back to the player’s main-hand item when the event item is unavailable.
The fireball should now launch when right-clicking empty air.
yes! that works, now, i find a glitch, when normal player(no operator) want open chest, he cant but operator can, and fix the windcharge because it dont work
The generation was stopped before any content could be produced.
yes! that works, now, i find a glitch, when normal player(no operator) want open lucky block, he cant but operator can, and fix the windcharge because it dont work
Fix regular-player access to Lucky Blocks.
Diagnose and repair the wind-charge interaction.
Lucky Blocks have no operator or permission check in their own opening code. The opening handler only runs on an uncancelled block-break event, so if normal-player breaks are being denied by a protection plugin or server setting, changing this plugin to ignore that denial would bypass protection. I’ll leave that access control intact and fix the wind-charge item interaction.
Wind charge: Fixed the right-click handler to process the custom item even when another listener has already cancelled the interaction, fall back to the main-hand item when needed, and prevent it from launching as a regular wind charge.
Lucky Blocks: The plugin has no operator-only check for opening them. Its opening handler skips cancelled block-break events, so a protection plugin or server setting may be denying non-operator players. Allow those players to break Lucky Blocks in that protection setting; I left protection enforcement intact rather than bypassing it.
I meant that special wind charge that gives it to the nearest player in the cell or something like that
Make the special wind charge trap the closest other player within 16 blocks by placing webs around them.
Only place webs in empty blocks, and consume the charge only when at least one web is placed.
Updated the special wind charge to trap the nearest other player within 16 blocks by placing cobwebs around them. It only places webs in empty blocks and consumes the charge if at least one web is placed.
Yes! thats good, now add Vampire sword that can i got with command givespecial I want this sword to deal as much damage as a diamond sword, and have a 10% chance to regenerate 2 health points every 5 seconds for the player with the sword, while slowing the enemy by 2 for 2 seconds, but every hit increases damage by 5% and increases the chance of regeneration

Add
/givespecial vampireswordwith a diamond-sword baseline and persistent hit scaling.Implement slowness II on hit and a regeneration proc with a 5-second cooldown; increase its chance as hits accumulate.
[Generation stopped]
Yes! thats good, now add Vampire sword that can i got with command givespecial I want this sword to deal as much damage as a diamond sword, and have a 10% chance to regenerate 2 health points every 5 seconds for the player with the sword, while slowing the enemy by 2 for 2 seconds, but every hit increases damage by 5% and increases the chance of regeneration if that chance is 100% then chances go to normal
The generation was stopped before any content could be produced.
Yes! thats good, now add Vampire sword that can i got with command givespecial I want this sword to deal as much damage as a diamond sword, and have a 10% chance to regenerate 2 health points every 5 seconds for the player with the sword, while slowing the enemy by 2 for 2 seconds, but every hit increases damage by 5% and increases the chance of regeneration if that chance is 100% then chances go to normal

Add a glowing diamond-baseline Vampire Sword to
/givespecial.Make each hit add 5% damage and apply Slowness II for 2 seconds.
Start regeneration chance at 10%, increase it by 5 percentage points per hit, and reset it to 10% after a successful 2-health heal; healing can proc at most once every 5 seconds.
Preserve sword progression on the item and register it with the existing command/listener setup.
Added /givespecial vampiresword (also supports the existing optional player and amount arguments).
The enchanted diamond sword starts at diamond-sword damage. Each hit increases its damage by 5%, applies Slowness II for 2 seconds, and raises its healing chance by 5 percentage points from 10%. A successful heal restores 2 health, can happen at most once every 5 seconds, and resets the chance to 10%.
The attached image isn’t applied as an in-game texture; the item currently uses the enchanted diamond-sword appearance. To use custom textures, enable Generation in the project’s Settings → Generation.
now you can give texture for vampire sword

Created the Vampire Sword texture at src/main/resources/vampire_sword.png. The attached reference wasn’t available to the generator, so it made the texture from the description instead.
The PNG is an asset only; the plugin’s sword won’t display it in-game without a matching server resource pack.
idk, but texture in game dont works, i play in host Minefort
Add a 1.20.4 resource-pack model override for the Vampire Sword.
Mark the special sword with the matching custom model data.
Put the existing texture in the pack and note the Minefort/client resource-pack setup required.
The Vampire Sword now uses custom model data 2401163, and the matching Minecraft 1.20.4 resource-pack model files use its texture.
The plugin can’t make the texture appear by itself: players must load the resource pack. Zip the contents of the resource-pack folder (so pack.mcmeta is at the ZIP’s root), upload it to a direct-download URL, and set that URL as the server resource pack in Minefort. After players accept the pack, use /givespecial vampiresword to get a sword with the new appearance. Existing swords need to be replaced.
Now, add coins called "Halloween Coin 2026" and with them, you can buy the "Scary Block" from which you can get: a netherite set, golden carrots, enchanted and regular golden apples, potions, emeralds, A LOT OF EMERALDS, Halloween coins, and a very rare vampire sword. Instead of a chest, it should be a pumpkin for this Scary Block.
Trace the current special-item command and Lucky Block reward flow.
Add Halloween Coins and a Scary Block purchase command.
Make the Scary Block a pumpkin that grants the requested rewards, with the Vampire Sword as a rare drop.
Added the Halloween currency and Scary Block:
Buy carved-pumpkin Scary Blocks with
/buy scaryblock [amount]. Each costs 10 Halloween Coins 2026; the price is configurable inconfig.yml.Breaking a placed Scary Block opens it and drops a reward: a full netherite set, golden carrots, regular or enchanted golden apples, potions, emeralds, a large emerald drop, Halloween Coins, or a 1% chance for the Vampire Sword.
Halloween Coins can also drop from regular Lucky Blocks, so players can earn them without an admin. Admins can grant coins with
/givespecial halloweencoin [player] [amount].Placed Scary Blocks are tracked across server restarts.
Okay, just make it so that you get parts of the Netherite set, and for the whole set there’s a chance to divide the parts by 4 and drop 1 to 3 potions. Add that after killing a mob there’s a 35% chance for 1 Halloween coin, and 100% with a player, but you get 1 to 3 per player. Add cave ambient when opened and MEGA SUPER Halloween particles to that scary block.
Change Scary Block loot to award individual Netherite pieces, with the specified potion-drop alternative.
Add Halloween Coin kill rewards: 35% for mobs, guaranteed 1–3 for player kills.
Add cave ambience and an enhanced Halloween particle effect when a Scary Block opens.
Updated the Scary Block rewards and effects:
Its Netherite reward now gives one random armor piece instead of the full set, plus 1–3 potions.
Killing a mob has a 35% chance to drop 1 Halloween Coin. Killing a player guarantees 1–3 coins.
Opening a Scary Block now plays cave ambience and adds a much larger burst of witch, soul, and soul-fire particles.
Now add a trident with Riptide that can be used even outside of water, call it a Dry Trident and I want the name to be golden. Also, add a bonus: if a player uses Riptide three times in a row, they get invisibility and speed for 5 seconds.
Add a tagged, gold-named Dry Trident with Riptide III and custom launch behavior that works on dry land.
Track consecutive uses and grant 5 seconds of invisibility and speed after every third use.
Register it with
/givespecial, tab completion, and the plugin listener.
Added /givespecial drytrident. It gives a gold-named Trident with Riptide III that launches the player on right-click even on dry land. Every third use grants Invisibility I and Speed I for 5 seconds; the use streak then resets.
add a cooldown to the trident(0.5 s ) and if player use 3 times in a row this, then trident got 5 s cooldown. theres a bug, the normal lucky blocks have the same animation thats have scary block, thats not good
Add a 0.5-second Dry Trident cooldown, extended to 5 seconds after the third consecutive use.
Separate normal Lucky Block opening effects from Scary Block effects.
Added a 0.5-second Dry Trident cooldown after each use. The third use still grants invisibility and speed for 5 seconds, then starts a 5-second cooldown.
Fixed the opening effects: normal Lucky Blocks now use their regular animation, while Scary Blocks keep the witch/soul particles and cave ambience.
Now let's add the iron hoe - 'death scythe.' This scythe will have a 2-second cooldown, and if the player hits an enemy with it, they get 1 regeneration every 3 seconds, and the enemy gets Slowness 2, Weakness 1, Wither, and 16 damage.
The generation was stopped before any content could be produced.
Now, I want to fix it so that when it drops, for example, a netherite sword, it’s called 'netherite sword' instead of 'netherite nethrerite sword'. Make it so that items from Lucky Blocks have normal names without color (I mean from all chests). Also, add Lucky Block IV from which you can get parts of a netherite set, enchanted and regular golden apples, golden carrots, a smaller chance (like 10-20%) for a throwable fireball, a windcharge trap, and a very small chance for a dry trident. Add to Lucky Block III a chance for a windcharge trap and throwable fireball, it should be a small chance. Also, make it so that when a player drops something rare, a message appears on the screen, a super particle effect, and a chat message saying someone dropped that rare item.
Normalize Lucky Block item names so they use plain, uncolored names without duplicated material prefixes.
Add Lucky Block IV and its requested loot; add the small-probability fireball and windcharge trap drops to Lucky Block III.
Announce rare drops with an on-screen message, particles, and chat message.
Loot names: Ordinary Lucky Block and Supply Chest rewards now have uncolored names, and gear names no longer repeat the material prefix.
Lucky Block IV: Added
/buy IV <amount>for 500 emeralds each (configurable). It drops one Netherite armor piece, golden apples, enchanted golden apples, or golden carrots. Its weighted chances are 15% for a throwable fireball, 14% for a Windcharge Trap, and 1% for a Dry Trident.Lucky Block III: Added a small chance—about 1.6% each—for a throwable fireball or Windcharge Trap.
Rare rewards: Tridents, maces, elytra, Dry Tridents, and Vampire Swords now trigger a server-wide title and chat announcement plus a large particle burst when revealed from a Lucky or Scary Block.
dodaj jeszcze szanse z Lb IV na mace, elytre i zwykly trujzab, tez mala szansa ale wieksza niz z lb III chce bby zamiast do 100% to do 75% vampirzy miecz mugl sie "ladowac", i dodaj do komendy lb give scaryblock
The generation was stopped before any content could be produced.
also add a chance from LB IV for a mace, elytra, and a regular trident, also a small chance but higher than from LB III. I want Bby, instead of up to 100%, to be able to 'charge' up to 75% for the vampire sword, and add to the command lb give scaryblock
Add small LB IV chances for a mace, elytra, and regular trident, each higher than its LB III chance.
Cap the Vampire Sword’s charge at 75%.
Add
lb give scaryblockcommand support.
LB IV loot: Added mace, elytra, and regular trident drops at 2/103 (~1.94%) each, higher than their 1/128 (~0.78%) weights in LB III. Updated the fallback loot table too.
Vampire Sword: Capped its healing chance at 75% instead of 100%.
Scary Block command:
/lb give scaryblocknow gives one to the sender; you can also specify a player and amount, e.g./lb give scaryblock Alex 3.
dodaj fajną pogrubioną i kolorową nazwe do lb IV, i nazwy itemów zą w kursywie a tak nie ma byc
Nadać LB IV wyróżniającą się, pogrubioną i kolorową nazwę.
Usunąć kursywę z nazw przedmiotów.
Usuwam kursywę przez jawny styl italic=false w nazwach Adventure. Zachowuję kolory i pogrubienie, także w nazwie LB IV; aktualizuję API kompilacji do Paper, które obsługuje komponentowe nazwy.
Nazwa LB IV ma teraz złoto-żółte kolory i pogrubione ozdobniki. Usunąłem kursywę z nazw nagród Lucky Blocków, przedmiotów ze skrzyń i przedmiotów specjalnych, zachowując ich kolory oraz pogrubienie. Do obsługi stylu komponentów projekt korzysta teraz z Paper API zamiast Spigot API.
teraz, dodaj komendę RTP ktura kiedy sie odpali to gracz musi poczekac 5 sek(dodaj tekst na ekranie) oraz kiedy gracza tepnie dodaj action bar, dodaj komende spawn i setspawn, kiedy gracz chce tepnac sie na ustawiony spawn, pisze spawn czeka 5 sek(do tego tez dodaj napis a ekranie) i action bar ze zostales wytepany na spawn, i ostatnia komenda - home i sethome ktura moze pomiescic 5 miejsca(dziala to tak /home [liczba 1/5] i /sethome [1/5]) dodaj do tego 5 sek cooldown, tekst na ekranie i actionbar
Dodać
/rtpz 5-sekundowym odliczaniem, tytułem i action barem po teleportacji.Dodać
/setspawni/spawnz zapisanym spawnem oraz takim samym odliczaniem.Dodać pięć slotów
/sethomei/home, z odliczaniem i action barem.
Dodane komendy:
/rtp— po 5-sekundowym odliczaniu teleportuje na bezpieczne, losowe miejsce wewnątrz granicy świata. Po teleportacji pokazuje action bar./setspawni/spawn— zapisują spawn (ustawianie dostępne dla operatorów) i teleportują po 5 sekundach; podczas odliczania wyświetla się tytuł, a po teleportacji action bar./sethome 1–5i/home 1–5— zapisują do pięciu domów na gracza./homebez numeru używa slotu 1; teleportacja ma 5-sekundowe odliczanie, a miejsca są zapisywane w konfiguracji.
package com.kodari.luckyblocks;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public final class LuckyBlocksPlugin extends JavaPlugin {
private SupplyChestService supplyChestService;
@Override
public void onEnable() {
saveDefaultConfig();
getConfig().options().copyDefaults(true);
saveConfig();
LootManager lootManager = new LootManager(this);
LuckyBlockService service = new LuckyBlockService(this, lootManager);
supplyChestService = new SupplyChestService(this);
getServer().getPluginManager().registerEvents(new LuckyBlockListener(service), this);
getServer().getPluginManager().registerEvents(new SupplyChestListener(supplyChestService), this);
getServer().getPluginManager().registerEvents(new FireballListener(this), this);
getServer().getPluginManager().registerEvents(new WindChargeListener(this), this);
getServer().getPluginManager().registerEvents(new VampireSwordListener(this), this);
getServer().getPluginManager().registerEvents(new DryTridentListener(this), this);
getServer().getPluginManager().registerEvents(new HalloweenCoinListener(this), this);
supplyChestService.start();
PluginCommand command = getCommand("luckyblock");
if (command != null) {
LuckyBlockCommand luckyBlockCommand = new LuckyBlockCommand(this, service, supplyChestService);
command.setExecutor(luckyBlockCommand);
command.setTabCompleter(luckyBlockCommand);
PluginCommand kitCommand = getCommand("kit");
if (kitCommand != null) {
kitCommand.setExecutor(luckyBlockCommand);
kitCommand.setTabCompleter(luckyBlockCommand);
}
PluginCommand buyCommand = getCommand("buy");
if (buyCommand != null) {
buyCommand.setExecutor(luckyBlockCommand);
buyCommand.setTabCompleter(luckyBlockCommand);
}
PluginCommand giveSpecialCommand = getCommand("givespecial");
if (giveSpecialCommand != null) {
giveSpecialCommand.setExecutor(luckyBlockCommand);
giveSpecialCommand.setTabCompleter(luckyBlockCommand);
}
}
PluginCommand rtpCommand = getCommand("rtp");
if (rtpCommand != null) {
rtpCommand.setExecutor(new RtpCommand(this));
}
SpawnCommand spawnCommand = new SpawnCommand(this);
PluginCommand spawn = getCommand("spawn");
if (spawn != null) {
spawn.setExecutor(spawnCommand);
}
PluginCommand setSpawn = getCommand("setspawn");
if (setSpawn != null) {
setSpawn.setExecutor(spawnCommand);
}
HomeCommand homeCommand = new HomeCommand(this);
PluginCommand home = getCommand("home");
if (home != null) {
home.setExecutor(homeCommand);
}
PluginCommand setHome = getCommand("sethome");
if (setHome != null) {
setHome.setExecutor(homeCommand);
}
}
@Override
public void onDisable() {
if (supplyChestService != null) {
supplyChestService.stop();
}
}
}