Úvod a povídání k pluginu
Tento plugin se používá na hodně serverech. Tento plugin slouží k poskytování virtuálních prací pro hráče, který si tím může vydělávat peníze různými činnostmi jako třeba rybaření, kopání a farmaření samozřejmě, že je tu více prací.
Obsah návodu
• Instalace pluginu na server.
• Seznam prací v pluginu.
• Config pluginu prací.
• Co potřebujete, aby vám plugin fungoval.
• Napojení pluginu na databázu MySQL.
• Nastavení, aby hráči mohly mít jen určitý počet prací.
• Základní příkazy pro tento plugin.
• Závěrečné povídání.
Instalace pluginu na váš server.
• Přihlásíme se do Control panelu.
• Vybereme server na který chceme plugin nainstalovat.
• V levé liště klikneme na "PluginManager"
• Klikneme na "Přidat plugin".
• Vybereme si takovou verzi, která je stejná s verzí serveru.
•Pro uživatele, kteří nepoužívají PluginManager tak tu je odkaz na plugin
http://dev.bukkit.org/bukkit-plugins/jobs/
Seznam prací v configu pluginu.
Tento plugin obsahuje v configu celkem osum prací, do kterých se může hráč zaměstnat a vydělávat peníze za vykonávaní určité činnosti. Pozor můžou se přidávat i odebírat podle vašeho uvážení.
•Horník -> Získává peníze za kopání surovin (Uklí, zlato, železo atd..)
•Lovec -> Získává peníze za zabíjením
•Zbrojíř -> Získává peníze za enchantování věcí
•Farmář -> Získává peníze za farmaření
•Kopac -> Získává peníze za kopání (hlíny, štěrku, písku ...)
•Stavitel -> Získává peníze za stavění
•Dřevorubec-> Získává peníze za těžení dřeva
•Rybář -> Získává peníze za rybolov
Config pluginu, ve kterém jsou uloženy práce.
V tomto textovém souboru můžete ty práce měnit a přidávat.
Kód: Vybrat vše
# Jobs configuration.
#
# Stores information about each job.
#
# For example configurations, visit http://dev.bukkit.org/server-mods/jobs/.
Jobs:
Woodcutter:
fullname: Drevorubec <- Celé jméno práce
shortname: W <- Co bude napsáno před jménem v chatu
description: Earns money felling and planting trees <- Detailní popis práce za co dostává peníze
ChatColour: GREEN <- Barva práce
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Break: <- Tu je kolik bude dostávat za určité věci money.
LOG:
income: 5.0
experience: 5.0
Place:
SAPLING:
income: 1.0
experience: 1.0
WOOD:
income: 2.0
experience: 2.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Woodcutter:
income: 10.0
experience: 10.0
permissions:
aaaaaatest.node:
value: true
level: 0
aaaaaatest.node2:
value: true
level: 10
Miner:
fullname: Hornik
shortname: M
description: Earns money mining minerals and ores.
ChatColour: DARK_GRAY
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Break:
STONE:
income: 2.0
experience: 2.0
COAL_ORE:
income: 3.0
experience: 3.0
GLOWING_REDSTONE_ORE:
income: 3.0
experience: 3.0
IRON_ORE:
income: 4.0
experience: 4.0
GOLD_ORE:
income: 5.0
experience: 5.0
LAPIS_ORE:
income: 5.0
experience: 5.0
DIAMOND_ORE:
income: 6.0
experience: 6.0
OBSIDIAN:
income: 7.5
experience: 7.5
MOSSY_COBBLESTONE:
income: 6.0
experience: 6.0
Place:
RAILS:
income: 2.0
experience: 2.0
IRON_ORE:
income: -5.0
experience: -5.0
GOLD_ORE:
income: -6.0
experience: -6.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Miner:
income: 10.0
experience: 10.0
Builder:
fullname: Stavitel
shortname: B
description: Earns money for building structures.
ChatColour: WHITE
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Place:
COBBLESTONE:
income: 1.0
experience: 1.0
WOOD:
income: 1.5
experience: 1.5
FENCE:
income: 1.5
experience: 1.5
WOOL:
income: 1.5
experience: 1.5
STONE:
income: 2.25
experience: 2.25
GLOWSTONE:
income: 3.0
experience: 3.0
SANDSTONE:
income: 2.0
experience: 2.0
GLASS:
income: 3.0
experience: 3.0
BRICK:
income: 4.0
experience: 4.0
LAPIS_BLOCK:
income: 5.0
experience: 5.0
DOUBLE_STEP:
income: 2.0
experience: 2.0
STEP:
income: 2.0
experience: 2.0
BOOKSHELF:
income: 3.0
experience: 3.0
WOOD_STAIRS:
income: 2.0
experience: 2.0
COBBLESTONE_STAIRS:
income: 2.0
experience: 2.0
MOSSY_COBBLESTONE:
income: 5.0
experience: 5.0
DIAMOND_BLOCK:
income: 5.0
experience: 5.0
GOLD_BLOCK:
income: 5.0
experience: 5.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Builder:
income: 10.0
experience: 10.0
Digger:
fullname: Kopac
shortname: D
description: Earns money for terraforming the world.
ChatColour: GOLD
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Break:
DIRT:
income: 2.0
experience: 2.0
GRASS:
income: 2.0
experience: 2.0
GRAVEL:
income: 2.0
experience: 2.0
SAND:
income: 2.0
experience: 2.0
CLAY:
income: 2.0
experience: 2.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Digger:
income: 10.0
experience: 10.0
Farmer:
fullname: Farmar
shortname: Fa
description: Earns money farming crops.
ChatColour: BLUE
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Break:
CROPS-7:
income: 4.0
experience: 4.0
SUGAR_CANE_BLOCK:
income: 4.0
experience: 4.0
Place:
CROPS-0:
income: 3.0
experience: 3.0
SUGAR_CANE_BLOCK:
income: 1.0
experience: 1.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Farmer:
income: 10.0
experience: 10.0
Hunter:
fullname: Lovec
shortname: H
description: Earns money killing animals and monsters.
ChatColour: RED
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Kill:
Chicken:
income: 2.5
experience: 2.5
Cow:
income: 2.5
experience: 2.5
Pig:
income: 2.5
experience: 2.5
Sheep:
income: 2.5
experience: 2.5
Wolf:
income: 5.0
experience: 5.0
Creeper:
income: 10.0
experience: 10.0
Skeleton:
income: 10.0
experience: 10.0
Spider:
income: 10.0
experience: 10.0
Zombie:
income: 10.0
experience: 10.0
Player:
income: 7.5
experience: 7.5
custom-kill:
Woodcutter:
income: 10.0
experience: 10.0
Miner:
income: 10.0
experience: 10.0
Digger:
income: 10.0
experience: 10.0
Farmer:
income: 10.0
experience: 10.0
Builder:
income: 10.0
experience: 10.0
Hunter:
income: 20.0
experience: 20.0
Fisherman:
fullname: Rybar
shortname: Fi
description: Earns money from fishing.
ChatColour: AQUA
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Fish:
RAW_FISH:
income: 4.0
experience: 4.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Fisherman:
income: 10.0
experience: 10.0
Weaponsmith:
fullname: Zbrojir
shortname: W
description: Earns money from crafting and repairing weapons.
ChatColour: DARK_PURPLE
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Craft:
WOOD_SWORD:
income: 1.0
experience: 1.0
IRON_SWORD:
income: 2.0
experience: 2.0
GOLD_SWORD:
income: 3.0
experience: 3.0
DIAMOND_SWORD:
income: 4.0
experience: 4.0
Repair:
WOOD_SWORD:
income: 1.0
experience: 1.0
IRON_SWORD:
income: 2.0
experience: 2.0
GOLD_SWORD:
income: 3.0
experience: 3.0
DIAMOND_SWORD:
income: 4.0
experience: 4.0
Smelt:
IRON_INGOT:
income: 2.0
experience: 2.0
GOLD_INGOT:
income: 2.0
experience: 2.0
Brewer:
fullname: Sladek
shortname: Br
description: Earns money brewing potions.
ChatColour: LIGHT_PURPLE
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Brew:
NETHER_STALK:
income: 1.0
experience: 1.0
REDSTONE:
income: 2.0
experience: 2.0
GLOWSTONE_DUST:
income: 2.0
experience: 2.0
SPIDER_EYE:
income: 2.0
experience: 2.0
FERMENTED_SPIDER_EYE:
income: 2.0
experience: 2.0
BLAZE_POWDER:
income: 2.0
experience: 2.0
SUGAR:
income: 2.0
experience: 2.0
SPECKLED_MELON:
income: 4.0
experience: 4.0
MAGMA_CREAM:
income: 4.0
experience: 4.0
GHAST_TEAR:
income: 4.0
experience: 4.0
Enchanter:
fullname: Enchanter
shortname: E
description: Earns money enchanting weapons.
ChatColour: DARK_BLUE
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Enchant:
WOOD_SWORD:
income: 4.0
experience: 4.0
IRON_SWORD:
income: 6.0
experience: 6.0
GOLD_SWORD:
income: 8.0
experience: 8.0
DIAMOND_SWORD:
income: 10.0
experience: 10.0
None:
fullname: None
shortname: N
ChatColour: WHITE
chat-display: none
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Kill:
Player:
income: 7.5
Toto byl celý config, který jsem nepopsal celý, protože u každé práce je to stejně. Tu máte práci Dřevorubce, kterou jsem detailně popisoval v configu nahoře.
Kód: Vybrat vše
#
# Stores information about each job.
#
# For example configurations, visit http://dev.bukkit.org/server-mods/jobs/.
Jobs:
Woodcutter:
fullname: Drevorubec <- Celé jméno práce
shortname: W <- Co bude napsáno před jménem v chatu
description: Earns money felling and planting trees <- Detailní popis práce za co dostává peníze
ChatColour: GREEN <- Barva práce
chat-display: full
leveling-progression-equation: 100*((1.13+(0.01*(numjobs-1)))^(joblevel-1))
income-progression-equation: baseincome*((1.05)^(joblevel-1))
experience-progression-equation: baseexperience*((1.05)^(joblevel-1))
Break: <- Tu je kolik bude dostávat za určité věci money.
LOG:
income: 5.0
experience: 5.0
Place:
SAPLING:
income: 1.0
experience: 1.0
WOOD:
income: 2.0
experience: 2.0
Kill:
Player:
income: 7.5
experience: 7.5
custom-kill:
Woodcutter:
income: 10.0
experience: 10.0
permissions:
aaaaaatest.node:
value: true
level: 0
aaaaaatest.node2:
value: true
level: 10
Co potřebujete, aby vám plugin fungoval.
S tímto pluginem jsem měl docela velké problémy a to s tím, že jsem nahodil na server tento plugin a ještě plugin iConomy a vyzkoušel jsem jestli, když se zaměstnám do práce jestli budu dostávat peníze a nedostával jsem tak jsem to řešil a nakonec jsem si uvědomil, že potřebuji ještě plugin Valut tak abych to shrnul co potřebujeme, aby plugin kompletně fungoval.
Valut - Plugin, který umožňuje jednodušší práci s právy, chatem. http://dev.bukkit.org/bukkit-plugins/vault/
iConomy - Plugin poskytující ekonomiku na server (money).
Jobs - Plugin, který přidává práce na server. http://dev.bukkit.org/bukkit-plugins/jobs/
Jestli máte tyto pluginy tak by vám měl plugin fungovat jak má.
Napojení pluginu na databázu MySQL.
Databáze MySQL umožňuje, rychlejší načítání serveru a také něco jako větší místo na disku serveru.
Toto nalezneme v (plugins/Jobs/generalConfig.yml)
Kód: Vybrat vše
# Requires Mysql.
mysql-username: -------------
mysql-password: -------------
mysql-database: -------------
mysql-url: jdbc:mysql://localhost:3306/
#mysql-table-prefix:
Nastavení, aby hráči mohly mít jen určitý počet prací.
Najdeme si řádek s tímto textem, na kterém se mění počet prací.
Kód: Vybrat vše
# maximum number of jobs a player can join
#max-jobs: 3 <- maximum prací
Pokud chcete, aby vám to fungovalo musíte odstranit toto znamínko před textem #
Zakladní příkazy pro plugin.
/jobs browse -> Zobrazí všetky dostupné práce, do ktorých sa hráč môže zamestnať
/jobs join <Meno práce> -> Zaměstná Vás do zadané práce
/jobs leave <Meno práce> -> Hráč podá výpoveď v zadaném zaměstnaní
/jobs info <Meno práce> -> Zobrazí všechny informace o zadané práci
/jobs stats -> Zobrazí Vaši statistiku v zaměstnaní
Závěrečný text k pluginu.
Tento plugin patří k nejoblíbenějším pluginům, který používá hodně serverů, které mají zaměření na ekonomiku.
Mé další návody:
Blood - http://forum.fakaheda.eu/viewtopic.php?f=85&t=26655
Residence - http://forum.fakaheda.eu/viewtopic.php?f=85&t=26682