mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
272 Commits
dev-events
...
dev-wildca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a80cdaff71 | ||
|
|
75cbfa1b1c | ||
|
|
48c7aa3e84 | ||
|
|
87bce65098 | ||
|
|
c288dc433b | ||
|
|
0cc29d070f | ||
|
|
8fd94b625c | ||
|
|
ccca3fff26 | ||
|
|
f77446919f | ||
|
|
96fdf265d5 | ||
|
|
b964e3f7c3 | ||
|
|
d93c83f775 | ||
|
|
6b9f6c29ec | ||
|
|
09b0bf62e2 | ||
|
|
15d7d3f8a2 | ||
|
|
dedbdf890a | ||
|
|
30085e1e34 | ||
|
|
1c30146491 | ||
|
|
037022b175 | ||
|
|
0aa67727f5 | ||
|
|
8e3e1d5f11 | ||
|
|
d2d70089ca | ||
|
|
94a566acc9 | ||
|
|
daab095557 | ||
|
|
2b9b5df1ee | ||
|
|
e7e62b8d40 | ||
|
|
3d242bbdb6 | ||
|
|
e796eae3c3 | ||
|
|
a257e83a62 | ||
|
|
d527584248 | ||
|
|
0a4de6e2fc | ||
|
|
4b20f12eff | ||
|
|
0de1187012 | ||
|
|
8e474170e4 | ||
|
|
2eeb9b1f35 | ||
|
|
3de6e2c3f1 | ||
|
|
98d166808f | ||
|
|
f75e15dfdc | ||
|
|
f2b892b7d5 | ||
|
|
883ada01f8 | ||
|
|
3a8f45a04d | ||
|
|
906609696b | ||
|
|
66ccde4310 | ||
|
|
4970cdc3f4 | ||
|
|
1becc874ba | ||
|
|
b107a8dc7c | ||
|
|
37aebc1716 | ||
|
|
836877ff93 | ||
|
|
28a846e0cb | ||
|
|
0185a30ec9 | ||
|
|
38e1947302 | ||
|
|
4fb4d6fc0c | ||
|
|
6d719988bf | ||
|
|
b1c1f0e21e | ||
|
|
3f34cc7365 | ||
|
|
3c6c2837bd | ||
|
|
4bcef76fd8 | ||
|
|
2fd5d7aa81 | ||
|
|
5080c68dce | ||
|
|
3403aef37d | ||
|
|
53a34c12d2 | ||
|
|
59417d6721 | ||
|
|
93d63dbca5 | ||
|
|
4643cf1070 | ||
|
|
91bf54019e | ||
|
|
ead716ef0d | ||
|
|
8fec1af257 | ||
|
|
99248caba3 | ||
|
|
af64bdf742 | ||
|
|
66a4925371 | ||
|
|
8eb6acd60f | ||
|
|
ce6892f2e6 | ||
|
|
c14a4e9305 | ||
|
|
5825eb1696 | ||
|
|
bfebbd0095 | ||
|
|
b204507a82 | ||
|
|
9f53426511 | ||
|
|
03c2282c3f | ||
|
|
20092d55fd | ||
|
|
69a2a5cfff | ||
|
|
618cfad100 | ||
|
|
56e625a9df | ||
|
|
79a1ef5d3e | ||
|
|
10dd7619bf | ||
|
|
f9dfec5bd0 | ||
|
|
a9488bc18b | ||
|
|
f0ee708710 | ||
|
|
3390a31cc6 | ||
|
|
0b4b272223 | ||
|
|
8d200ea653 | ||
|
|
eb359c5595 | ||
|
|
e1b8088c17 | ||
|
|
70a1eea231 | ||
|
|
c744974192 | ||
|
|
faa11a87a9 | ||
|
|
91da5c4ab1 | ||
|
|
da5e770e06 | ||
|
|
09557e378b | ||
|
|
72d26fed0f | ||
|
|
225de799e8 | ||
|
|
334c44760f | ||
|
|
ac7fc1020d | ||
|
|
461871327b | ||
|
|
60ddd799de | ||
|
|
80571fbe8f | ||
|
|
d407f85704 | ||
|
|
458dc7db42 | ||
|
|
beab794c0e | ||
|
|
8256f5461c | ||
|
|
0fe3ad7432 | ||
|
|
04e5dda127 | ||
|
|
f65adea2f9 | ||
|
|
cdfb0da5c9 | ||
|
|
cfa3d34dff | ||
|
|
01b7d4f742 | ||
|
|
9a359bf42c | ||
|
|
ebdf11300b | ||
|
|
e1a8f02bce | ||
|
|
862d38b587 | ||
|
|
2415767c06 | ||
|
|
aa59348a94 | ||
|
|
9c925d3327 | ||
|
|
30f7521a3a | ||
|
|
7b3869e385 | ||
|
|
0e641f7c5b | ||
|
|
733d16cf35 | ||
|
|
833bc1b251 | ||
|
|
840f3d9382 | ||
|
|
34d6d867f2 | ||
|
|
e56d5a0454 | ||
|
|
53fdf750f4 | ||
|
|
f096e915cf | ||
|
|
ce59488e8e | ||
|
|
47db522cc1 | ||
|
|
a2cac82cba | ||
|
|
2e74333eb7 | ||
|
|
0056be2d5f | ||
|
|
1d7e034d5e | ||
|
|
8deac175d1 | ||
|
|
d0b766a2d3 | ||
|
|
65692f2a83 | ||
|
|
d0b0786284 | ||
|
|
87ac1002de | ||
|
|
c51fde7f1f | ||
|
|
0a6735110f | ||
|
|
8a284c50a2 | ||
|
|
09431ef27c | ||
|
|
9f9de86d21 | ||
|
|
d9c04a09ba | ||
|
|
04a02cfdc8 | ||
|
|
b3a6c32ef6 | ||
|
|
254f3b5ac9 | ||
|
|
7f9ada14c8 | ||
|
|
f79a4741cc | ||
|
|
f3fd48d0c0 | ||
|
|
fbee3318bd | ||
|
|
813f807876 | ||
|
|
0060a86b20 | ||
|
|
15743c5f46 | ||
|
|
4b9d472f10 | ||
|
|
988006f913 | ||
|
|
2f05c472ce | ||
|
|
5c836cdaaf | ||
|
|
9e39c3495d | ||
|
|
b653aa57b7 | ||
|
|
2ffdd340af | ||
|
|
d63c3fc6d0 | ||
|
|
4486261413 | ||
|
|
a2e32179bb | ||
|
|
72b106e71f | ||
|
|
679f1ed629 | ||
|
|
734815c58d | ||
|
|
abfedf381d | ||
|
|
8e040ae8d9 | ||
|
|
0c9836eb03 | ||
|
|
62b13a9a84 | ||
|
|
c48ccae484 | ||
|
|
6264bfa15f | ||
|
|
b50ba9c02e | ||
|
|
b3474c04c7 | ||
|
|
a1c1271d21 | ||
|
|
79155887b0 | ||
|
|
4178604833 | ||
|
|
d1fcd6958f | ||
|
|
f39623c279 | ||
|
|
520f5cb116 | ||
|
|
43e2c813d1 | ||
|
|
c6ea32f0b0 | ||
|
|
976c3b8494 | ||
|
|
f3db90b6a9 | ||
|
|
82509fb476 | ||
|
|
c27d79cf25 | ||
|
|
de912c1e07 | ||
|
|
2159aa91ff | ||
|
|
748dba41dc | ||
|
|
9349416326 | ||
|
|
3b794c897d | ||
|
|
b460f7a564 | ||
|
|
383b048fef | ||
|
|
243a3bfbf6 | ||
|
|
c108a475e3 | ||
|
|
6b653fa606 | ||
|
|
818962e668 | ||
|
|
c729297615 | ||
|
|
e6e90954a9 | ||
|
|
4e86f60fd2 | ||
|
|
27ff545d46 | ||
|
|
7c891e9ba8 | ||
|
|
6143003516 | ||
|
|
8f83e328b0 | ||
|
|
9afa8efd7d | ||
|
|
393d9ca74e | ||
|
|
97c95c1c49 | ||
|
|
491df2cc82 | ||
|
|
b4a6ecc58c | ||
|
|
103bf593f3 | ||
|
|
0332c0f5e0 | ||
|
|
a004d6976d | ||
|
|
730f786d5b | ||
|
|
8993c71577 | ||
|
|
cc524bb2ab | ||
|
|
2e94eecda0 | ||
|
|
2466270b22 | ||
|
|
54a514edfa | ||
|
|
1336aeaef0 | ||
|
|
3c078100e8 | ||
|
|
13a623ea1f | ||
|
|
05b21eae5f | ||
|
|
e0358d42d6 | ||
|
|
26174d88f4 | ||
|
|
c12d4319ac | ||
|
|
a87bd14342 | ||
|
|
d5990eee71 | ||
|
|
f94343f13b | ||
|
|
ea4c424e0f | ||
|
|
f99e5e015d | ||
|
|
56b57da077 | ||
|
|
4b402d9837 | ||
|
|
6c2b1f555f | ||
|
|
cdcda03e92 | ||
|
|
65aa05a660 | ||
|
|
7c7aa994a5 | ||
|
|
2aec4a69ea | ||
|
|
06c9ea7068 | ||
|
|
c88583c1c0 | ||
|
|
d2b6838453 | ||
|
|
c9f1f8f662 | ||
|
|
7a08343304 | ||
|
|
3b1bb3e08a | ||
|
|
07cafd4866 | ||
|
|
48821a710f | ||
|
|
30a1b333b9 | ||
|
|
696bf71962 | ||
|
|
2d577e92f1 | ||
|
|
86b92b5b30 | ||
|
|
24c1dec046 | ||
|
|
6c478a26c4 | ||
|
|
2d3da6daf8 | ||
|
|
de3b2b8024 | ||
|
|
02a064ffc6 | ||
|
|
cb5303ce4d | ||
|
|
c0dee19cb0 | ||
|
|
870987bba7 | ||
|
|
5d63a4b910 | ||
|
|
3236ee5ec9 | ||
|
|
12ed2ac07b | ||
|
|
729f3b1df9 | ||
|
|
ee1be3599c | ||
|
|
12a6aca8cd | ||
|
|
2b81b8daeb | ||
|
|
5edbdec151 | ||
|
|
eaa38c11b8 |
@@ -7,21 +7,110 @@ Key:
|
||||
! Change
|
||||
- Removal
|
||||
|
||||
Version 1.4.08-dev
|
||||
Version 1.5.01-dev
|
||||
+ Added new child skill; Salvage
|
||||
+ Added new feature to Herbalism. Instantly-regrown crops are protected from being broken for 1 second
|
||||
+ Added option to config.yml to show the /mcstats scoreboard automatically after logging in
|
||||
+ Added option to config.yml for Alchemy. Skills.Alchemy.Prevent_Hopper_Transfer_Bottles
|
||||
+ Added support for `MATERIAL|data` format in treasures.yml
|
||||
+ Added API to experience events to get XP gain reason
|
||||
+ Added API to check if an entity is bleeding
|
||||
+ Added options to tools.yml and armor.yml config files to set a pretty repair material name
|
||||
+ Added full support for repairables in tools.yml and armor.yml config files
|
||||
+ Added new API class SkillAPI used to get a list of valid skill names
|
||||
= Fixed bug where pistons would mess with the block tracking
|
||||
= Fixed bug where the Updater was running on the main thread.
|
||||
= Fixed bug when players would use /ptp without being in a party
|
||||
= Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent
|
||||
= Fixed bug where dodge would check the wrong player skill level
|
||||
= Fixed bug which causes /party teleport to stop working
|
||||
= Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
|
||||
= Fixed bug where Alchemy would not fire BrewEvents
|
||||
= Fixed bug with setting custom names and lore in treasures config
|
||||
= Fixed bug which would cause a NullPointerException with getFlowerAndGrassXp()
|
||||
= Fixed bug which could cause and SQLException regarding the connection property 'maxReconnects'.
|
||||
= Fixed bug where falling blocks were incorrectly tracked
|
||||
= Fixed bug where items would get deleted when in Berserk with a full inventory
|
||||
= Fixed bug where the console would not correctly show party chat colors
|
||||
= Fixed bug where party chat was using non thread safe methods
|
||||
= Fixed bug where Blast Mining unlock levels could be to high in certain occasions
|
||||
= Fixed bug where Blast Minings ability "Demolition Expert" would not work
|
||||
! Changed SecondaryAbilityEvent to implement Cancellable and it now gets fired for damage related secondary abilities
|
||||
! Changed the way mcMMO handles bonus damage, updated for the new damage event API
|
||||
! Changed player data saving. Save tasks are now asynchronous
|
||||
! Vanished players no longer get hit by AoE effects
|
||||
! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
|
||||
! Changed Alchemy XP distribution. XP is granted based on the stage of the potion.
|
||||
! Changed behavior of the Blast Mining ability "Demolition Expert"; now only decreases damage for the ability user
|
||||
! Updated for new getOnlinePlayers() behavior
|
||||
- Removed salvage ability from Repair, salvage has it's own (child) skill now
|
||||
|
||||
Version 1.5.00
|
||||
+ Added Podzol & Red Sand to Excavation
|
||||
+ Added Hardened Clay, Stained Clay, and Packed Ice to Mining blocks
|
||||
+ Added Acacia and Dark Oak to Woodcutting blocks
|
||||
+ Added Salmon, Clownfish, and Pufferfish to Fishing XP
|
||||
+ Added new flowers and grasses to Herbalism XP
|
||||
+ Added option to config.yml which allows players to always catch fish, even when a treasure is found
|
||||
+ Added option to config.yml to override vanilla Minecraft treasures
|
||||
! Fishing XP now depends on the type of fish.
|
||||
! Woodcutting XP in experience.yml and Woodcutting double drops in config.yml now use the tree species names. Oak is now Generic, and Spruce is now Redwood.
|
||||
! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly.
|
||||
- Removed deprecated permission nodes
|
||||
- Removed "Treasure found!" message
|
||||
|
||||
Version 1.4.08
|
||||
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
||||
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
||||
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||
+ Added config options to disable various sound effects
|
||||
+ Smelting now works with custom ores - add smelting XP value to blocks.yml, or it will default to 1/10th of normal XP.
|
||||
+ Added automatic cleanup of backups folder.
|
||||
+ Added bypass permission for finding Fishing traps
|
||||
+ Added level threshold settings to hardcore modes. When a players skill level is below this threshold, they will not lose any stats
|
||||
+ Added party alliances, two parties can now team up. Allies share party chat and cannot harm each other.
|
||||
+ Added new experience bonus perk 'mcmmo.perks.xp.10percentboost.<skillname>' multiplies incoming XP by 1.1
|
||||
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
||||
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
||||
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
||||
+ Added config options to configure the items used in "Call of the Wild"
|
||||
+ Added config option to configure the database command cooldown
|
||||
= Fixed bug where healthbars wouldn't display if skills were disabled
|
||||
= Fixed bug with "Call of the Wild" entities despawning
|
||||
= Fixed bug with updating (very) old user data.
|
||||
= Fixed bug with checking maximum durability of mod items.
|
||||
= Fixed exploit involving Call of The Wild.
|
||||
= Fixed bug where LeafBlower permissions were ignored
|
||||
= Fixed bug with toggle commands not properly displaying the success message.
|
||||
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||
= Fixed bug with Salvage not reading the config value for the anvil material.
|
||||
= Fixed exploit where you could receive smelting XP for improper items
|
||||
= Fixed bug where the Unbreaking enchantment was ignored when using "Super Breaker" or "Giga Drill Breaker"
|
||||
= Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
||||
= Fixed McMMOPlayerDisarmEvent reporting the skill level of the defending player, not the attacking player.
|
||||
= Fixed bug where arrow retrieval was not properly detecting entities that already existed in the tracker
|
||||
= Fixed bug where cooldown donor perks were reducing more than expected
|
||||
= Fixed bug where disabling hardcore mode for specific skills didn't work
|
||||
= Fixed bug which caused the backup cleanup to delete old backups while it should have kept those
|
||||
= Fixed bug where party chat broke if the display name contained special characters
|
||||
= Fixed bug where `/addlevels all` and `/skillreset all` didn't work
|
||||
= Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
|
||||
= Fixed bug where some horses summoned with "Call of the Wild" were unable to jump
|
||||
= Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command
|
||||
= Fixed bug where Hylian Luck was broken
|
||||
= Fixed bug where Snow would never drop treasures
|
||||
= Fixed issues with commands giving away vanished players.
|
||||
= Fixed bug where the Repair lucky perk would increase the Arcane Forging downgrade chance, instead of decreasing it
|
||||
! Changed party system. Parties now have XP and Levels. Party features such as party teleport and party chat have to be unlocked before they can be used by the party members
|
||||
! Changed appearance of party member list. Gold = party leader, White = online, Gray = offline, Italic = not nearby
|
||||
! Updated localization files
|
||||
! Changed the appearance of /mcmmo commands
|
||||
! Changed AxesCritical to CriticalHit in config file
|
||||
! Changed several secondary ability permissions(deprecated versions still exist)
|
||||
! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
|
||||
! Changed config validation for UnlockLevels, they can now also be 0
|
||||
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
||||
! Changed default amount of XP gained from mining Quartz Ore. From 250 to 100 XP.
|
||||
! Changed Acrobatics config setting, Skills.Acrobatics.Prevent_XP_After_Teleport is now Skills.Acrobatics.XP_After_Teleport_Cooldown
|
||||
- Removed /stats alias for /mcstats
|
||||
|
||||
Version 1.4.07
|
||||
+ Added XP boost to Acrobatics when wearing Boots of Feather Falling
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Our latest development builds are available ~~[here](http://ci.mcmmo.info)~~. Unfortunately, the mcMMO site is down; a temporary dev build location is hosted [here](http://ci.ecocitycraft.com/job/mcMMO/).
|
||||
|
||||
### Brief Description
|
||||
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds thirteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds fourteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||
|
||||
## About the Team
|
||||
|
||||
@@ -32,9 +32,14 @@ mcMMO is currently developed by a team of individuals from all over the world.
|
||||
[]
|
||||
(https://github.com/riking)
|
||||
|
||||
### Special thanks
|
||||
[]
|
||||
(https://github.com/EasyMFnE)
|
||||
Added the Alchemy skill
|
||||
|
||||
## Compiling
|
||||
|
||||
mcMMO uses Maven 3 to manage dependancies, packaging, and shading of necessary classes; Maven 3 is required to compile mcMMO.
|
||||
mcMMO uses Maven 3 to manage dependencies, packaging, and shading of necessary classes; Maven 3 is required to compile mcMMO.
|
||||
|
||||
The typical command used to build mcMMO is: `mvn clean package install`
|
||||
|
||||
|
||||
439
extras/mods/1.6.x/LOTR.armor.yml
Executable file
439
extras/mods/1.6.x/LOTR.armor.yml
Executable file
@@ -0,0 +1,439 @@
|
||||
# Lord of the Rings mod config by Dragyn
|
||||
# Built against version [1.6.4] The Lord of the Rings Mod Public Beta 11.1
|
||||
#
|
||||
#
|
||||
# Settings for Boots
|
||||
###
|
||||
Boots:
|
||||
# Bronze
|
||||
X12015:
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Orc
|
||||
X12035:
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Gondorian
|
||||
X12060:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Mithril
|
||||
X12064:
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Elven
|
||||
X12088:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Warg
|
||||
X12098:
|
||||
Repairable: true
|
||||
Repair_Material: X12094
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dwarven
|
||||
X12129:
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Galven
|
||||
X12134:
|
||||
Repairable: true
|
||||
Repair_Material: X12130
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Uruk
|
||||
X12161:
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Wood Elf
|
||||
X12176:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Ancient
|
||||
X12180:
|
||||
Repairable: true
|
||||
Repair_Material: X12179
|
||||
Repair_Material_Data_Value: 3
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rohirric
|
||||
X12187:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rangers
|
||||
X12206:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dunlending
|
||||
X12210:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Morgul
|
||||
X12222:
|
||||
Repairable: true
|
||||
Repair_Material: X12217
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Chestplates
|
||||
###
|
||||
Chestplates:
|
||||
# Bronze
|
||||
X12013:
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Orc
|
||||
X12033:
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Gondorian
|
||||
X12058:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Mithril
|
||||
X12062:
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Elven
|
||||
X12086:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Warg
|
||||
X12096:
|
||||
Repairable: true
|
||||
Repair_Material: X12094
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dwarven
|
||||
X12127:
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Galven
|
||||
X12132:
|
||||
Repairable: true
|
||||
Repair_Material: X12130
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Uruk
|
||||
X12159:
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Wood Elf
|
||||
X12174:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Ancient
|
||||
X12178:
|
||||
Repairable: true
|
||||
Repair_Material: X12179
|
||||
Repair_Material_Data_Value: 3
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rohirric
|
||||
X12185:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rangers
|
||||
X12204:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dunlending
|
||||
X12208:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Morgul
|
||||
X12220:
|
||||
Repairable: true
|
||||
Repair_Material: X12217
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Helmets
|
||||
###
|
||||
Helmets:
|
||||
# Bronze
|
||||
X12012:
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Orc
|
||||
X12032:
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Gondorian
|
||||
X12057:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Mithril
|
||||
X12061:
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Elven
|
||||
X12085:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Warg
|
||||
X12095:
|
||||
Repairable: true
|
||||
Repair_Material: X12094
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dwarven
|
||||
X12126:
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Galven
|
||||
X12131:
|
||||
Repairable: true
|
||||
Repair_Material: X12130
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Uruk
|
||||
X12158:
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Wood Elf
|
||||
X12173:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Ancient
|
||||
X12177:
|
||||
Repairable: true
|
||||
Repair_Material: X12179
|
||||
Repair_Material_Data_Value: 3
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rohirric
|
||||
X12184:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rangers
|
||||
X12203:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dunlending
|
||||
X12207:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Morgul
|
||||
X12219:
|
||||
Repairable: true
|
||||
Repair_Material: X12217
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Leggings
|
||||
###
|
||||
Leggings:
|
||||
# Bronze
|
||||
X12014:
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Orc
|
||||
X12034:
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Gondorian
|
||||
X12059:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Mithril
|
||||
X12063:
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Elven
|
||||
X12087:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Warg
|
||||
X12097:
|
||||
Repairable: true
|
||||
Repair_Material: X12094
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dwarven
|
||||
X12128:
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Galven
|
||||
X12133:
|
||||
Repairable: true
|
||||
Repair_Material: X12130
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Uruk
|
||||
X12160:
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Wood Elf
|
||||
X12175:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Ancient
|
||||
X12179:
|
||||
Repairable: true
|
||||
Repair_Material: X12179
|
||||
Repair_Material_Data_Value: 3
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rohirric
|
||||
X12186:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Rangers
|
||||
X12205:
|
||||
Repairable: true
|
||||
Repair_Material: LEATHER
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Dunlending
|
||||
X12209:
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Morgul
|
||||
X12221:
|
||||
Repairable: true
|
||||
Repair_Material: X12217
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
211
extras/mods/1.6.x/LOTR.blocks.yml
Executable file
211
extras/mods/1.6.x/LOTR.blocks.yml
Executable file
@@ -0,0 +1,211 @@
|
||||
# Lord of the Rings mod config by Skuli (Updated by Dragyn)
|
||||
# Built against version [1.6.4] The Lord of the Rings Mod Public Beta 11.1
|
||||
#
|
||||
# Settings for Custom Excavation Blocks
|
||||
###
|
||||
Excavation:
|
||||
Block_1|0:
|
||||
XP_Gain: 99
|
||||
Double_Drops_Enabled: true
|
||||
Block_2|0:
|
||||
XP_Gain: 99
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
#
|
||||
# Settings for Custom Herbalism Blocks
|
||||
###
|
||||
Herbalism:
|
||||
|
||||
# Shireheather
|
||||
X1813:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Simbelmyne
|
||||
X1805:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Asphodel
|
||||
X1895:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Bluebell
|
||||
X1867:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Clover
|
||||
X1873:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: false
|
||||
|
||||
# Dead Marsh Plant
|
||||
X1886:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: false
|
||||
|
||||
# DwarfWort
|
||||
X1902:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Elanor
|
||||
X1833:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Lettuce Crop
|
||||
X1830:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Morgul Shroom
|
||||
X1870:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Niphredil
|
||||
X1834:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Pipeweed Crop
|
||||
X1823:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
# Pipeweed Plant
|
||||
X1822:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
|
||||
# Mithril
|
||||
X1803:
|
||||
XP_Gain: 2000
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: true
|
||||
# Naurite
|
||||
X1818:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
#Glowstone Ore
|
||||
X1859:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
# Remains
|
||||
X1885:
|
||||
XP_Gain: 1800
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
# Gulduril
|
||||
X1887:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
# Quendite
|
||||
X1846:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
|
||||
# MorgulIron
|
||||
X1819:
|
||||
XP_Gain: 25
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
# Rohan Rock
|
||||
X180|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
|
||||
|
||||
#Gondor Stone
|
||||
X180|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
|
||||
# Mordor Stone
|
||||
X180|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: false
|
||||
Is_Ore: false
|
||||
|
||||
#
|
||||
# Settings for Custom Woodcutting Blocks
|
||||
###
|
||||
Woodcutting:
|
||||
# Shire Pine
|
||||
X1806|0:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Mallorn
|
||||
X1806|1:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Apple
|
||||
X1860|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Pear
|
||||
X1860|1:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Cherry
|
||||
X1860|2:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Mirkwood
|
||||
X1806|2:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Charred
|
||||
X1806|3:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Lebethron
|
||||
X1896|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
# Beech
|
||||
X1896|1:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
|
||||
#
|
||||
# Settings for Custom Ability Blocks
|
||||
# (These blocks don't trigger abilities)
|
||||
###
|
||||
Ability_Blocks:
|
||||
Block_1|0:
|
||||
Block_2|0:
|
||||
700
extras/mods/1.6.x/LOTR.tools.yml
Executable file
700
extras/mods/1.6.x/LOTR.tools.yml
Executable file
@@ -0,0 +1,700 @@
|
||||
# Lord of the Rings mod config by Skuli (Updated by Dragyn)
|
||||
# Built against version [1.6.4] The Lord of the Rings Mod Public Beta 11.1
|
||||
|
||||
Axes:
|
||||
#DwarvenThrowingAxe
|
||||
X12146:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 451
|
||||
#UrukWarhammer
|
||||
X12156:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 391
|
||||
#Gondorian Warhammer
|
||||
X12140:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 281
|
||||
#UrukBattleaxe
|
||||
X12155:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 391
|
||||
#MithrilBattleaxe
|
||||
X12138:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 2479
|
||||
#MithrilWarhamer
|
||||
X12139:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 2479
|
||||
#OrcWarhammer
|
||||
X12125:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 261
|
||||
#Dwarven Warhammer
|
||||
X12120:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 451
|
||||
#DwarvenZbattleaxe
|
||||
X12119:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 451
|
||||
#BronzeAxe
|
||||
X12009:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 197
|
||||
#MithrilAxe
|
||||
X12050:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 2479
|
||||
#MallornAxe
|
||||
X12075:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 121
|
||||
#Elven Axe
|
||||
X12080:
|
||||
XP_Modifer: 2
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 313
|
||||
#DwarvenAxe
|
||||
X12115:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 450
|
||||
#OrcAxe
|
||||
X12123:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 261
|
||||
#UrukAxe
|
||||
X12150:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 391
|
||||
Bows:
|
||||
#ElvenBow
|
||||
X12093:
|
||||
XP_Modifer: 2
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 9
|
||||
Durability: 485
|
||||
#mallornbow
|
||||
X12084:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 417
|
||||
#orcBow
|
||||
X12099:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 441
|
||||
#UrukCrossbow
|
||||
X12163:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 471
|
||||
#MithrilCrossbow
|
||||
X12171:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 1761
|
||||
#IronCrossbow
|
||||
X12170:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 9
|
||||
Durability: 357
|
||||
#BowofMirkwood
|
||||
X12177:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X1806
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 417
|
||||
Hoes:
|
||||
#BronzeHoe
|
||||
X12011:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 197
|
||||
#MithrilHoe
|
||||
X12052:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 2479
|
||||
#MallornHoe
|
||||
X12077:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 1
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 121
|
||||
#CopperHoe
|
||||
X26511:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X26507
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 180
|
||||
#ElvenHoe
|
||||
X12082:
|
||||
XP_Modifer: 2
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12082
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#DwarvenHoe
|
||||
X12117:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X26507
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 180
|
||||
Pickaxes:
|
||||
#MEBronzePickaxe
|
||||
X12008:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 197
|
||||
#MithrilPixkaxe
|
||||
X12049:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 2479
|
||||
#MallornPickaxe
|
||||
X12074:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 121
|
||||
#ElvenPickaxe
|
||||
X12079:
|
||||
XP_Modifer: 2
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 313
|
||||
#DwarvenPickaxe
|
||||
X12114:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 451
|
||||
#UrukPickaxe
|
||||
X12149:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 391
|
||||
#OrcPickaxe
|
||||
X12122:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 3
|
||||
Durability: 261
|
||||
Shovels:
|
||||
#BronzeShovel
|
||||
X12007:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 197
|
||||
#MithrilShovel
|
||||
X12048:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 2479
|
||||
#MallornShovel
|
||||
X12073:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 1
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 121
|
||||
#ElvenShovel
|
||||
X12078:
|
||||
XP_Modifer: 2
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12082
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 313
|
||||
#DwarvenShovel
|
||||
X12113:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 451
|
||||
#UrukShovel
|
||||
X12148:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 391
|
||||
#OrcShovel
|
||||
X12121:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 261
|
||||
|
||||
Swords:
|
||||
#Uruk Dagger
|
||||
X12153:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#Poisoned urukd agger
|
||||
X12154:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#Uruk Spear
|
||||
X12157:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 391
|
||||
#Rohirric Sword
|
||||
X12181:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 251
|
||||
#Rohirric Dagger
|
||||
X12182:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 201
|
||||
#Rohirric Spear
|
||||
X12183:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 251
|
||||
#Dunlending Spear
|
||||
X12212:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 251
|
||||
#Uruk Scimitar
|
||||
X12151:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12147
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 391
|
||||
#Mithril Dagger
|
||||
X12137:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1983
|
||||
#Iron Dagger
|
||||
X12136:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 201
|
||||
#Dwarven Dagger
|
||||
X12118:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 361
|
||||
#Dwarven Sword
|
||||
X12116:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12112
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 451
|
||||
#Elven Sword
|
||||
X12081:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#Elven Spear
|
||||
X12083:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#Anduril
|
||||
X12070:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 4
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 313
|
||||
#Mallorn Sword
|
||||
X12076:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X1801
|
||||
Repair_Material_Data_Value: 1
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 121
|
||||
#Mithril Spear
|
||||
X12069:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 4
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 2479
|
||||
#Iron Spear
|
||||
X12068:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: IRON_INGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 251
|
||||
#Orc Spear
|
||||
X12066:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 261
|
||||
#Bronze Spear
|
||||
X12067:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 197
|
||||
#Gondor Spear
|
||||
X12065:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 281
|
||||
#Gondor Sword
|
||||
X12056:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: false
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 281
|
||||
#Orc Scimitar
|
||||
X12031:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12036
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 261
|
||||
#Steel Sword
|
||||
X26862:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X26857
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 751
|
||||
#Bronze Sword
|
||||
X12010:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X12004
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 1
|
||||
Durability: 197
|
||||
#Mithril Sword
|
||||
X12051:
|
||||
XP_Modifer: 1
|
||||
Ability_Enabled: true
|
||||
Tier: 4
|
||||
Repairable: true
|
||||
Repair_Material: X12006
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 2479
|
||||
182
extras/mods/1.6.x/extrabiomesxl.blocks.yml
Executable file
182
extras/mods/1.6.x/extrabiomesxl.blocks.yml
Executable file
@@ -0,0 +1,182 @@
|
||||
# Config created by Dragyn
|
||||
# Created For ExtrabiomesXL-universal-1.6.4-3.14.5
|
||||
|
||||
#
|
||||
# Settings for Custom Excavation Blocks
|
||||
###
|
||||
Excavation:
|
||||
# Quicksand
|
||||
X2214|0:
|
||||
XP_Gain: 40
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
|
||||
#
|
||||
# Settings for Custom Herbalism Blocks
|
||||
###
|
||||
Herbalism:
|
||||
# Cattails
|
||||
X2201|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
# Hydrangea
|
||||
X2202|1:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
# Buttercups
|
||||
X2202|2:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
# Lavender
|
||||
X2202|3:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
# Tiny Cactus
|
||||
X2202|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
# Toadstool
|
||||
X2202|6:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
# Calla Lillies
|
||||
X2202|7:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
X254|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
X254|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
#
|
||||
# Settings for Custom Woodcutting Blocks
|
||||
###
|
||||
Woodcutting:
|
||||
# Fir
|
||||
X2208|0:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Acacia
|
||||
X2208|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Cypress
|
||||
X2208|2:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Japanese Maple
|
||||
X2208|3:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Redwood Quarter
|
||||
X2209|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2211|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2212|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2213|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Fir Quarters
|
||||
X2209|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2211|1:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2212|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2213|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Oak Quarters
|
||||
X2209|2:
|
||||
XP_Gain: 70
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2211|2:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2212|2:
|
||||
XP_Gain: 70
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2213|2:
|
||||
XP_Gain: 70
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Acacia
|
||||
X2209|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Cypress
|
||||
X2209|2:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Bald Cypress Quarter
|
||||
X2225|0:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Bald Cypress Elbow
|
||||
X2227|0:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Bald Cypress Log
|
||||
X2231|2:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Rainbow Eucalyptus
|
||||
X2228|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2229|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X2231|0:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Autumn Log
|
||||
X2231|1:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Sakura Log
|
||||
X2238|0:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
71
extras/mods/1.6.x/galacticraft.armor.yml
Executable file
71
extras/mods/1.6.x/galacticraft.armor.yml
Executable file
@@ -0,0 +1,71 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Galacticraft-1.6.4-2.0.7.904 and Galacticraft-Planets-1.6.4-2.0.7.904
|
||||
#
|
||||
# Settings for Boots
|
||||
###
|
||||
Boots:
|
||||
# Heavy Duty
|
||||
X10149:
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
X10171:
|
||||
Repairable: true
|
||||
Repair_Material: X10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 999
|
||||
#
|
||||
# Settings for Chestplates
|
||||
###
|
||||
Chestplates:
|
||||
# Heavy Duty
|
||||
X10147:
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
X10169:
|
||||
Repairable: true
|
||||
Repair_Material: X10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 999
|
||||
#
|
||||
# Settings for Helmets
|
||||
###
|
||||
Helmets:
|
||||
# Heavy Duty
|
||||
X10146:
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
X10168:
|
||||
Repairable: true
|
||||
Repair_Material: X10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 999
|
||||
#
|
||||
# Settings for Leggings
|
||||
###
|
||||
Leggings:
|
||||
# Heavy Duty
|
||||
X10148:
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
X10170:
|
||||
Repairable: true
|
||||
Repair_Material: X10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 999
|
||||
|
||||
98
extras/mods/1.6.x/galacticraft.blocks.yml
Executable file
98
extras/mods/1.6.x/galacticraft.blocks.yml
Executable file
@@ -0,0 +1,98 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Galacticraft-1.6.4-2.0.7.904 and Galacticraft-Planets-1.6.4-2.0.7.904
|
||||
#
|
||||
# Settings for Custom Excavation Blocks
|
||||
###
|
||||
Excavation:
|
||||
# Dirt
|
||||
X3347|3:
|
||||
XP_Gain: 40
|
||||
Double_Drops_Enabled: true
|
||||
Block_2|0:
|
||||
XP_Gain: 99
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
# Copper Ore
|
||||
X3347|0:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
X3372|5:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
X3390|0:
|
||||
XP_Gain: 550
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Tin Ore
|
||||
X3347|1:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
X3372|6:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
X3390|1:
|
||||
XP_Gain: 550
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Aluminum Ore
|
||||
X3372|7:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Silicon Ore
|
||||
X3372|8:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Cheese Ore
|
||||
X3347|2:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Iron Ore
|
||||
X3390|3:
|
||||
XP_Gain: 550
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Desh Ore
|
||||
X3390|2:
|
||||
XP_Gain: 600
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Moon Stone
|
||||
X3347|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Moon Turf
|
||||
X3347|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Mars Cobblestone
|
||||
X3390|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Mars Rock/Stone
|
||||
X3390|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X3390|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X3390|9:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
123
extras/mods/1.6.x/galacticraft.tools.yml
Executable file
123
extras/mods/1.6.x/galacticraft.tools.yml
Executable file
@@ -0,0 +1,123 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Galacticraft-1.6.4-2.0.7.904 and Galacticraft-Planets-1.6.4-2.0.7.904
|
||||
#
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
# Heavy Duty
|
||||
X10145:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Desh
|
||||
X10167:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: 10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1000
|
||||
|
||||
#
|
||||
# Settings for Hoes
|
||||
###
|
||||
Hoes:
|
||||
# Heavy Duty
|
||||
X10144:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Desh
|
||||
X10166:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: 10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1000
|
||||
#
|
||||
# Settings for Pickaxes
|
||||
###
|
||||
Pickaxes:
|
||||
# Heavy Duty
|
||||
X10142:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Desh
|
||||
X10164:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: 10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1000
|
||||
#
|
||||
# Settings for Shovels
|
||||
###
|
||||
Shovels:
|
||||
# Heavy Duty
|
||||
X10143:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Desh
|
||||
X10165:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: 10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1000
|
||||
#
|
||||
# Settings for Swords
|
||||
###
|
||||
Swords:
|
||||
# Heavy Duty
|
||||
X10141:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 4
|
||||
Repairable: true
|
||||
Repair_Material: X10150
|
||||
Repair_Material_Data_Value: 9
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Desh
|
||||
X10163:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: 10161
|
||||
Repair_Material_Data_Value: 2
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 1000
|
||||
1018
extras/mods/1.6.x/metallurgy3.armor.yml
Executable file
1018
extras/mods/1.6.x/metallurgy3.armor.yml
Executable file
File diff suppressed because it is too large
Load Diff
185
extras/mods/1.6.x/metallurgy3.blocks.yml
Executable file
185
extras/mods/1.6.x/metallurgy3.blocks.yml
Executable file
@@ -0,0 +1,185 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Metallurgy-1.6.4-3.3.1
|
||||
#
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
# Copper
|
||||
X900|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Tin
|
||||
X900|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Zinc
|
||||
X902|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Silver
|
||||
X902|1:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Platinum
|
||||
X902|3:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
|
||||
# NETHER ORES
|
||||
# Ignatius
|
||||
X903|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Shadow Iron
|
||||
X903|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Lemurite
|
||||
X903|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Midasium
|
||||
X903|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Vyroxeres
|
||||
X903|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Ceruclase
|
||||
X903|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Alduorite
|
||||
X903|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Kalendrite
|
||||
X903|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Vulcanite
|
||||
X903|8:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Sanguinite
|
||||
X903|9:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
|
||||
# Manganese
|
||||
X900|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Eximite
|
||||
X900|5:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Meutoite
|
||||
X900|6:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Sulfur
|
||||
X905|7:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Phosphorite
|
||||
X905|8:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Saltpeter
|
||||
X905|9:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Magnesium
|
||||
X905|10:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Bitumen
|
||||
X905|11:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Potash
|
||||
X905|12:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Prometheum
|
||||
X906|0:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Deep Iron
|
||||
X906|1:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Infuscolium
|
||||
X906|2:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Oureclase
|
||||
X906|4:
|
||||
XP_Gain: 650
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Astral Silver
|
||||
X906|5:
|
||||
XP_Gain: 650
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Carmot
|
||||
X906|6:
|
||||
XP_Gain: 350
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Mithril
|
||||
X906|7:
|
||||
XP_Gain: 750
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Rubracium
|
||||
X906|8:
|
||||
XP_Gain: 800
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Orichalcum
|
||||
X906|11:
|
||||
XP_Gain: 900
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Adamantine
|
||||
X906|13:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
# Atlarus
|
||||
X906|14:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: true
|
||||
1807
extras/mods/1.6.x/metallurgy3.tools.yml
Normal file
1807
extras/mods/1.6.x/metallurgy3.tools.yml
Normal file
File diff suppressed because it is too large
Load Diff
44
extras/mods/1.6.x/railcraft.armor.yml
Executable file
44
extras/mods/1.6.x/railcraft.armor.yml
Executable file
@@ -0,0 +1,44 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Railcraft_1.6.2-8.1.0.0
|
||||
#
|
||||
#
|
||||
# Settings for Boots
|
||||
###
|
||||
Boots:
|
||||
X7758:
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Chestplates
|
||||
###
|
||||
Chestplates:
|
||||
X7761:
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Helmets
|
||||
###
|
||||
Helmets:
|
||||
X7759:
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Leggings
|
||||
###
|
||||
Leggings:
|
||||
X7760:
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
103
extras/mods/1.6.x/railcraft.blocks.yml
Executable file
103
extras/mods/1.6.x/railcraft.blocks.yml
Executable file
@@ -0,0 +1,103 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Railcraft_1.6.2-8.1.0.0
|
||||
#
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
# Abyssal Stone
|
||||
X457|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Quarried Stone
|
||||
X457|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Sulfur
|
||||
X458|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Saltpeter
|
||||
X458|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Dark Diamond
|
||||
X458|2:
|
||||
XP_Gain: 750
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Dark Emerald
|
||||
X458|3:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Dark Lapis
|
||||
X458|4:
|
||||
XP_Gain: 400
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Firestone
|
||||
X458|5:
|
||||
XP_Gain: 450
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Infernal Stone
|
||||
X467|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X467|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Blood Stained Stone
|
||||
X468|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X468|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Sandy Stone
|
||||
X469|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X469|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Quarried Stone
|
||||
X471|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X471|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Frost Bound Stone
|
||||
X472|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X472|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
# Nether Stone
|
||||
X475|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X475|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
|
||||
76
extras/mods/1.6.x/railcraft.tools.yml
Executable file
76
extras/mods/1.6.x/railcraft.tools.yml
Executable file
@@ -0,0 +1,76 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Railcraft_1.6.2-8.1.0.0
|
||||
#
|
||||
#
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
# Steel
|
||||
X7819:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
|
||||
#
|
||||
# Settings for Hoes
|
||||
###
|
||||
Hoes:
|
||||
# Steel
|
||||
X7820:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Pickaxes
|
||||
###
|
||||
Pickaxes:
|
||||
# Steel
|
||||
X7821:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Shovels
|
||||
###
|
||||
Shovels:
|
||||
# Steel
|
||||
X7823:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Swords
|
||||
###
|
||||
Swords:
|
||||
# Steel
|
||||
X7824:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X7796
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
543
extras/mods/1.6.x/simcraft.blocks.yml
Executable file
543
extras/mods/1.6.x/simcraft.blocks.yml
Executable file
@@ -0,0 +1,543 @@
|
||||
# Config created by Dragyn
|
||||
# Created For SimCraft 1.6.4
|
||||
#
|
||||
#
|
||||
# Settings for Custom Herbalism Blocks
|
||||
###
|
||||
Herbalism:
|
||||
X705|0:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|1:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|2:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|3:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|4:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|5:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|6:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|7:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|8:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|9:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|10:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|11:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|12:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|13:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|14:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X705|15:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|0:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|1:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|2:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|3:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|4:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|5:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|6:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|7:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|8:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|9:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|10:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|11:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|12:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|13:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|14:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X706|15:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|0:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|1:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|2:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|3:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|4:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|5:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|6:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|7:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|8:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|9:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|10:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|11:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|12:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|13:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|14:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
X707|15:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
X700|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|8:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|9:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|10:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|11:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|12:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|13:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|14:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X700|15:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|0:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|1:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|2:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|3:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|4:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|5:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|6:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|7:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|8:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|9:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|10:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|11:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|12:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|13:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|14:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X701|15:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|8:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|9:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|10:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|11:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|12:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|13:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|14:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X702|15:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|8:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|9:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|10:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|11:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|12:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|13:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|14:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X703|15:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|8:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|9:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|10:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|11:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|12:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|13:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|14:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X704|15:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
#
|
||||
# Settings for Custom Woodcutting Blocks
|
||||
###
|
||||
Woodcutting:
|
||||
X708|0:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|2:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|3:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|4:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|5:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|6:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|7:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|8:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|9:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|10:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X708|11:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X1095|0:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X1095|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X1095|2:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
X1095|3:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
61
extras/mods/1.6.x/simcraft.tools.yml
Executable file
61
extras/mods/1.6.x/simcraft.tools.yml
Executable file
@@ -0,0 +1,61 @@
|
||||
# Config created by Dragyn
|
||||
# Created For Railcraft_1.6.2-8.1.0.0
|
||||
#
|
||||
#
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
# Steel
|
||||
X15787:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X15260
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
|
||||
#
|
||||
# Settings for Pickaxes
|
||||
###
|
||||
Pickaxes:
|
||||
# Steel
|
||||
X15788:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X15260
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Shovels
|
||||
###
|
||||
Shovels:
|
||||
# Steel
|
||||
X15789:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X15260
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Swords
|
||||
###
|
||||
Swords:
|
||||
# Steel
|
||||
X15786:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X15260
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
134
extras/mods/1.6.x/twilightforest.armor.yml
Executable file
134
extras/mods/1.6.x/twilightforest.armor.yml
Executable file
@@ -0,0 +1,134 @@
|
||||
# Config created by Dragyn
|
||||
# Created For twilightforest-1.20.3
|
||||
#
|
||||
#
|
||||
# Settings for Boots
|
||||
###
|
||||
Boots:
|
||||
# Ironwood
|
||||
X27978:
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27995:
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
X28002:
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28037:
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Chestplates
|
||||
###
|
||||
Chestplates:
|
||||
# Ironwood
|
||||
X27976:
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27993:
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
X28000:
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28035:
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Helmets
|
||||
###
|
||||
Helmets:
|
||||
# Ironwood
|
||||
X27975:
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27992:
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
X27999:
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28034:
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Leggings
|
||||
###
|
||||
Leggings:
|
||||
# Ironwood
|
||||
X27977:
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27994:
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
X28001:
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28036:
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
117
extras/mods/1.6.x/twilightforest.blocks.yml
Executable file
117
extras/mods/1.6.x/twilightforest.blocks.yml
Executable file
@@ -0,0 +1,117 @@
|
||||
# Config created by Dragyn
|
||||
# Created For twilightforest-1.20.3
|
||||
#
|
||||
#
|
||||
# Settings for Custom Herbalism Blocks
|
||||
###
|
||||
Herbalism:
|
||||
# Mushgloom
|
||||
X2169|9:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
# Torchberry Plant
|
||||
X2169|13:
|
||||
XP_Gain: 20
|
||||
Double_Drops_Enabled: true
|
||||
# Mayapple
|
||||
X2169|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
# Fiddlehead
|
||||
X2169|8:
|
||||
XP_Gain: 35
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
# Mazestone
|
||||
X2165|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2165|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
#
|
||||
# Settings for Custom Woodcutting Blocks
|
||||
###
|
||||
Woodcutting:
|
||||
# Twilight Oak
|
||||
X2163|0:
|
||||
XP_Gain: 70
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Canopy
|
||||
X2163|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Mangrove
|
||||
X2163|2:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Darkwood
|
||||
X2163|3:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Roots
|
||||
X2170|0:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: false
|
||||
X2170|1:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: false
|
||||
# Timewood
|
||||
X2176|0:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Transwood
|
||||
X2176|1:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Minewood
|
||||
X2176|2:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Sortingwood
|
||||
X2176|3:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
|
||||
186
extras/mods/1.6.x/twilightforest.tools.yml
Executable file
186
extras/mods/1.6.x/twilightforest.tools.yml
Executable file
@@ -0,0 +1,186 @@
|
||||
# Config created by Dragyn
|
||||
# Created For twilightforest-1.20.3
|
||||
#
|
||||
#
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
# Ironwood
|
||||
X27982:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
X31989:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28040:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Minotaur
|
||||
X31984:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X264
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
|
||||
#
|
||||
# Settings for Hoes
|
||||
###
|
||||
Hoes:
|
||||
# Ironwood
|
||||
X27983:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
X31988:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Pickaxes
|
||||
###
|
||||
Pickaxes:
|
||||
# Ironwood
|
||||
X27981:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27997:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
X28005:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28039:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Shovels
|
||||
###
|
||||
Shovels:
|
||||
# Ironwood
|
||||
X27980:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
X28004:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Swords
|
||||
###
|
||||
Swords:
|
||||
# Ironwood
|
||||
X27979:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27974
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
X27996:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27991
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
X28003:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X27998
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
X28038:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: X28032
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
171
extras/mods/1.6.x/underground_biomes.blocks.yml
Executable file
171
extras/mods/1.6.x/underground_biomes.blocks.yml
Executable file
@@ -0,0 +1,171 @@
|
||||
# Config created by Dragyn
|
||||
# Created For UndergroundBiomes 1.6.x - 0.4.2c
|
||||
#
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
X2000|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2000|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
#
|
||||
X2001|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2001|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
#
|
||||
X2009|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2009|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
#
|
||||
X2010|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2010|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
#
|
||||
X2011|0:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|1:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|2:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|3:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|4:
|
||||
XP_Gain: 50
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|5:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|6:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
X2011|7:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
132
extras/mods/1.7.x/twilightforest.armor.yml
Normal file
132
extras/mods/1.7.x/twilightforest.armor.yml
Normal file
@@ -0,0 +1,132 @@
|
||||
# Config created by joulesbeef
|
||||
# Created For twilightforest-2.2.3
|
||||
#
|
||||
#
|
||||
# Settings for Boots
|
||||
###
|
||||
Boots:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODBOOTS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYBOOTS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFBOOTS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYBOOTS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Chestplates
|
||||
###
|
||||
Chestplates:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODPLATE:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYPLATE:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFPLATE:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYPLATE:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Helmets
|
||||
###
|
||||
Helmets:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODHELM:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYHELM:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFHELM:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYHELM:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 50
|
||||
# Settings for Leggings
|
||||
###
|
||||
Leggings:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODLEGS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYLEGS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Stealeaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFLEGS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYLEGS:
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
116
extras/mods/1.7.x/twilightforest.blocks.yml
Normal file
116
extras/mods/1.7.x/twilightforest.blocks.yml
Normal file
@@ -0,0 +1,116 @@
|
||||
# Config created by joulesbeef
|
||||
# Created For twilightforest-2.2.3
|
||||
#
|
||||
#
|
||||
# Settings for Custom Herbalism Blocks
|
||||
###
|
||||
Herbalism:
|
||||
# Mushgloom
|
||||
TWILIGHTFOREST_TILE_TFLOG|9:
|
||||
XP_Gain: 150
|
||||
Double_Drops_Enabled: true
|
||||
# Torchberry Plant
|
||||
TWILIGHTFOREST_TILE_TFLOG|13:
|
||||
XP_Gain: 20
|
||||
Double_Drops_Enabled: true
|
||||
# Mayapple
|
||||
TWILIGHTFOREST_TILE_TFLOG|4:
|
||||
XP_Gain: 30
|
||||
Double_Drops_Enabled: true
|
||||
# Fiddlehead
|
||||
TWILIGHTFOREST_TILE_TFLOG|8:
|
||||
XP_Gain: 35
|
||||
Double_Drops_Enabled: true
|
||||
|
||||
|
||||
#
|
||||
# Settings for Custom Mining Blocks
|
||||
###
|
||||
Mining:
|
||||
# Mazestone
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|0:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|1:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|2:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|3:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|4:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|5:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|6:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
TWILIGHTFOREST_TILE_TFMAZESTONE|7:
|
||||
XP_Gain: 250
|
||||
Double_Drops_Enabled: true
|
||||
Is_Ore: false
|
||||
|
||||
#
|
||||
# Settings for Custom Woodcutting Blocks
|
||||
###
|
||||
Woodcutting:
|
||||
# Twilight Oak
|
||||
TWILIGHTFOREST_TILE_TFLOG|0:
|
||||
XP_Gain: 70
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Canopy
|
||||
TWILIGHTFOREST_TILE_TFLOG|1:
|
||||
XP_Gain: 80
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Mangrove
|
||||
TWILIGHTFOREST_TILE_TFLOG|2:
|
||||
XP_Gain: 90
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Darkwood
|
||||
TWILIGHTFOREST_TILE_TFLOG|3:
|
||||
XP_Gain: 100
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Roots
|
||||
TWILIGHTFOREST_TILE_TFROOTS|0:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: false
|
||||
TWILIGHTFOREST_TILE_TFROOTS|1:
|
||||
XP_Gain: 10
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: false
|
||||
# Timewood
|
||||
TWILIGHTFOREST_TILE_TFMAGICLOG|0:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Transwood
|
||||
TWILIGHTFOREST_TILE_TFMAGICLOG|1:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Minewood
|
||||
TWILIGHTFOREST_TILE_TFMAGICLOG|2:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
# Sortingwood
|
||||
TWILIGHTFOREST_TILE_TFMAGICLOG|3:
|
||||
XP_Gain: 1000
|
||||
Double_Drops_Enabled: true
|
||||
Is_Log: true
|
||||
152
extras/mods/1.7.x/twilightforest.entities.yml
Normal file
152
extras/mods/1.7.x/twilightforest.entities.yml
Normal file
@@ -0,0 +1,152 @@
|
||||
# Config created by joulesbeef
|
||||
# Created For twilightforest-2.2.3
|
||||
#
|
||||
# Settings for Custom Mobs
|
||||
MoCreatures-Ogre:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-TwilightLich:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-HelmetCrab:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-SlimeBeetle:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-TwilightWraith:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-Naga:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
MoCreatures-Shark:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-TowerTermite:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
MoCreatures-SmallFish:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-Redcap:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-YetiBoss:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
MoCreatures-HellRat:
|
||||
Class: Monster
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-Hydra:
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-Firefly:
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-KnightPhantom:
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
TwilightForest-TowerGolem:
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
MoCreatures-FishBowl:
|
||||
XP_Multiplier: 1.0
|
||||
Tameable: false
|
||||
Taming_XP: 0
|
||||
CanBeSummoned: false
|
||||
COTW_Material: ''
|
||||
COTW_Material_Data: 0
|
||||
COTW_Material_Amount: 0
|
||||
184
extras/mods/1.7.x/twilightforest.tools.yml
Normal file
184
extras/mods/1.7.x/twilightforest.tools.yml
Normal file
@@ -0,0 +1,184 @@
|
||||
# Config created by joulesbeef
|
||||
# Created For twilightforest-2.2.3
|
||||
#
|
||||
#
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODAXE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFAXE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYAXE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Minotaur
|
||||
TWILIGHTFOREST_ITEM_MINOTAURAXE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: Diamond
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Hoes
|
||||
###
|
||||
Hoes:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODHOE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFHOE:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
|
||||
#
|
||||
# Settings for Pickaxes
|
||||
###
|
||||
Pickaxes:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODPICK:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYPICK:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFPICK:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYPICK:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Shovels
|
||||
###
|
||||
Shovels:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODSHOVEL:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFSHOVEL:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
#
|
||||
# Settings for Swords
|
||||
###
|
||||
Swords:
|
||||
# Ironwood
|
||||
TWILIGHTFOREST_ITEM_IRONWOODSWORD:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Fiery
|
||||
TWILIGHTFOREST_ITEM_FIERYSWORD:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Steeleaf
|
||||
TWILIGHTFOREST_ITEM_STEELEAFSWORD:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
# Knightmetal
|
||||
TWILIGHTFOREST_ITEM_KNIGHTLYSWORD:
|
||||
XP_Modifer: 1.0
|
||||
Ability_Enabled: true
|
||||
Tier: 1
|
||||
Repairable: true
|
||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
||||
Repair_Material_Data_Value: 0
|
||||
Repair_Material_Quantity: 2
|
||||
Durability: 500
|
||||
14
pom.xml
14
pom.xml
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>1.4.08-dev1</version>
|
||||
<version>1.5.01-SNAPSHOT</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<issueManagement>
|
||||
@@ -108,6 +108,10 @@
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>md_5-releases</id>
|
||||
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>Plugin MetricsExtension</id>
|
||||
<url>http://repo.turt2live.com</url>
|
||||
@@ -135,9 +139,13 @@
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>mcmmo-repo</id>
|
||||
<url>file:///var/lib/jenkins/repo</url>
|
||||
<id>md_5-releases</id>
|
||||
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>md_5-snapshots</id>
|
||||
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.gmail.nossr50.api;
|
||||
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public final class AbilityAPI {
|
||||
@@ -80,4 +82,8 @@ public final class AbilityAPI {
|
||||
public static void setTreeFellerCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.TREE_FELLER, cooldown);
|
||||
}
|
||||
|
||||
public static boolean isBleeding(LivingEntity entity) {
|
||||
return BleedTimerTask.isBleeding(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -43,9 +45,7 @@ public final class ExperienceAPI {
|
||||
public static boolean isNonChildSkill(String skillType) {
|
||||
SkillType skill = SkillType.getSkill(skillType);
|
||||
|
||||
if (skill == null) return false;
|
||||
|
||||
return !skill.isChildSkill();
|
||||
return skill != null && !skill.isChildSkill();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -64,8 +64,26 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addRawXP(Player player, String skillType, float XP) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP);
|
||||
addRawXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds raw XP to the player.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addRawXP(Player player, String skillType, float XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -100,8 +118,26 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addMultipliedXP(Player player, String skillType, int XP) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||
addMultipliedXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate only.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addMultipliedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,10 +167,28 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addModifiedXP(Player player, String skillType, int XP) {
|
||||
addModifiedXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate and skill modifier.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addModifiedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
SkillType skill = getSkillType(skillType);
|
||||
|
||||
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,8 +221,27 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addXP(Player player, String skillType, int XP) {
|
||||
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP);
|
||||
addXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate, skill modifiers, perks, child skills,
|
||||
* and party sharing.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,12 +422,12 @@ public final class ExperienceAPI {
|
||||
profile.addLevels(parentSkill, (levels / parentSkills.size()));
|
||||
}
|
||||
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
profile.addLevels(skill, levels);
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -583,7 +656,7 @@ public final class ExperienceAPI {
|
||||
PlayerProfile profile = getOfflineProfile(playerName);
|
||||
|
||||
profile.addXp(skill, XP);
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
|
||||
private static PlayerProfile getOfflineProfile(String playerName) {
|
||||
@@ -615,4 +688,14 @@ public final class ExperienceAPI {
|
||||
|
||||
return skill;
|
||||
}
|
||||
|
||||
private static XPGainReason getXPGainReason(String reason) throws InvalidXPGainReasonException {
|
||||
XPGainReason xpGainReason = XPGainReason.getXPGainReason(reason);
|
||||
|
||||
if (xpGainReason == null) {
|
||||
throw new InvalidXPGainReasonException();
|
||||
}
|
||||
|
||||
return xpGainReason;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,4 +174,17 @@ public final class PartyAPI {
|
||||
public static List<Player> getOnlineMembers(Player player) {
|
||||
return PartyManager.getOnlineMembers(player);
|
||||
}
|
||||
|
||||
public static boolean hasAlly(String partyName) {
|
||||
return getAllyName(partyName) != null;
|
||||
}
|
||||
|
||||
public static String getAllyName(String partyName) {
|
||||
Party ally = PartyManager.getParty(partyName).getAlly();
|
||||
if (ally != null) {
|
||||
return ally.getName();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
93
src/main/java/com/gmail/nossr50/api/SkillAPI.java
Normal file
93
src/main/java/com/gmail/nossr50/api/SkillAPI.java
Normal file
@@ -0,0 +1,93 @@
|
||||
package com.gmail.nossr50.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
|
||||
public final class SkillAPI {
|
||||
private SkillAPI() {}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This includes parent and child skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getSkills() {
|
||||
return getListFromEnum(Arrays.asList(SkillType.values()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This only includes parent skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getNonChildSkills() {
|
||||
return getListFromEnum(SkillType.NON_CHILD_SKILLS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This only includes child skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getChildSkills() {
|
||||
return getListFromEnum(SkillType.CHILD_SKILLS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This only includes combat skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getCombatSkills() {
|
||||
return getListFromEnum(SkillType.COMBAT_SKILLS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This only includes gathering skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getGatheringSkills() {
|
||||
return getListFromEnum(SkillType.GATHERING_SKILLS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of strings with mcMMO's skills
|
||||
* This only includes misc skills
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return a list of strings with valid skill names
|
||||
*/
|
||||
public static List<String> getMiscSkills() {
|
||||
return getListFromEnum(SkillType.MISC_SKILLS);
|
||||
}
|
||||
|
||||
private static List<String> getListFromEnum(List<SkillType> skillsTypes) {
|
||||
List<String> skills = new ArrayList<String>();
|
||||
|
||||
for (SkillType skillType : skillsTypes) {
|
||||
skills.add(skillType.name());
|
||||
}
|
||||
|
||||
return skills;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.gmail.nossr50.api.exceptions;
|
||||
|
||||
public class InvalidXPGainReasonException extends RuntimeException {
|
||||
private static final long serialVersionUID = 4427052841957931157L;
|
||||
|
||||
public InvalidXPGainReasonException() {
|
||||
super("That is not a valid XPGainReason.");
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.gmail.nossr50.chat;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
||||
import com.gmail.nossr50.runnables.party.PartyChatTask;
|
||||
|
||||
public class PartyChatManager extends ChatManager {
|
||||
private Party party;
|
||||
@@ -26,14 +25,6 @@ public class PartyChatManager extends ChatManager {
|
||||
|
||||
@Override
|
||||
protected void sendMessage() {
|
||||
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||
message = message.replaceFirst(displayName, ChatColor.GOLD + displayName + ChatColor.RESET);
|
||||
}
|
||||
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
member.sendMessage(message);
|
||||
}
|
||||
|
||||
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
|
||||
new PartyChatTask(plugin, party, senderName, displayName, message).runTask(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -10,7 +9,6 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -40,7 +38,7 @@ public class KrakenCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||
@@ -59,7 +57,7 @@ public class KrakenCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.HolidayManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class McmmoCommand implements CommandExecutor {
|
||||
@@ -31,8 +30,11 @@ public class McmmoCommand implements CommandExecutor {
|
||||
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||
HolidayManager.anniversaryCheck(sender);
|
||||
if (Permissions.showversion(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||
}
|
||||
|
||||
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
||||
return true;
|
||||
|
||||
case 1:
|
||||
@@ -43,9 +45,9 @@ public class McmmoCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
|
||||
displayPartyCommands(sender);
|
||||
displayGeneralCommands(sender);
|
||||
displayOtherCommands(sender);
|
||||
|
||||
displayPartyCommands(sender);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -54,55 +56,57 @@ public class McmmoCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyCommands(CommandSender sender) {
|
||||
if (Permissions.party(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||
sender.sendMessage(" /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
||||
sender.sendMessage(" /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
||||
sender.sendMessage(" /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||
private void displayGeneralCommands(CommandSender sender) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||
|
||||
if (Permissions.partyChat(sender)) {
|
||||
sender.sendMessage(" /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||
}
|
||||
if (Permissions.inspect(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||
}
|
||||
|
||||
sender.sendMessage(" /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||
sender.sendMessage(" /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||
|
||||
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
||||
sender.sendMessage(" /party teleport " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||
}
|
||||
if (Permissions.mcability(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||
}
|
||||
}
|
||||
|
||||
private void displayOtherCommands(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
|
||||
sender.sendMessage(" /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||
sender.sendMessage(" /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||
|
||||
if (Permissions.skillreset(sender)) {
|
||||
sender.sendMessage(" /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||
}
|
||||
|
||||
if (Permissions.mcability(sender)) {
|
||||
sender.sendMessage(" /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||
}
|
||||
|
||||
if (Permissions.adminChat(sender)) {
|
||||
sender.sendMessage(" /adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||
}
|
||||
|
||||
if (Permissions.inspect(sender)) {
|
||||
sender.sendMessage(" /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||
}
|
||||
|
||||
if (Permissions.mmoedit(sender)) {
|
||||
sender.sendMessage(" /mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||
}
|
||||
|
||||
if (Permissions.adminChat(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||
}
|
||||
|
||||
if (Permissions.mcgod(sender)) {
|
||||
sender.sendMessage(" /mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||
}
|
||||
}
|
||||
|
||||
sender.sendMessage(" /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||
private void displayPartyCommands(CommandSender sender) {
|
||||
if (Permissions.party(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||
|
||||
if (Permissions.partyChat(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||
|
||||
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party teleport <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -10,7 +9,6 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -39,7 +37,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||
@@ -63,7 +61,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -12,7 +12,9 @@ import org.bukkit.util.StringUtil;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.chat.ChatManager;
|
||||
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
@@ -111,6 +113,11 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chatMode == ChatMode.PARTY && (mcMMOPlayer.getParty().getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT))) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOPlayer.enableChat(chatMode);
|
||||
sender.sendMessage(chatMode.getEnabledMessage());
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.chat.PartyChatManager;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -28,6 +30,11 @@ public class PartyChatCommand extends ChatCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
message = buildChatMessage(args, 0);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.database;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -11,7 +10,6 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -22,9 +20,9 @@ public class McremoveCommand implements TabExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
|
||||
if (UserManager.getPlayer(playerName, true) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||
if (UserManager.getOfflinePlayer(playerName) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +44,7 @@ public class McremoveCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -26,11 +27,11 @@ public class AddlevelsCommand extends ExperienceCommand {
|
||||
profile.addLevels(skill, value);
|
||||
|
||||
if (player == null) {
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true);
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -23,11 +24,11 @@ public class AddxpCommand extends ExperienceCommand {
|
||||
@Override
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
if (player != null) {
|
||||
UserManager.getPlayer(player).applyXpGain(skill, value);
|
||||
UserManager.getPlayer(player).applyXpGain(skill, value, XPGainReason.COMMAND);
|
||||
}
|
||||
else {
|
||||
profile.addXp(skill, value);
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -15,7 +14,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -24,6 +22,8 @@ import com.google.common.collect.ImmutableList;
|
||||
public abstract class ExperienceCommand implements TabExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
SkillType skill;
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
@@ -39,7 +39,13 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0]), Integer.parseInt(args[1]));
|
||||
skill = SkillType.getSkill(args[0]);
|
||||
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill, Integer.parseInt(args[1]));
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
@@ -52,11 +58,16 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
SkillType skill = SkillType.getSkill(args[1]);
|
||||
skill = SkillType.getSkill(args[1]);
|
||||
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
|
||||
int value = Integer.parseInt(args[2]);
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
@@ -84,7 +95,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||
@@ -100,11 +111,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
protected abstract void handlePlayerMessageSkill(Player player, int value, SkillType skill);
|
||||
|
||||
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
||||
if (CommandUtils.isInvalidInteger(sender, value) || CommandUtils.isInvalidSkill(sender, skillName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(CommandUtils.isInvalidInteger(sender, value) || (!skillName.equalsIgnoreCase("all") && CommandUtils.isInvalidSkill(sender, skillName)));
|
||||
}
|
||||
|
||||
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
||||
@@ -118,7 +125,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
|
||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.values()) {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
handleCommand(player, profile, skillType, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -28,7 +29,7 @@ public class MmoeditCommand extends ExperienceCommand {
|
||||
profile.modifySkill(skill, value);
|
||||
|
||||
if (player == null) {
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -36,7 +37,7 @@ public class MmoeditCommand extends ExperienceCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel);
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -14,14 +13,19 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
/**
|
||||
* This class mirrors the structure of ExperienceCommand, except the
|
||||
* value/quantity argument is removed.
|
||||
*/
|
||||
public class SkillresetCommand implements TabExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@@ -31,32 +35,38 @@ public class SkillresetCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Permissions.skillreset(sender)) {
|
||||
if (!permissionsCheckSelf(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CommandUtils.isInvalidSkill(sender, args[0])) {
|
||||
if (!validateArguments(sender, args[0])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0]), args.length, sender, command);
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0]));
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
if (!Permissions.skillresetOthers(sender)) {
|
||||
if (!permissionsCheckOthers(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CommandUtils.isInvalidSkill(sender, args[1])) {
|
||||
if (!validateArguments(sender, args[1])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
SkillType skill = SkillType.getSkill(args[1]);
|
||||
SkillType skill;
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
else {
|
||||
skill = SkillType.getSkill(args[1]);
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
@@ -66,13 +76,13 @@ public class SkillresetCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
editValues(null, profile, skill, args.length, sender, command);
|
||||
editValues(null, profile, skill);
|
||||
}
|
||||
else {
|
||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill, args.length, sender, command);
|
||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill);
|
||||
}
|
||||
|
||||
ExperienceCommand.handleSenderMessage(sender, playerName, skill);
|
||||
handleSenderMessage(sender, playerName, skill);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -84,7 +94,7 @@ public class SkillresetCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||
@@ -93,41 +103,65 @@ public class SkillresetCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void editValues(Player player, PlayerProfile profile, SkillType skill, int argsLength, CommandSender sender, Command command) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.values()) {
|
||||
handleCommand(player, profile, skillType, argsLength, sender, command);
|
||||
}
|
||||
|
||||
if (player != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Reset.All"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
handleCommand(player, profile, skill, argsLength, sender, command);
|
||||
|
||||
if (player != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Reset.Single", skill.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handleCommand(Player player, PlayerProfile profile, SkillType skill, int argsLength, CommandSender sender, Command command) {
|
||||
if (argsLength == 1 && !Permissions.skillreset(sender, skill) || (argsLength == 2 && !Permissions.skillresetOthers(sender, skill))) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill) {
|
||||
int levelsRemoved = profile.getSkillLevel(skill);
|
||||
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||
|
||||
profile.modifySkill(skill, 0);
|
||||
|
||||
if (player == null) {
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false);
|
||||
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||
return Permissions.skillreset(sender);
|
||||
}
|
||||
|
||||
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||
return Permissions.skillresetOthers(sender);
|
||||
}
|
||||
|
||||
protected void handlePlayerMessageAll(Player player) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Reset.All"));
|
||||
}
|
||||
|
||||
protected void handlePlayerMessageSkill(Player player, SkillType skill) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Reset.Single", skill.getName()));
|
||||
}
|
||||
|
||||
private boolean validateArguments(CommandSender sender, String skillName) {
|
||||
return !(CommandUtils.isInvalidSkill(sender, skillName) && !skillName.equalsIgnoreCase("all"));
|
||||
}
|
||||
|
||||
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
||||
if (skill == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||
}
|
||||
}
|
||||
|
||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
handleCommand(player, profile, skillType);
|
||||
}
|
||||
|
||||
if (player != null) {
|
||||
handlePlayerMessageAll(player);
|
||||
}
|
||||
}
|
||||
else {
|
||||
handleCommand(player, profile, skill);
|
||||
|
||||
if (player != null) {
|
||||
handlePlayerMessageSkill(player, skill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||
@@ -17,7 +17,7 @@ public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
|
||||
if (!playerParty.getMembers().contains(targetName)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@@ -12,9 +12,10 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||
import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand;
|
||||
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -25,7 +26,7 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class PartyCommand implements TabExecutor {
|
||||
private static final List<String> PARTY_SUBCOMMANDS;
|
||||
private static final List<String> EXPSHARE_COMPLETIONS = ImmutableList.of("none", "equal");
|
||||
private static final List<String> XPSHARE_COMPLETIONS = ImmutableList.of("none", "equal");
|
||||
private static final List<String> ITEMSHARE_COMPLETIONS = ImmutableList.of("none", "equal", "random", "loot", "mining", "herbalism", "woodcutting", "misc");
|
||||
|
||||
static {
|
||||
@@ -43,7 +44,7 @@ public class PartyCommand implements TabExecutor {
|
||||
private CommandExecutor partyAcceptCommand = new PartyAcceptCommand();
|
||||
private CommandExecutor partyCreateCommand = new PartyCreateCommand();
|
||||
private CommandExecutor partyQuitCommand = new PartyQuitCommand();
|
||||
private CommandExecutor partyExpShareCommand = new PartyExpShareCommand();
|
||||
private CommandExecutor partyXpShareCommand = new PartyXpShareCommand();
|
||||
private CommandExecutor partyItemShareCommand = new PartyItemShareCommand();
|
||||
private CommandExecutor partyInviteCommand = new PartyInviteCommand();
|
||||
private CommandExecutor partyKickCommand = new PartyKickCommand();
|
||||
@@ -54,8 +55,9 @@ public class PartyCommand implements TabExecutor {
|
||||
private CommandExecutor partyRenameCommand = new PartyRenameCommand();
|
||||
private CommandExecutor partyInfoCommand = new PartyInfoCommand();
|
||||
private CommandExecutor partyHelpCommand = new PartyHelpCommand();
|
||||
private CommandExecutor partyTeleportCommand = mcMMO.p.getCommand("ptp").getExecutor();
|
||||
private CommandExecutor partyTeleportCommand = new PtpCommand();
|
||||
private CommandExecutor partyChatCommand = new PartyChatCommand();
|
||||
private CommandExecutor partyAllianceCommand = new PartyAllianceCommand();
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@@ -133,8 +135,8 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
switch (subcommand) {
|
||||
case EXPSHARE:
|
||||
return partyExpShareCommand.onCommand(sender, command, label, args);
|
||||
case XPSHARE:
|
||||
return partyXpShareCommand.onCommand(sender, command, label, args);
|
||||
case ITEMSHARE:
|
||||
return partyItemShareCommand.onCommand(sender, command, label, args);
|
||||
case KICK:
|
||||
@@ -150,6 +152,8 @@ public class PartyCommand implements TabExecutor {
|
||||
return partyChangePasswordCommand.onCommand(sender, command, label, args);
|
||||
case RENAME:
|
||||
return partyRenameCommand.onCommand(sender, command, label, args);
|
||||
case ALLIANCE:
|
||||
return partyAllianceCommand.onCommand(sender, command, label, args);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -174,10 +178,10 @@ public class PartyCommand implements TabExecutor {
|
||||
case INVITE:
|
||||
case KICK:
|
||||
case OWNER:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case EXPSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], EXPSHARE_COMPLETIONS, new ArrayList<String>(EXPSHARE_COMPLETIONS.size()));
|
||||
case XPSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
||||
case ITEMSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], ITEMSHARE_COMPLETIONS, new ArrayList<String>(ITEMSHARE_COMPLETIONS.size()));
|
||||
case LOCK:
|
||||
@@ -189,7 +193,10 @@ public class PartyCommand implements TabExecutor {
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
playerNames = UserManager.getPlayerNames();
|
||||
Player player = (Player) sender;
|
||||
Party party = UserManager.getPlayer(player).getParty();
|
||||
|
||||
playerNames = party.getOnlinePlayerNames(player);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
@@ -216,13 +223,7 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
private String[] extractArgs(String[] args) {
|
||||
String[] newArgs = new String[args.length - 1];
|
||||
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
newArgs[i - 1] = args[i];
|
||||
}
|
||||
|
||||
return newArgs;
|
||||
return Arrays.copyOfRange(args, 1, args.length);
|
||||
}
|
||||
|
||||
private boolean isItemShareCategory(String category) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class PartyHelpCommand implements CommandExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.7", "/party leader"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.8", "/party disband"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.9", "/party itemshare"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.10", "/party expshare"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.10", "/party xpshare"));
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@@ -26,7 +29,8 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
displayPartyHeader(player, party);
|
||||
displayShareModeInfo(party, player);
|
||||
displayShareModeInfo(player, party);
|
||||
displayPartyFeatures(player, party);
|
||||
displayMemberInfo(player, mcMMOPlayer, party);
|
||||
return true;
|
||||
|
||||
@@ -36,31 +40,52 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private String createMembersList(Party party) {
|
||||
StringBuilder memberList = new StringBuilder();
|
||||
private void displayPartyHeader(Player player, Party party) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||
|
||||
for (String memberName : party.getMembers()) {
|
||||
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
||||
StringBuilder status = new StringBuilder();
|
||||
status.append(LocaleLoader.getString("Commands.Party.Status", party.getName(), LocaleLoader.getString("Party.Status." + (party.isLocked() ? "Locked" : "Unlocked")), party.getLevel()));
|
||||
|
||||
if (party.getLeader().equalsIgnoreCase(memberName)) {
|
||||
memberList.append(ChatColor.GOLD);
|
||||
}
|
||||
else if (member != null) {
|
||||
memberList.append(ChatColor.WHITE);
|
||||
}
|
||||
else {
|
||||
memberList.append(ChatColor.GRAY);
|
||||
}
|
||||
|
||||
memberList.append(memberName).append(" ");
|
||||
if (!party.hasReachedLevelCap()) {
|
||||
status.append(" (").append(party.getXpToLevelPercentage()).append(")");
|
||||
}
|
||||
|
||||
return memberList.toString();
|
||||
player.sendMessage(status.toString());
|
||||
}
|
||||
|
||||
private void displayShareModeInfo(Party party, Player player) {
|
||||
boolean xpShareEnabled = Config.getInstance().getExpShareEnabled();
|
||||
boolean itemShareEnabled = Config.getInstance().getItemShareEnabled();
|
||||
private void displayPartyFeatures(Player player, Party party) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Features.Header"));
|
||||
|
||||
List<String> unlockedPartyFeatures = new ArrayList<String>();
|
||||
List<String> lockedPartyFeatures = new ArrayList<String>();
|
||||
|
||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||
if (!partyFeature.hasPermission(player)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isUnlockedFeature(party, partyFeature)) {
|
||||
unlockedPartyFeatures.add(partyFeature.getLocaleString());
|
||||
}
|
||||
else {
|
||||
lockedPartyFeatures.add(partyFeature.getFeatureLockedLocaleString());
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.UnlockedFeatures", unlockedPartyFeatures.isEmpty() ? "None" : unlockedPartyFeatures));
|
||||
|
||||
for (String message : lockedPartyFeatures) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isUnlockedFeature(Party party, PartyFeature partyFeature) {
|
||||
return party.getLevel() >= Config.getInstance().getPartyFeatureUnlockLevel(partyFeature);
|
||||
}
|
||||
|
||||
private void displayShareModeInfo(Player player, Party party) {
|
||||
boolean xpShareEnabled = isUnlockedFeature(party, PartyFeature.XP_SHARE);
|
||||
boolean itemShareEnabled = isUnlockedFeature(party, PartyFeature.ITEM_SHARE);
|
||||
boolean itemSharingActive = (party.getItemShareMode() != ShareMode.NONE);
|
||||
|
||||
if (!xpShareEnabled && !itemShareEnabled) {
|
||||
@@ -90,17 +115,12 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyHeader(Player player, Party party) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", party.getName(), LocaleLoader.getString("Party.Status." + (party.isLocked() ? "Locked" : "Unlocked"))));
|
||||
}
|
||||
|
||||
private void displayMemberInfo(Player player, McMMOPlayer mcMMOPlayer, Party party) {
|
||||
int membersNear = PartyManager.getNearMembers(mcMMOPlayer).size();
|
||||
List<Player> nearMembers = PartyManager.getNearMembers(mcMMOPlayer);
|
||||
int membersOnline = party.getOnlineMembers().size() - 1;
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", membersNear, membersOnline));
|
||||
player.sendMessage(createMembersList(party));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", nearMembers.size(), membersOnline));
|
||||
player.sendMessage(party.createMembersList(player.getName(), nearMembers));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -18,8 +17,8 @@ public class PartyInviteCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@@ -17,13 +18,13 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
public class PartyItemShareCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!Config.getInstance().getItemShareEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.ItemShare.Disabled"));
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ITEM_SHARE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.4"));
|
||||
return true;
|
||||
}
|
||||
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
||||
@@ -37,7 +38,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
boolean toggle = false;
|
||||
boolean toggle;
|
||||
|
||||
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||
toggle = true;
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -19,7 +18,7 @@ public class PartyJoinCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
case 3:
|
||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyKickCommand implements CommandExecutor {
|
||||
@@ -19,13 +20,15 @@ public class PartyKickCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
|
||||
if (!playerParty.getMembers().contains(target.getName())) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
||||
if (!playerParty.getMembers().contains(targetName)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
|
||||
|
||||
if (target.isOnline()) {
|
||||
Player onlineTarget = target.getPlayer();
|
||||
String partyName = playerParty.getName();
|
||||
|
||||
@@ -7,7 +7,7 @@ public enum PartySubcommandType {
|
||||
HELP,
|
||||
INFO,
|
||||
QUIT,
|
||||
EXPSHARE,
|
||||
XPSHARE,
|
||||
ITEMSHARE,
|
||||
INVITE,
|
||||
KICK,
|
||||
@@ -18,7 +18,8 @@ public enum PartySubcommandType {
|
||||
PASSWORD,
|
||||
RENAME,
|
||||
TELEPORT,
|
||||
CHAT;
|
||||
CHAT,
|
||||
ALLIANCE;
|
||||
|
||||
public static PartySubcommandType getSubcommand(String commandName) {
|
||||
for (PartySubcommandType command : values()) {
|
||||
@@ -37,11 +38,14 @@ public enum PartySubcommandType {
|
||||
return OWNER;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
||||
return EXPSHARE;
|
||||
return XPSHARE;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
||||
return ITEMSHARE;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("ally")) {
|
||||
return ALLIANCE;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -7,24 +7,25 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyExpShareCommand implements CommandExecutor {
|
||||
public class PartyXpShareCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!Config.getInstance().getExpShareEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.ExpShare.Disabled"));
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.XP_SHARE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.5"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
||||
handleChangingShareMode(party, ShareMode.NONE);
|
||||
}
|
||||
@@ -32,13 +33,13 @@ public class PartyExpShareCommand implements CommandExecutor {
|
||||
handleChangingShareMode(party, ShareMode.EQUAL);
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -46,7 +47,7 @@ public class PartyExpShareCommand implements CommandExecutor {
|
||||
private void handleChangingShareMode(Party party, ShareMode mode) {
|
||||
party.setXpShareMode(mode);
|
||||
|
||||
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Xp"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
member.sendMessage(changeModeMessage);
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceAcceptCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.hasPartyAllianceInvite()) {
|
||||
sender.sendMessage(LocaleLoader.getString("mcMMO.NoInvites"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mcMMOPlayer.getParty().getAlly() != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
|
||||
return true;
|
||||
}
|
||||
|
||||
PartyManager.acceptAllianceInvite(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "alliance", "accept"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class PartyAllianceCommand implements TabExecutor {
|
||||
private Player player;
|
||||
private Party playerParty;
|
||||
private Party targetParty;
|
||||
|
||||
public static final List<String> ALLIANCE_SUBCOMMANDS = ImmutableList.of("invite", "accept", "disband");
|
||||
|
||||
private CommandExecutor partyAllianceInviteCommand = new PartyAllianceInviteCommand();
|
||||
private CommandExecutor partyAllianceAcceptCommand = new PartyAllianceAcceptCommand();
|
||||
private CommandExecutor partyAllianceDisbandCommand = new PartyAllianceDisbandCommand();
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
playerParty = mcMMOPlayer.getParty();
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (playerParty.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ALLIANCE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.3"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (playerParty.getAlly() == null) {
|
||||
printUsage();
|
||||
return true;
|
||||
}
|
||||
|
||||
targetParty = playerParty.getAlly();
|
||||
|
||||
displayPartyHeader();
|
||||
displayMemberInfo(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
if (playerParty.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ALLIANCE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.3"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("invite")) {
|
||||
return partyAllianceInviteCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("accept")) {
|
||||
return partyAllianceAcceptCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("disband")) {
|
||||
return partyAllianceDisbandCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (playerParty.getAlly() == null) {
|
||||
printUsage();
|
||||
return true;
|
||||
}
|
||||
|
||||
targetParty = playerParty.getAlly();
|
||||
|
||||
displayPartyHeader();
|
||||
displayMemberInfo(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean printUsage() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Help.0"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Help.1"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender commandSender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(commandSender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
return matches;
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyHeader() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Ally", playerParty.getName(), targetParty.getName()));
|
||||
}
|
||||
|
||||
private void displayMemberInfo(McMMOPlayer mcMMOPlayer) {
|
||||
List<Player> nearMembers = PartyManager.getNearMembers(mcMMOPlayer);
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Members.Header"));
|
||||
player.sendMessage(playerParty.createMembersList(player.getName(), nearMembers));
|
||||
player.sendMessage(ChatColor.DARK_GRAY + "----------------------------");
|
||||
player.sendMessage(targetParty.createMembersList(player.getName(), nearMembers));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceDisbandCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
if (party.getAlly() == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.None"));
|
||||
return true;
|
||||
}
|
||||
|
||||
PartyManager.disbandAlliance(player, party, party.getAlly());
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "alliance", "disband"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceInviteCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 3:
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[2]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
String playerName = player.getName();
|
||||
|
||||
if (player.equals(target)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Invite.Self"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.inParty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (PartyManager.inSameParty(player, target)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Player.InSameParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.getParty().getLeader().equalsIgnoreCase(targetName)) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
Party playerParty = mcMMOPlayer.getParty();
|
||||
|
||||
if (playerParty.getAlly() != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOTarget.setPartyAllianceInvite(playerParty);
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
|
||||
target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.0", playerParty.getName(), playerName));
|
||||
target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.1"));
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "alliance", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class PtpAcceptCommand implements CommandExecutor {
|
||||
@Override
|
||||
@@ -29,7 +29,7 @@ public class PtpAcceptCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((ptpRecord.getTimeout() + Config.getInstance().getPTPCommandTimeout()) * Misc.TIME_CONVERSION_FACTOR < System.currentTimeMillis()) {
|
||||
if (SkillUtils.cooldownExpired(ptpRecord.getTimeout(), Config.getInstance().getPTPCommandTimeout())) {
|
||||
ptpRecord.removeRequest();
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired"));
|
||||
return true;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.teleport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@@ -13,6 +12,8 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@@ -40,6 +41,21 @@ public class PtpCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return true;
|
||||
}
|
||||
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.TELEPORT)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.2"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (args[0].equalsIgnoreCase("toggle")) {
|
||||
@@ -50,9 +66,6 @@ public class PtpCommand implements TabExecutor {
|
||||
return ptpAcceptAnyCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
||||
int hurtCooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
||||
|
||||
@@ -86,7 +99,7 @@ public class PtpCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
sendTeleportRequest(sender, player, Misc.getMatchedPlayerName(args[0]));
|
||||
sendTeleportRequest(sender, player, CommandUtils.getMatchedPlayerName(args[0]));
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -101,7 +114,14 @@ public class PtpCommand implements TabExecutor {
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
List<String> playerNames = mcMMOPlayer.getParty().getOnlinePlayerNames(player);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -16,7 +15,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -29,8 +27,8 @@ public class InspectCommand implements TabExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
@@ -105,7 +103,7 @@ public class InspectCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MccooldownCommand implements TabExecutor {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||
|
||||
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
if (!ability.getPermissions(player)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -15,7 +14,6 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -46,8 +44,8 @@ public class McrankCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
if (mcMMOPlayer != null) {
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
@@ -73,7 +71,7 @@ public class McrankCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
@@ -83,8 +81,9 @@ public class McrankCommand implements TabExecutor {
|
||||
private void display(CommandSender sender, String playerName) {
|
||||
if (sender instanceof Player) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||
|
||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||
return;
|
||||
}
|
||||
@@ -93,7 +92,7 @@ public class McrankCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getRankUseBoard());
|
||||
boolean useChat = useBoard ? Config.getInstance().getRankUseChat() : true;
|
||||
boolean useChat = !useBoard || Config.getInstance().getRankUseChat();
|
||||
|
||||
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
@@ -85,8 +84,9 @@ public class MctopCommand implements TabExecutor {
|
||||
|
||||
if (sender instanceof Player) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||
|
||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||
return;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class MctopCommand implements TabExecutor {
|
||||
|
||||
private void display(int page, SkillType skill, CommandSender sender) {
|
||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getTopUseBoard());
|
||||
boolean useChat = useBoard ? Config.getInstance().getTopUseChat() : true;
|
||||
boolean useChat = !useBoard || Config.getInstance().getTopUseChat();
|
||||
|
||||
new MctopCommandAsyncTask(page, skill, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.acrobatics.Acrobatics;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class AcrobaticsCommand extends SkillCommand {
|
||||
@@ -30,21 +30,21 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// DODGE
|
||||
if (canDodge) {
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.dodgeMaxBonusLevel, Acrobatics.dodgeMaxChance, isLucky);
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DODGE, isLucky);
|
||||
dodgeChance = dodgeStrings[0];
|
||||
dodgeChanceLucky = dodgeStrings[1];
|
||||
}
|
||||
|
||||
// ROLL
|
||||
if (canRoll) {
|
||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.rollMaxBonusLevel, Acrobatics.rollMaxChance, isLucky);
|
||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.ROLL, isLucky);
|
||||
rollChance = rollStrings[0];
|
||||
rollChanceLucky = rollStrings[1];
|
||||
}
|
||||
|
||||
// GRACEFUL ROLL
|
||||
if (canGracefulRoll) {
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollMaxChance, isLucky);
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GRACEFUL_ROLL, isLucky);
|
||||
gracefulRollChance = gracefulRollStrings[0];
|
||||
gracefulRollChanceLucky = gracefulRollStrings[1];
|
||||
}
|
||||
@@ -52,9 +52,9 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canDodge = Permissions.dodge(player);
|
||||
canRoll = Permissions.roll(player);
|
||||
canGracefulRoll = Permissions.gracefulRoll(player);
|
||||
canDodge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DODGE);
|
||||
canRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ROLL);
|
||||
canGracefulRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GRACEFUL_ROLL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.alchemy.Alchemy.Tier;
|
||||
import com.gmail.nossr50.skills.alchemy.AlchemyManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class AlchemyCommand extends SkillCommand {
|
||||
private String brewSpeed;
|
||||
private String brewSpeedLucky;
|
||||
|
||||
private int tier;
|
||||
private int ingredientCount;
|
||||
private String ingredientList;
|
||||
|
||||
private boolean canCatalysis;
|
||||
private boolean canConcoctions;
|
||||
|
||||
public AlchemyCommand() {
|
||||
super(SkillType.ALCHEMY);
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(Player player, boolean isLucky) {
|
||||
AlchemyManager alchemyManager = UserManager.getPlayer(player).getAlchemyManager();
|
||||
String[] displayValues = new String[2];
|
||||
|
||||
displayValues[0] = decimal.format(alchemyManager.calculateBrewSpeed(false)) + "x";
|
||||
displayValues[1] = isLucky ? decimal.format(alchemyManager.calculateBrewSpeed(true)) + "x" : null;
|
||||
|
||||
return displayValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// CATALYSIS
|
||||
if (canCatalysis) {
|
||||
String[] catalysisStrings = calculateAbilityDisplayValues(player, isLucky);
|
||||
brewSpeed = catalysisStrings[0];
|
||||
brewSpeedLucky = catalysisStrings[1];
|
||||
}
|
||||
|
||||
// CONCOCTIONS
|
||||
if (canConcoctions) {
|
||||
AlchemyManager alchemyManager = UserManager.getPlayer(player).getAlchemyManager();
|
||||
tier = alchemyManager.getTier();
|
||||
ingredientCount = alchemyManager.getIngredients().size();
|
||||
ingredientList = alchemyManager.getIngredientList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canCatalysis = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CATALYSIS);
|
||||
canConcoctions = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CONCOCTIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCatalysis) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Alchemy.Effect.0"), LocaleLoader.getString("Alchemy.Effect.1")));
|
||||
}
|
||||
|
||||
if (canConcoctions) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Alchemy.Effect.2"), LocaleLoader.getString("Alchemy.Effect.3")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCatalysis) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getCatalysisUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Alchemy.Ability.Locked.0", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
messages.add(LocaleLoader.getString("Alchemy.Catalysis.Speed", brewSpeed) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", brewSpeedLucky) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
if (canConcoctions) {
|
||||
messages.add(LocaleLoader.getString("Alchemy.Concoctions.Rank", tier, Tier.values().length));
|
||||
messages.add(LocaleLoader.getString("Alchemy.Concoctions.Ingredients", ingredientCount, ingredientList));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.HolidayManager.FakeSkillType;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class AprilCommand implements TabExecutor {
|
||||
private String skillName;
|
||||
|
||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
skillName = StringUtils.getCapitalized(label);
|
||||
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
Player player = (Player) sender;
|
||||
FakeSkillType fakeSkillType = FakeSkillType.getByName(skillName);
|
||||
|
||||
float skillValue = Misc.getRandom().nextInt(99);
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.XPGain", getXPGainString(fakeSkillType)));
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, Misc.getRandom().nextInt(1000), 1000 + Misc.getRandom().nextInt(1000)));
|
||||
|
||||
|
||||
List<String> effectMessages = effectsDisplay(fakeSkillType);
|
||||
|
||||
if (!effectMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||
|
||||
for (String message : effectMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> statsMessages = statsDisplay(fakeSkillType);
|
||||
|
||||
if (!statsMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
|
||||
|
||||
for (String message : statsMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.formatString("[[DARK_AQUA]]Guide for {0} available - type /APRIL FOOLS ! :D", skillName));
|
||||
return true;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private String getXPGainString(FakeSkillType fakeSkillType) {
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
return "Get beaten up";
|
||||
case JUMPING:
|
||||
return "Kris Kross will make ya Jump Jump";
|
||||
case THROWING:
|
||||
return "Chuck your items on the floor";
|
||||
case WRECKING:
|
||||
return "I'M GONNA WRECK IT!";
|
||||
case CRAFTING:
|
||||
return "Craft apple pies";
|
||||
case WALKING:
|
||||
return "Walk around the park";
|
||||
case SWIMMING:
|
||||
return "Like a fish on a bicycle";
|
||||
case FALLING:
|
||||
return "Faceplant the floor, headbutt the ground";
|
||||
case CLIMBING:
|
||||
return "Climb the highest mountain";
|
||||
case FLYING:
|
||||
return "I believe I can fly";
|
||||
case DIVING:
|
||||
return "Scuba club 4000";
|
||||
case PIGGY:
|
||||
return "OINK! OINK!";
|
||||
default:
|
||||
return "Sit and wait?";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
return ImmutableList.of("?");
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> effectsDisplay(FakeSkillType fakeSkillType) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Punching bag", "Absorb damage, like a bag of sand"));
|
||||
break;
|
||||
case JUMPING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Jump", "PRESS SPACE TO JUMP"));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Jump Twice", "PRESS SPACE TWICE TO JUMP TWICE"));
|
||||
break;
|
||||
case THROWING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Drop Item", "Randomly drop items, at random"));
|
||||
break;
|
||||
case WRECKING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Ralphinator", "Smash windows with your fists"));
|
||||
break;
|
||||
case CRAFTING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Crafting", "Chance of successful craft"));
|
||||
break;
|
||||
case WALKING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Walk", "Traveling gracefully by foot"));
|
||||
break;
|
||||
case SWIMMING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Swim", "Just keep swimming, swimming, swimming"));
|
||||
break;
|
||||
case FALLING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Skydiving", "Go jump of a cliff. No, seriously."));
|
||||
break;
|
||||
case CLIMBING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Rock Climber", "Use string to climb mountains faster"));
|
||||
break;
|
||||
case FLYING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Fly", "Throw yourself at the ground and miss"));
|
||||
break;
|
||||
case DIVING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Hold Breath", "Press shift to hold your breath longer"));
|
||||
break;
|
||||
case PIGGY:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Carrot Turbo", "Supercharge your pigs with carrots"));
|
||||
break;
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
private List<String> statsDisplay(FakeSkillType fakeSkillType) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Damage Taken: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(77))));
|
||||
break;
|
||||
case JUMPING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Double Jump Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case THROWING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Drop Item Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(87))));
|
||||
break;
|
||||
case WRECKING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Wrecking Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(14))));
|
||||
break;
|
||||
case CRAFTING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Crafting Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case WALKING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Walk Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case SWIMMING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Swim Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case FALLING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Skydiving Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(37))));
|
||||
break;
|
||||
case CLIMBING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Rock Climber Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case FLYING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Fly Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case DIVING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Hold Breath Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case PIGGY:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Carrot Turbo Boost: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(80)) + 10));
|
||||
break;
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.archery.Archery;
|
||||
@@ -35,14 +36,14 @@ public class ArcheryCommand extends SkillCommand {
|
||||
|
||||
// DAZE
|
||||
if (canDaze) {
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, Archery.dazeMaxBonusLevel, Archery.dazeMaxBonus, isLucky);
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DAZE, isLucky);
|
||||
dazeChance = dazeStrings[0];
|
||||
dazeChanceLucky = dazeStrings[1];
|
||||
}
|
||||
|
||||
// RETRIEVE
|
||||
if (canRetrieve) {
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, Archery.retrieveMaxBonusLevel, Archery.retrieveMaxChance, isLucky);
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.RETRIEVE, isLucky);
|
||||
retrieveChance = retrieveStrings[0];
|
||||
retrieveChanceLucky = retrieveStrings[1];
|
||||
}
|
||||
@@ -50,9 +51,9 @@ public class ArcheryCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkillShot = Permissions.bonusDamage(player, skill);
|
||||
canDaze = Permissions.daze(player);
|
||||
canRetrieve = Permissions.arrowRetrieval(player);
|
||||
canSkillShot = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SKILL_SHOT);
|
||||
canDaze = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DAZE);
|
||||
canRetrieve = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.RETRIEVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,7 +65,7 @@ public class ArcheryCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDaze) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeBonusDamage)));
|
||||
}
|
||||
|
||||
if (canRetrieve) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.axes.Axes;
|
||||
@@ -13,14 +14,14 @@ import com.gmail.nossr50.util.Permissions;
|
||||
public class AxesCommand extends SkillCommand {
|
||||
private String critChance;
|
||||
private String critChanceLucky;
|
||||
private double bonusDamage;
|
||||
private double axeMasteryDamage;
|
||||
private double impactDamage;
|
||||
private String skullSplitterLength;
|
||||
private String skullSplitterLengthEndurance;
|
||||
|
||||
private boolean canSkullSplitter;
|
||||
private boolean canCritical;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canAxeMastery;
|
||||
private boolean canImpact;
|
||||
private boolean canGreaterImpact;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class AxesCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// IMPACT
|
||||
// ARMOR IMPACT
|
||||
if (canImpact) {
|
||||
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
||||
}
|
||||
@@ -42,26 +43,26 @@ public class AxesCommand extends SkillCommand {
|
||||
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
||||
}
|
||||
|
||||
// CRITICAL STRIKES
|
||||
// CRITICAL HIT
|
||||
if (canCritical) {
|
||||
String[] criticalStrikeStrings = calculateAbilityDisplayValues(skillValue, Axes.criticalHitMaxBonusLevel, Axes.criticalHitMaxChance, isLucky);
|
||||
critChance = criticalStrikeStrings[0];
|
||||
critChanceLucky = criticalStrikeStrings[1];
|
||||
String[] criticalHitStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.CRITICAL_HIT, isLucky);
|
||||
critChance = criticalHitStrings[0];
|
||||
critChanceLucky = criticalHitStrings[1];
|
||||
}
|
||||
|
||||
// AXE MASTERY
|
||||
if (canBonusDamage) {
|
||||
bonusDamage = Math.min(skillValue / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
||||
if (canAxeMastery) {
|
||||
axeMasteryDamage = Math.min(skillValue / (Axes.axeMasteryMaxBonusLevel / Axes.axeMasteryMaxBonus), Axes.axeMasteryMaxBonus);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkullSplitter = Permissions.skullSplitter(player);
|
||||
canCritical = Permissions.criticalStrikes(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canImpact = Permissions.armorImpact(player);
|
||||
canGreaterImpact = Permissions.greaterImpact(player);
|
||||
canCritical = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CRITICAL_HIT);
|
||||
canAxeMastery = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.AXE_MASTERY);
|
||||
canImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARMOR_IMPACT);
|
||||
canGreaterImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GREATER_IMPACT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,7 +77,7 @@ public class AxesCommand extends SkillCommand {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.2"), LocaleLoader.getString("Axes.Effect.3")));
|
||||
}
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
|
||||
}
|
||||
|
||||
@@ -95,8 +96,8 @@ public class AxesCommand extends SkillCommand {
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBonusDamage) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", axeMasteryDamage)));
|
||||
}
|
||||
|
||||
if (canImpact) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -33,7 +34,7 @@ public class ExcavationCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.EXCAVATION_TREASURE_HUNTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,12 +4,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@@ -50,7 +50,6 @@ public class FishingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
|
||||
boolean isStorming = player.getWorld().hasStorm();
|
||||
|
||||
// TREASURE HUNTER
|
||||
if (canTreasureHunt) {
|
||||
@@ -69,7 +68,7 @@ public class FishingCommand extends SkillCommand {
|
||||
double totalEnchantChance = 0;
|
||||
|
||||
for (Rarity rarity : Rarity.values()) {
|
||||
if (rarity != Rarity.TRAP || rarity != Rarity.RECORD) {
|
||||
if (rarity != Rarity.TRAP && rarity != Rarity.RECORD) {
|
||||
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
||||
}
|
||||
}
|
||||
@@ -91,16 +90,14 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
// MASTER ANGLER
|
||||
if (canMasterAngler) {
|
||||
double rawBiteChance = 1.0 / (isStorming ? 300 : 500);
|
||||
double rawBiteChance = 1.0 / (player.getWorld().hasStorm() ? 300 : 500);
|
||||
Location location = fishingManager.getHookLocation();
|
||||
|
||||
if (location == null) {
|
||||
location = player.getLocation();
|
||||
}
|
||||
|
||||
Biome biome = location.getBlock().getBiome();
|
||||
|
||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||
if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
|
||||
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||
}
|
||||
|
||||
@@ -114,12 +111,12 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreasureHunt = Permissions.fishingTreasureHunter(player);
|
||||
canMagicHunt = Permissions.magicHunter(player);
|
||||
canShake = Permissions.shake(player);
|
||||
canFishermansDiet = Permissions.fishermansDiet(player);
|
||||
canMasterAngler = Permissions.masterAngler(player);
|
||||
canIceFish = Permissions.iceFishing(player);
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHING_TREASURE_HUNTER);
|
||||
canMagicHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MAGIC_HUNTER);
|
||||
canShake = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHAKE);
|
||||
canFishermansDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHERMANS_DIET);
|
||||
canMasterAngler = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MASTER_ANGLER);
|
||||
canIceFish = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ICE_FISHING);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,7 +155,7 @@ public class FishingCommand extends SkillCommand {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canTreasureHunt) {
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.EIGHT.toNumerical()));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.values().length));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.TH.DropRate", trapTreasure, commonTreasure, uncommonTreasure, rareTreasure, epicTreasure, legendaryTreasure, recordTreasure));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.herbalism.Herbalism;
|
||||
@@ -55,28 +56,28 @@ public class HerbalismCommand extends SkillCommand {
|
||||
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
||||
greenThumbStage = calculateRank(skillValue, Herbalism.greenThumbStageMaxLevel, Herbalism.greenThumbStageChangeLevel);
|
||||
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(skillValue, Herbalism.greenThumbMaxLevel, Herbalism.greenThumbMaxChance, isLucky);
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GREEN_THUMB_PLANT, isLucky);
|
||||
greenThumbChance = greenThumbStrings[0];
|
||||
greenThumbChanceLucky = greenThumbStrings[1];
|
||||
}
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Herbalism.doubleDropsMaxLevel, Herbalism.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HERBALISM_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
|
||||
// HYLIAN LUCK
|
||||
if (hasHylianLuck) {
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, Herbalism.hylianLuckMaxLevel, Herbalism.hylianLuckMaxChance, isLucky);
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HYLIAN_LUCK, isLucky);
|
||||
hylianLuckChance = hylianLuckStrings[0];
|
||||
hylianLuckChanceLucky = hylianLuckStrings[1];
|
||||
}
|
||||
|
||||
// SHROOM THUMB
|
||||
if (canShroomThumb) {
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, Herbalism.shroomThumbMaxLevel, Herbalism.shroomThumbMaxChance, isLucky);
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SHROOM_THUMB, isLucky);
|
||||
shroomThumbChance = shroomThumbStrings[0];
|
||||
shroomThumbChanceLucky = shroomThumbStrings[1];
|
||||
}
|
||||
@@ -84,13 +85,13 @@ public class HerbalismCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
hasHylianLuck = Permissions.hylianLuck(player);
|
||||
hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HYLIAN_LUCK);
|
||||
canGreenTerra = Permissions.greenTerra(player);
|
||||
canGreenThumbPlants = Permissions.greenThumbPlant(player, Material.CROPS) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.NETHER_WARTS) || Permissions.greenThumbPlant(player, Material.COCOA);
|
||||
canGreenThumbBlocks = Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLE_WALL) || Permissions.greenThumbBlock(player, Material.SMOOTH_BRICK);
|
||||
canFarmersDiet = Permissions.farmersDiet(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.shroomThumb(player);
|
||||
canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FARMERS_DIET);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,10 +6,11 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
|
||||
import com.gmail.nossr50.skills.mining.Mining;
|
||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -48,7 +49,7 @@ public class MiningCommand extends SkillCommand {
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Mining.doubleDropsMaxLevel, Mining.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.MINING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
@@ -71,7 +72,7 @@ public class MiningCommand extends SkillCommand {
|
||||
canBiggerBombs = Permissions.biggerBombs(player);
|
||||
canBlast = Permissions.remoteDetonation(player);
|
||||
canDemoExpert = Permissions.demolitionsExpertise(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MINING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canSuperBreaker = Permissions.superBreaker(player);
|
||||
}
|
||||
|
||||
@@ -121,12 +122,12 @@ public class MiningCommand extends SkillCommand {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, Tier.EIGHT.toNumerical(), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops)));
|
||||
messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, Tier.values().length, LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops)));
|
||||
}
|
||||
}
|
||||
|
||||
if (canBiggerBombs) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.TWO);
|
||||
int unlockLevel = BlastMining.getBiggerBombsUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
|
||||
@@ -137,7 +138,7 @@ public class MiningCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDemoExpert) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.FOUR);
|
||||
int unlockLevel = BlastMining.getDemolitionExpertUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));
|
||||
|
||||
@@ -7,6 +7,8 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
@@ -25,7 +27,6 @@ public class RepairCommand extends SkillCommand {
|
||||
private boolean canSuperRepair;
|
||||
private boolean canMasterRepair;
|
||||
private boolean canArcaneForge;
|
||||
private boolean canSalvage;
|
||||
private boolean canRepairStone;
|
||||
private boolean canRepairIron;
|
||||
private boolean canRepairGold;
|
||||
@@ -65,7 +66,7 @@ public class RepairCommand extends SkillCommand {
|
||||
|
||||
// SUPER REPAIR
|
||||
if (canSuperRepair) {
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, Repair.superRepairMaxBonusLevel, Repair.superRepairMaxChance, isLucky);
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SUPER_REPAIR, isLucky);
|
||||
superRepairChance = superRepairStrings[0];
|
||||
superRepairChanceLucky = superRepairStrings[1];
|
||||
}
|
||||
@@ -73,17 +74,16 @@ public class RepairCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSuperRepair = Permissions.superRepair(player);
|
||||
canMasterRepair = Permissions.repairMastery(player);
|
||||
canArcaneForge = Permissions.arcaneForging(player);
|
||||
canSalvage = Permissions.salvage(player);
|
||||
canRepairDiamond = Permissions.repairDiamond(player);
|
||||
canRepairGold = Permissions.repairGold(player);
|
||||
canRepairIron = Permissions.repairIron(player);
|
||||
canRepairStone = Permissions.repairStone(player);
|
||||
canRepairString = Permissions.repairString(player);
|
||||
canRepairLeather = Permissions.repairLeather(player);
|
||||
canRepairWood = Permissions.repairWood(player);
|
||||
canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SUPER_REPAIR);
|
||||
canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.REPAIR_MASTERY);
|
||||
canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_FORGING);
|
||||
canRepairDiamond = Permissions.repairMaterialType(player, MaterialType.DIAMOND);
|
||||
canRepairGold = Permissions.repairMaterialType(player, MaterialType.GOLD);
|
||||
canRepairIron = Permissions.repairMaterialType(player, MaterialType.IRON);
|
||||
canRepairStone = Permissions.repairMaterialType(player, MaterialType.STONE);
|
||||
canRepairString = Permissions.repairMaterialType(player, MaterialType.STRING);
|
||||
canRepairLeather = Permissions.repairMaterialType(player, MaterialType.LEATHER);
|
||||
canRepairWood = Permissions.repairMaterialType(player, MaterialType.WOOD);
|
||||
arcaneBypass = Permissions.arcaneBypass(player);
|
||||
}
|
||||
|
||||
@@ -121,10 +121,6 @@ public class RepairCommand extends SkillCommand {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7")));
|
||||
}
|
||||
|
||||
if (canSalvage && Repair.salvageUnlockLevel > 0) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.16", Repair.salvageUnlockLevel), LocaleLoader.getString("Repair.Effect.17")));
|
||||
}
|
||||
|
||||
if (canArcaneForge) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.8"), LocaleLoader.getString("Repair.Effect.9")));
|
||||
}
|
||||
@@ -147,7 +143,7 @@ public class RepairCommand extends SkillCommand {
|
||||
if (canArcaneForge) {
|
||||
RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
|
||||
|
||||
messages.add(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), Tier.EIGHT.toNumerical()));
|
||||
messages.add(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), Tier.values().length));
|
||||
|
||||
if (ArcaneForging.arcaneForgingEnchantLoss) {
|
||||
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.salvage.Salvage;
|
||||
import com.gmail.nossr50.skills.salvage.SalvageManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class SalvageCommand extends SkillCommand {
|
||||
private boolean canAdvancedSalvage;
|
||||
private boolean canArcaneSalvage;
|
||||
|
||||
public SalvageCommand() {
|
||||
super(SkillType.SALVAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canAdvancedSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ADVANCED_SALVAGE);
|
||||
canArcaneSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_SALVAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canAdvancedSalvage) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Salvage.Effect.0"), LocaleLoader.getString("Salvage.Effect.1")));
|
||||
}
|
||||
|
||||
if (canArcaneSalvage) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Salvage.Effect.2"), LocaleLoader.getString("Salvage.Effect.3")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
SalvageManager salvageManager = UserManager.getPlayer(player).getSalvageManager();
|
||||
|
||||
if (canAdvancedSalvage) {
|
||||
if (skillValue < Salvage.advancedSalvageUnlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Salvage.Ability.Locked.0", Salvage.advancedSalvageUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Ability.Bonus.0"), LocaleLoader.getString("Salvage.Ability.Bonus.1", percent.format(salvageManager.getMaxSalvagePercentage()))));
|
||||
}
|
||||
}
|
||||
|
||||
if (canArcaneSalvage) {
|
||||
messages.add(LocaleLoader.getString("Salvage.Arcane.Rank", salvageManager.getArcaneSalvageRank(), Salvage.Tier.values().length));
|
||||
|
||||
if (Salvage.arcaneSalvageEnchantLoss) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Arcane.ExtractFull"), percent.format(salvageManager.getExtractFullEnchantChance() / 100)));
|
||||
}
|
||||
|
||||
if (Salvage.arcaneSalvageDowngrades) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Arcane.ExtractPartial"), percent.format(salvageManager.getExtractPartialEnchantChance() / 100)));
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,11 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
import com.gmail.nossr50.util.Motd;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
@@ -86,8 +88,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||
|
||||
if (isLucky) {
|
||||
String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
|
||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
||||
player.sendMessage(Motd.PERK_PREFIX + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
||||
}
|
||||
|
||||
for (String message : effectMessages) {
|
||||
@@ -136,8 +137,10 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
return displayValues;
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(float skillValue, int maxBonusLevel, double maxChance, boolean isLucky) {
|
||||
return calculateAbilityDisplayValues((maxChance / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), isLucky);
|
||||
protected String[] calculateAbilityDisplayValues(float skillValue, SecondaryAbility skillAbility, boolean isLucky) {
|
||||
int maxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(skillAbility);
|
||||
|
||||
return calculateAbilityDisplayValues((AdvancedConfig.getInstance().getMaxChance(skillAbility) / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), isLucky);
|
||||
}
|
||||
|
||||
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||
@@ -38,7 +39,7 @@ public class SmeltingCommand extends SkillCommand {
|
||||
|
||||
// SECOND SMELT
|
||||
if (canSecondSmelt) {
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, Smelting.secondSmeltMaxLevel, Smelting.secondSmeltMaxChance, isLucky);
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SECOND_SMELT, isLucky);
|
||||
secondSmeltChance = secondSmeltStrings[0];
|
||||
secondSmeltChanceLucky = secondSmeltStrings[1];
|
||||
}
|
||||
@@ -53,9 +54,9 @@ public class SmeltingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canFuelEfficiency = Permissions.fuelEfficiency(player);
|
||||
canSecondSmelt = Permissions.doubleDrops(player, skill);
|
||||
canFluxMine = Permissions.fluxMining(player);
|
||||
canFuelEfficiency = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FUEL_EFFICIENCY);
|
||||
canSecondSmelt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SECOND_SMELT);
|
||||
canFluxMine = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FLUX_MINING);
|
||||
canVanillaXPBoost = Permissions.vanillaXpBoost(player, skill);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,16 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.swords.Swords;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class SwordsCommand extends SkillCommand {
|
||||
private String counterAttackChance;
|
||||
private String counterAttackChanceLucky;
|
||||
private String counterChance;
|
||||
private String counterChanceLucky;
|
||||
private int bleedLength;
|
||||
private String bleedChance;
|
||||
private String bleedChanceLucky;
|
||||
@@ -38,25 +40,25 @@ public class SwordsCommand extends SkillCommand {
|
||||
|
||||
// BLEED
|
||||
if (canBleed) {
|
||||
bleedLength = (skillValue >= Swords.bleedMaxBonusLevel) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
bleedLength = (skillValue >= AdvancedConfig.getInstance().getMaxBonusLevel(SecondaryAbility.BLEED)) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(skillValue, Swords.bleedMaxBonusLevel, Swords.bleedMaxChance, isLucky);
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.BLEED, isLucky);
|
||||
bleedChance = bleedStrings[0];
|
||||
bleedChanceLucky = bleedStrings[1];
|
||||
}
|
||||
|
||||
// COUNTER ATTACK
|
||||
// COUNTER
|
||||
if (canCounter) {
|
||||
String[] counterAttackStrings = calculateAbilityDisplayValues(skillValue, Swords.counterAttackMaxBonusLevel, Swords.counterAttackMaxChance, isLucky);
|
||||
counterAttackChance = counterAttackStrings[0];
|
||||
counterAttackChanceLucky = counterAttackStrings[1];
|
||||
String[] counterStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.COUNTER, isLucky);
|
||||
counterChance = counterStrings[0];
|
||||
counterChanceLucky = counterStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBleed = Permissions.bleed(player);
|
||||
canCounter = Permissions.counterAttack(player);
|
||||
canBleed = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BLEED);
|
||||
canCounter = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.COUNTER);
|
||||
canSerratedStrike = Permissions.serratedStrikes(player);
|
||||
}
|
||||
|
||||
@@ -85,7 +87,7 @@ public class SwordsCommand extends SkillCommand {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCounter) {
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Counter.Chance", counterAttackChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterAttackChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Counter.Chance", counterChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canBleed) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.taming.Taming;
|
||||
@@ -33,7 +34,7 @@ public class TamingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
if (canGore) {
|
||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, Taming.goreMaxBonusLevel, Taming.goreMaxChance, isLucky);
|
||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GORE, isLucky);
|
||||
goreChance = goreStrings[0];
|
||||
goreChanceLucky = goreStrings[1];
|
||||
}
|
||||
@@ -41,15 +42,15 @@ public class TamingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBeastLore = Permissions.beastLore(player);
|
||||
canBeastLore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BEAST_LORE);
|
||||
canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT);
|
||||
canEnvironmentallyAware = Permissions.environmentallyAware(player);
|
||||
canFastFood = Permissions.fastFoodService(player);
|
||||
canGore = Permissions.gore(player);
|
||||
canSharpenedClaws = Permissions.sharpenedClaws(player);
|
||||
canShockProof = Permissions.shockProof(player);
|
||||
canThickFur = Permissions.thickFur(player);
|
||||
canHolyHound = Permissions.holyHound(player);
|
||||
canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ENVIROMENTALLY_AWARE);
|
||||
canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FAST_FOOD);
|
||||
canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GORE);
|
||||
canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHARPENED_CLAWS);
|
||||
canShockProof = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHOCK_PROOF);
|
||||
canThickFur = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.THICK_FUR);
|
||||
canHolyHound = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HOLY_HOUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,9 +91,9 @@ public class TamingCommand extends SkillCommand {
|
||||
|
||||
if (canCallWild) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWOcelotCost()));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWWolfCost()));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWHorseCost()));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWCost(EntityType.OCELOT)));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWCost(EntityType.WOLF)));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWCost(EntityType.HORSE)));
|
||||
}
|
||||
|
||||
return messages;
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.unarmed.Unarmed;
|
||||
@@ -23,7 +24,7 @@ public class UnarmedCommand extends SkillCommand {
|
||||
|
||||
private boolean canBerserk;
|
||||
private boolean canDisarm;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canIronArm;
|
||||
private boolean canDeflect;
|
||||
private boolean canIronGrip;
|
||||
|
||||
@@ -42,26 +43,26 @@ public class UnarmedCommand extends SkillCommand {
|
||||
|
||||
// DISARM
|
||||
if (canDisarm) {
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, Unarmed.disarmMaxBonusLevel, Unarmed.disarmMaxChance, isLucky);
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DISARM, isLucky);
|
||||
disarmChance = disarmStrings[0];
|
||||
disarmChanceLucky = disarmStrings[1];
|
||||
}
|
||||
|
||||
// DEFLECT
|
||||
if (canDeflect) {
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, Unarmed.deflectMaxBonusLevel, Unarmed.deflectMaxChance, isLucky);
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DEFLECT, isLucky);
|
||||
deflectChance = deflectStrings[0];
|
||||
deflectChanceLucky = deflectStrings[1];
|
||||
}
|
||||
|
||||
// IRON ARM
|
||||
if (canBonusDamage) {
|
||||
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||
if (canIronArm) {
|
||||
ironArmBonus = Math.min(Unarmed.ironArmMinBonusDamage + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||
}
|
||||
|
||||
// IRON GRIP
|
||||
if (canIronGrip) {
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, Unarmed.ironGripMaxBonusLevel, Unarmed.ironGripMaxChance, isLucky);
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.IRON_GRIP, isLucky);
|
||||
ironGripChance = ironGripStrings[0];
|
||||
ironGripChanceLucky = ironGripStrings[1];
|
||||
}
|
||||
@@ -70,10 +71,11 @@ public class UnarmedCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBerserk = Permissions.berserk(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canDeflect = Permissions.arrowDeflect(player);
|
||||
canDisarm = Permissions.disarm(player);
|
||||
canIronGrip = Permissions.ironGrip(player);
|
||||
canIronArm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_ARM);
|
||||
canDeflect = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DEFLECT);
|
||||
canDisarm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DISARM);
|
||||
canIronGrip = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_GRIP);
|
||||
// TODO: Apparently we forgot about block cracker?
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,12 +85,13 @@ public class UnarmedCommand extends SkillCommand {
|
||||
if (canBerserk) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.0"), LocaleLoader.getString("Unarmed.Effect.1")));
|
||||
}
|
||||
// TODO: Apparently we forgot about block cracker?
|
||||
|
||||
if (canDisarm) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.2"), LocaleLoader.getString("Unarmed.Effect.3")));
|
||||
}
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5")));
|
||||
}
|
||||
|
||||
@@ -107,7 +110,7 @@ public class UnarmedCommand extends SkillCommand {
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class WoodcuttingCommand extends SkillCommand {
|
||||
@@ -36,7 +36,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Woodcutting.doubleDropsMaxLevel, Woodcutting.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreeFell = Permissions.treeFeller(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.leafBlower(player);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.LEAF_BLOWER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,10 +4,15 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.alchemy.Alchemy;
|
||||
import com.gmail.nossr50.skills.fishing.Fishing;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
import com.gmail.nossr50.skills.salvage.Salvage;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
private static AdvancedConfig instance;
|
||||
@@ -40,11 +45,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* ACROBATICS */
|
||||
if (getDodgeChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDodgeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -52,11 +57,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Dodge.DamageModifier should be greater than 1!");
|
||||
}
|
||||
|
||||
if (getRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -64,11 +69,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Roll.DamageThreshold should be at least 0!");
|
||||
}
|
||||
|
||||
if (getGracefulRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGracefulRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -76,6 +81,38 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.DamageThreshold should be at least 0!");
|
||||
}
|
||||
|
||||
/* ALCHEMY */
|
||||
if (getCatalysisUnlockLevel() < 0) {
|
||||
reason.add("Skills.Alchemy.Catalysis.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getCatalysisMaxBonusLevel() <= getCatalysisUnlockLevel()) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MaxBonusLevel should be greater than Skills.Alchemy.Catalysis.UnlockLevel!");
|
||||
}
|
||||
|
||||
if (getCatalysisMinSpeed() <= 0) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MinSpeed must be greater than 0!");
|
||||
}
|
||||
|
||||
if (getCatalysisMaxSpeed() < getCatalysisMinSpeed()) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MaxSpeed should be at least Skills.Alchemy.Catalysis.MinSpeed!");
|
||||
}
|
||||
|
||||
List<Alchemy.Tier> alchemyTierList = Arrays.asList(Alchemy.Tier.values());
|
||||
for (Alchemy.Tier tier : alchemyTierList) {
|
||||
if (getConcoctionsTierLevel(tier) < 0) {
|
||||
reason.add("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (tier != Alchemy.Tier.fromNumerical(Alchemy.Tier.values().length)) {
|
||||
Alchemy.Tier nextTier = alchemyTierList.get(alchemyTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getConcoctionsTierLevel(tier) > getConcoctionsTierLevel(nextTier)) {
|
||||
reason.add("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Alchemy.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ARCHERY */
|
||||
if (getSkillShotIncreaseLevel() < 1) {
|
||||
reason.add("Skills.Archery.SkillShot.IncreaseLevel should be at least 1!");
|
||||
@@ -89,23 +126,23 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Archery.SkillShot.MaxBonus should be at least 0!");
|
||||
}
|
||||
|
||||
if (getDazeBonusMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDazeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDazeModifier() < 0) {
|
||||
if (getDazeBonusDamage() < 0) {
|
||||
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 0!");
|
||||
}
|
||||
|
||||
if (getRetrieveChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRetrieveMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -114,28 +151,28 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* AXES */
|
||||
if (getBonusDamageAxesBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonus should be at least 1!");
|
||||
if (getAxeMasteryBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonus should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBonusDamageAxesMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonusLevel should be at least 1!");
|
||||
if (getAxeMasteryMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalChance() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.ChanceMax should be at least 1!");
|
||||
if (getMaxChance(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.MaxBonusLevel should be at least 1!");
|
||||
if (getMaxBonusLevel(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVP_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVP_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVE_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVE_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreaterImpactChance() < 1) {
|
||||
@@ -185,8 +222,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != Fishing.Tier.EIGHT) {
|
||||
Fishing.Tier nextTier = fishingTierList.get(fishingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getFishingTierLevel(tier) >= getFishingTierLevel(nextTier)) {
|
||||
reason.add("Skills.Fishing.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Fishing.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getFishingTierLevel(tier) > getFishingTierLevel(nextTier)) {
|
||||
reason.add("Skills.Fishing.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Fishing.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getShakeChance(tier) > getShakeChance(nextTier)) {
|
||||
@@ -203,12 +240,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIceFishingUnlockLevel() < 1) {
|
||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 1!");
|
||||
if (getIceFishingUnlockLevel() < 0) {
|
||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerUnlockLevel() < 1) {
|
||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 1!");
|
||||
if (getMasterAnglerUnlockLevel() < 0) {
|
||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerBoatModifier() < 1) {
|
||||
@@ -228,44 +265,44 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Herbalism.GreenThumb.StageChange should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
/* MINING */
|
||||
if (getMiningDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMiningDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -299,8 +336,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != BlastMining.Tier.EIGHT) {
|
||||
BlastMining.Tier nextTier = blastMiningTierList.get(blastMiningTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getBlastMiningRankLevel(tier) >= getBlastMiningRankLevel(nextTier)) {
|
||||
reason.add("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Mining.BlastMining.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getBlastMiningRankLevel(tier) > getBlastMiningRankLevel(nextTier)) {
|
||||
reason.add("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Mining.BlastMining.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getBlastDamageDecrease(tier) > getBlastDamageDecrease(nextTier)) {
|
||||
@@ -334,18 +371,14 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Repair.RepairMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSalvageUnlockLevel() < 1) {
|
||||
reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
|
||||
|
||||
for (ArcaneForging.Tier tier : arcaneForgingTierList) {
|
||||
@@ -364,8 +397,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != ArcaneForging.Tier.EIGHT) {
|
||||
ArcaneForging.Tier nextTier = arcaneForgingTierList.get(arcaneForgingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getArcaneForgingRankLevel(tier) >= getArcaneForgingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getArcaneForgingRankLevel(tier) > getArcaneForgingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneForgingDowngradeChance(nextTier) > getArcaneForgingDowngradeChance(tier)) {
|
||||
@@ -378,6 +411,51 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
}
|
||||
|
||||
/* SALVAGE */
|
||||
if (getSalvageMaxPercentage() < 1) {
|
||||
reason.add("Skills.Salvage.MaxPercentage should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSalvageMaxPercentageLevel() < 1) {
|
||||
reason.add("Skills.Salvage.MaxPercentageLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAdvancedSalvageUnlockLevel() < 1) {
|
||||
reason.add("Skills.Salvage.AdvancedSalvage.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
List<Salvage.Tier> salvageTierList = Arrays.asList(Salvage.Tier.values());
|
||||
|
||||
for (Salvage.Tier tier : salvageTierList) {
|
||||
if (getArcaneSalvageRankLevel(tier) < 0) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractFullEnchantsChance(tier) < 0 || getArcaneSalvageExtractFullEnchantsChance(tier) > 100) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractPartialEnchantsChance(tier) < 0 || getArcaneSalvageExtractPartialEnchantsChance(tier) > 100) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
|
||||
}
|
||||
|
||||
if (tier != Salvage.Tier.EIGHT) {
|
||||
Salvage.Tier nextTier = salvageTierList.get(salvageTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getArcaneSalvageRankLevel(tier) >= getArcaneSalvageRankLevel(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractFullEnchantsChance(tier) > getArcaneSalvageExtractFullEnchantsChance(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractPartialEnchantsChance(tier) > getArcaneSalvageExtractPartialEnchantsChance(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SMELTING */
|
||||
if (getBurnModifierMaxLevel() < 1) {
|
||||
reason.add("Skills.Smelting.FuelEfficiency.MaxBonusLevel should be at least 1!");
|
||||
@@ -387,16 +465,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Smelting.FuelEfficiency.Multiplier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getFluxMiningUnlockLevel() < 1) {
|
||||
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 1!");
|
||||
if (getFluxMiningUnlockLevel() < 0) {
|
||||
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFluxMiningChance() < 1) {
|
||||
@@ -417,22 +495,22 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != Smelting.Tier.EIGHT) {
|
||||
Smelting.Tier nextTier = smeltingTierList.get(smeltingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getSmeltingRankLevel(tier) >= getSmeltingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Smelting.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Smelting.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getSmeltingRankLevel(tier) > getSmeltingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Smelting.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getSmeltingVanillaXPBoostMultiplier(tier) > getSmeltingRankLevel(nextTier)) {
|
||||
if (getSmeltingVanillaXPBoostMultiplier(tier) > getSmeltingVanillaXPBoostMultiplier(nextTier)) {
|
||||
reason.add("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.VanillaXPMultiplier.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SWORDS */
|
||||
if (getBleedChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBleedMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -448,11 +526,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Swords.Bleed.BaseTicks should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -470,11 +548,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
/* TAMING */
|
||||
|
||||
if (getGoreChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGoreMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -486,40 +564,40 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getFastFoodUnlock() < 1) {
|
||||
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 1!");
|
||||
if (getFastFoodUnlock() < 0) {
|
||||
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFastFoodChance() < 1) {
|
||||
reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
|
||||
}
|
||||
|
||||
if (getEnviromentallyAwareUnlock() < 1) {
|
||||
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 1!");
|
||||
if (getEnviromentallyAwareUnlock() < 0) {
|
||||
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getThickFurUnlock() < 1) {
|
||||
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 1!");
|
||||
if (getThickFurUnlock() < 0) {
|
||||
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getThickFurModifier() < 1) {
|
||||
reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHolyHoundUnlock() < 1) {
|
||||
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 1!");
|
||||
if (getHolyHoundUnlock() < 0) {
|
||||
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getShockProofUnlock() < 1) {
|
||||
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 1!");
|
||||
if (getShockProofUnlock() < 0) {
|
||||
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getShockProofModifier() < 1) {
|
||||
reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSharpenedClawsUnlock() < 1) {
|
||||
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 1!");
|
||||
if (getSharpenedClawsUnlock() < 0) {
|
||||
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getSharpenedClawsBonus() < 1) {
|
||||
@@ -531,27 +609,27 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* UNARMED */
|
||||
if (getDisarmChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDisarmMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -572,15 +650,15 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* WOODCUTTING */
|
||||
if (getLeafBlowUnlockLevel() < 1) {
|
||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 1!");
|
||||
if (getLeafBlowUnlockLevel() < 0) {
|
||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -611,42 +689,41 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
||||
|
||||
public int getMaxBonusLevel(SecondaryAbility skillAbility) { return config.getInt("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace(" ", "") + ".MaxBonusLevel"); }
|
||||
public double getMaxChance(SecondaryAbility skillAbility) { return config.getDouble("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace(" ", "") + ".ChanceMax", 100.0D); }
|
||||
|
||||
/* ACROBATICS */
|
||||
public double getDodgeChanceMax() { return config.getDouble("Skills.Acrobatics.Dodge.ChanceMax", 20.0D); }
|
||||
public int getDodgeMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Dodge.MaxBonusLevel", 800); }
|
||||
public double getDodgeDamageModifier() { return config.getDouble("Skills.Acrobatics.Dodge.DamageModifier", 2.0D); }
|
||||
|
||||
public double getRollChanceMax() { return config.getDouble("Skills.Acrobatics.Roll.ChanceMax", 100.0D); }
|
||||
public int getRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Roll.MaxBonusLevel", 1000); }
|
||||
public double getRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.Roll.DamageThreshold", 7.0D); }
|
||||
|
||||
public double getGracefulRollChanceMax() { return config.getDouble("Skills.Acrobatics.GracefulRoll.ChanceMax", 100.0D); }
|
||||
public int getGracefulRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.GracefulRoll.MaxBonusLevel", 500); }
|
||||
public double getGracefulRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.GracefulRoll.DamageThreshold", 14.0D); }
|
||||
|
||||
/* ALCHEMY */
|
||||
public int getCatalysisUnlockLevel() { return config.getInt("Skills.Alchemy.Catalysis.UnlockLevel", 100); }
|
||||
public int getCatalysisMaxBonusLevel() { return config.getInt("Skills.Alchemy.Catalysis.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getCatalysisMinSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MinSpeed", 1.0D); }
|
||||
public double getCatalysisMaxSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MaxSpeed", 4.0D); }
|
||||
|
||||
public int getConcoctionsTierLevel(Alchemy.Tier tier) { return config.getInt("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* ARCHERY */
|
||||
public int getSkillShotIncreaseLevel() { return config.getInt("Skills.Archery.SkillShot.IncreaseLevel", 50); }
|
||||
public double getSkillShotIncreasePercentage() { return config.getDouble("Skills.Archery.SkillShot.IncreasePercentage", 0.1D); }
|
||||
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
||||
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot.MaxDamage", 9.0D); }
|
||||
|
||||
public double getDazeBonusMax() { return config.getDouble("Skills.Archery.Daze.ChanceMax", 50.0D); }
|
||||
public int getDazeMaxBonusLevel() { return config.getInt("Skills.Archery.Daze.MaxBonusLevel", 1000); }
|
||||
public double getDazeModifier() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
||||
|
||||
public double getRetrieveChanceMax() { return config.getDouble("Skills.Archery.Retrieve.ChanceMax", 100.0D); }
|
||||
public int getRetrieveMaxBonusLevel() { return config.getInt("Skills.Archery.Retrieve.MaxBonusLevel", 1000); }
|
||||
public double getDazeBonusDamage() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
||||
|
||||
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
||||
|
||||
/* AXES */
|
||||
public double getBonusDamageAxesBonusMax() { return config.getDouble("Skills.Axes.DamageIncrease.MaxBonus", 4.0D); }
|
||||
public int getBonusDamageAxesMaxBonusLevel() { return config.getInt("Skills.Axes.DamageIncrease.MaxBonusLevel", 200); }
|
||||
public double getAxeMasteryBonusMax() { return config.getDouble("Skills.Axes.AxeMastery.MaxBonus", 4.0D); }
|
||||
public int getAxeMasteryMaxBonusLevel() { return config.getInt("Skills.Axes.AxeMastery.MaxBonusLevel", 200); }
|
||||
|
||||
public double getAxesCriticalChance() { return config.getDouble("Skills.Axes.AxesCritical.ChanceMax", 37.50D); }
|
||||
public int getAxesCriticalMaxBonusLevel() { return config.getInt("Skills.Axes.AxesCritical.MaxBonusLevel", 750); }
|
||||
public double getAxesCriticalPVPModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVP_Modifier", 1.5D); }
|
||||
public double getAxesCriticalPVEModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVE_Modifier", 2.0D); }
|
||||
public double getCriticalHitPVPModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVP_Modifier", 1.5D); }
|
||||
public double getCriticalHitPVEModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVE_Modifier", 2.0D); }
|
||||
|
||||
public double getGreaterImpactChance() { return config.getDouble("Skills.Axes.GreaterImpact.Chance", 25.0D); }
|
||||
public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); }
|
||||
@@ -678,22 +755,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
||||
|
||||
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
|
||||
public double getGreenThumbChanceMax() { return config.getDouble("Skills.Herbalism.GreenThumb.ChanceMax", 100.0D); }
|
||||
public int getGreenThumbMaxLevel() { return config.getInt("Skills.Herbalism.GreenThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
public double getHerbalismDoubleDropsChanceMax() { return config.getDouble("Skills.Herbalism.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getHerbalismDoubleDropsMaxLevel() { return config.getInt("Skills.Herbalism.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getHylianLuckChanceMax() { return config.getDouble("Skills.Herbalism.HylianLuck.ChanceMax", 10.0D); }
|
||||
public int getHylianLuckMaxLevel() { return config.getInt("Skills.Herbalism.HylianLuck.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getShroomThumbChanceMax() { return config.getDouble("Skills.Herbalism.ShroomThumb.ChanceMax", 50.0D); }
|
||||
public int getShroomThumbMaxLevel() { return config.getInt("Skills.Herbalism.ShroomThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
/* MINING */
|
||||
public double getMiningDoubleDropChance() { return config.getDouble("Skills.Mining.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getMiningDoubleDropMaxLevel() { return config.getInt("Skills.Mining.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public int getBlastMiningRankLevel(BlastMining.Tier tier) { return config.getInt("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
public double getBlastDamageDecrease(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.BlastDamageDecrease.Rank_" + tier.toNumerical()); }
|
||||
public double getOreBonus(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + tier.toNumerical()); }
|
||||
@@ -704,9 +767,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* REPAIR */
|
||||
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
|
||||
public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 1000); }
|
||||
public double getSuperRepairChanceMax() { return config.getDouble("Skills.Repair.SuperRepair.ChanceMax", 100.0D); }
|
||||
public int getSuperRepairMaxLevel() { return config.getInt("Skills.Repair.SuperRepair.MaxBonusLevel", 1000); }
|
||||
public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage.UnlockLevel", 600); }
|
||||
|
||||
/* Arcane Forging */
|
||||
public int getArcaneForgingRankLevel(ArcaneForging.Tier tier) { return config.getInt("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
@@ -717,13 +777,23 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.Downgrades_Enabled", true); }
|
||||
public double getArcaneForgingDowngradeChance(ArcaneForging.Tier tier) { return config.getDouble("Skills.Repair.ArcaneForging.Downgrades_Chance.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SALVAGE */
|
||||
public double getSalvageMaxPercentage() { return config.getDouble("Skills.Salvage.MaxPercentage", 100.0D); }
|
||||
public int getSalvageMaxPercentageLevel() { return config.getInt("Skills.Salvage.MaxPercentageLevel", 1000); }
|
||||
|
||||
public int getAdvancedSalvageUnlockLevel() { return config.getInt("Skills.Salvage.AdvancedSalvage.UnlockLevel", 350); }
|
||||
|
||||
public boolean getArcaneSalvageEnchantDowngradeEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantDowngradeEnabled", true); }
|
||||
public boolean getArcaneSalvageEnchantLossEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantLossEnabled", true); }
|
||||
|
||||
public int getArcaneSalvageRankLevel(Salvage.Tier tier) { return config.getInt("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
public double getArcaneSalvageExtractFullEnchantsChance(Salvage.Tier tier) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical()); }
|
||||
public double getArcaneSalvageExtractPartialEnchantsChance(Salvage.Tier tier) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SMELTING */
|
||||
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency.MaxBonusLevel", 1000); }
|
||||
public double getBurnTimeMultiplier() { return config.getDouble("Skills.Smelting.FuelEfficiency.Multiplier", 3.0D); }
|
||||
|
||||
public int getSecondSmeltMaxLevel() { return config.getInt("Skills.Smelting.SecondSmelt.MaxBonusLevel", 1000); }
|
||||
public double getSecondSmeltMaxChance() { return config.getDouble("Skills.Smelting.SecondSmelt.ChanceMax", 100.0D); }
|
||||
|
||||
public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining.UnlockLevel", 250); }
|
||||
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
|
||||
|
||||
@@ -732,22 +802,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SWORDS */
|
||||
public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed.ChanceMax", 75.0D); }
|
||||
public int getBleedMaxBonusLevel() { return config.getInt("Skills.Swords.Bleed.MaxBonusLevel", 750); }
|
||||
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||
|
||||
public boolean getCounterRequiresBlock() { return config.getBoolean("Skills.Swords.Counter.RequiresBlock"); }
|
||||
public double getCounterChanceMax() { return config.getDouble("Skills.Swords.Counter.ChanceMax", 30.0D); }
|
||||
public int getCounterMaxBonusLevel() { return config.getInt("Skills.Swords.Counter.MaxBonusLevel", 600); }
|
||||
public double getCounterModifier() { return config.getDouble("Skills.Swords.Counter.DamageModifier", 2.0D); }
|
||||
|
||||
public double getSerratedStrikesModifier() { return config.getDouble("Skills.Swords.SerratedStrikes.DamageModifier", 4.0D); }
|
||||
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.BleedTicks", 5); }
|
||||
|
||||
/* TAMING */
|
||||
public double getGoreChanceMax() { return config.getDouble("Skills.Taming.Gore.ChanceMax", 100.0D); }
|
||||
public int getGoreMaxBonusLevel() { return config.getInt("Skills.Taming.Gore.MaxBonusLevel", 1000); }
|
||||
public int getGoreBleedTicks() { return config.getInt("Skills.Taming.Gore.BleedTicks", 2); }
|
||||
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
|
||||
|
||||
@@ -767,28 +831,18 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getSharpenedClawsUnlock() { return config.getInt("Skills.Taming.SharpenedClaws.UnlockLevel", 750); }
|
||||
public double getSharpenedClawsBonus() { return config.getDouble("Skills.Taming.SharpenedClaws.Bonus", 2.0D); }
|
||||
|
||||
public double getMinHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MinHorseJumpStrength", 0.7D); }
|
||||
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
||||
|
||||
/* UNARMED */
|
||||
public double getDisarmChanceMax() { return config.getDouble("Skills.Unarmed.Disarm.ChanceMax", 33.0D); }
|
||||
public int getDisarmMaxBonusLevel() { return config.getInt("Skills.Unarmed.Disarm.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getDeflectChanceMax() { return config.getDouble("Skills.Unarmed.Deflect.ChanceMax", 50.0D); }
|
||||
public int getDeflectMaxBonusLevel() { return config.getInt("Skills.Unarmed.Deflect.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronGripChanceMax() { return config.getDouble("Skills.Unarmed.IronGrip.ChanceMax", 100.0D); }
|
||||
public int getIronGripMaxBonusLevel() { return config.getInt("Skills.Unarmed.IronGrip.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronArmMinBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMin", 3.0D); }
|
||||
public double getIronArmMaxBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMax", 8.0D); }
|
||||
public int getIronArmIncreaseLevel() { return config.getInt("Skills.Unarmed.IronArm.IncreaseLevel", 50); }
|
||||
public boolean getDisarmProtected() { return config.getBoolean("Skills.Unarmed.Disarm.AntiTheft", false); }
|
||||
|
||||
/* WOODCUTTING */
|
||||
public int getLeafBlowUnlockLevel() { return config.getInt("Skills.Woodcutting.LeafBlower.UnlockLevel", 100); }
|
||||
|
||||
public double getWoodcuttingDoubleDropChance() { return config.getDouble("Skills.Woodcutting.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getWoodcuttingDoubleDropMaxLevel() { return config.getInt("Skills.Woodcutting.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
/* KRAKEN STUFF */
|
||||
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
||||
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
||||
|
||||
@@ -5,10 +5,12 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeSpecies;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@@ -109,7 +111,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
if (getChimaeraRecipeCost() < 1 || getChimaeraRecipeCost() > 9) {
|
||||
reason.add("Items.Chimaera_Wing.Recipe_Cost only accepts values from 1 to 64!");
|
||||
reason.add("Items.Chimaera_Wing.Recipe_Cost only accepts values from 1 to 9!");
|
||||
}
|
||||
|
||||
if (getChimaeraItem() == null) {
|
||||
@@ -146,6 +148,16 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
reason.add("Party.Sharing.Range should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getPartyXpCurveMultiplier() < 1) {
|
||||
reason.add("Party.Leveling.Xp_Curve_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||
if (getPartyFeatureUnlockLevel(partyFeature) < 0) {
|
||||
reason.add("Party.Leveling." + StringUtils.getPrettyPartyFeatureString(partyFeature).replace(" ", "") + "_UnlockLevel should be at least 0!");
|
||||
}
|
||||
}
|
||||
|
||||
/* Inspect command distance */
|
||||
if (getInspectDistance() <= 0) {
|
||||
reason.add("Commands.inspect.Max_Distance should be greater than 0!");
|
||||
@@ -171,20 +183,40 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
reason.add("Cannot use the same item for Repair and Salvage anvils!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWWolfCost() < 1) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Bones_Required should be at least 1!");
|
||||
if (getTamingCOTWMaterial(EntityType.WOLF) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWOcelotCost() < 1) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Fish_Required should be at least 1!");
|
||||
if (getTamingCOTWMaterial(EntityType.OCELOT) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot_Amount should be greater than 0!");
|
||||
if (getTamingCOTWMaterial(EntityType.HORSE) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.WOLF) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.HORSE) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf_Amount should be greater than 0!");
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.HORSE) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
return noErrorsInConfig(reason);
|
||||
@@ -206,16 +238,17 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getUpdateCheckEnabled() { return config.getBoolean("General.Update_Check", true); }
|
||||
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
||||
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
||||
public boolean getConfigOverwriteEnabled() { return config.getBoolean("General.Config_Update_Overwrite", true); }
|
||||
|
||||
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
||||
public boolean getPartyChatColorLeaderName() { return config.getBoolean("Commands.partychat.Gold_Leader_Name", true); }
|
||||
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.partychat.Use_Display_Names", true); }
|
||||
public String getPartyChatPrefixAlly() { return config.getString("Commands.partychat.Chat_Prefix_Format_Ally", "[[GREEN]](A)[[RESET]]"); }
|
||||
|
||||
public String getAdminChatPrefix() { return config.getString("Commands.adminchat.Chat_Prefix_Format", "[[AQUA]][[[WHITE]]{0}[[AQUA]]]"); }
|
||||
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.adminchat.Use_Display_Names", true); }
|
||||
|
||||
public boolean getMatchOfflinePlayers() { return config.getBoolean("Commands.Generic.Match_OfflinePlayers", false); }
|
||||
public long getDatabasePlayerCooldown() { return config.getLong("Commands.Database.Player_Cooldown", 1750); }
|
||||
|
||||
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
||||
|
||||
@@ -232,6 +265,11 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getMobHealthbarTime() { return config.getInt("Mob_Healthbar.Display_Time", 3); }
|
||||
|
||||
/* Scoreboards */
|
||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||
public boolean getShowStatsAfterLogin() { return config.getBoolean("Scoreboard.Show_Stats_After_Login", false); }
|
||||
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
||||
|
||||
public boolean getRankUseChat() { return config.getBoolean("Scoreboard.Types.Rank.Print", false); }
|
||||
public boolean getRankUseBoard() { return config.getBoolean("Scoreboard.Types.Rank.Board", true); }
|
||||
public int getRankScoreboardTime() { return config.getInt("Scoreboard.Types.Rank.Display_Time", 10); }
|
||||
@@ -257,11 +295,6 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getSkillLevelUpBoard() { return config.getBoolean("Scoreboard.Types.Skill.LevelUp_Board", true); }
|
||||
public int getSkillLevelUpTime() { return config.getInt("Scoreboard.Types.Skill.LevelUp_Time", 5); }
|
||||
|
||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||
|
||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
||||
|
||||
/* Database Purging */
|
||||
public int getPurgeInterval() { return config.getInt("Database_Purging.Purge_Interval", -1); }
|
||||
public int getOldUsersCutoff() { return config.getInt("Database_Purging.Old_User_Cutoff", 6); }
|
||||
@@ -301,12 +334,16 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss.Penalty_Percentage", 75.0D); }
|
||||
public void setHardcoreDeathStatPenaltyPercentage(double value) { config.set("Hardcore.Death_Stat_Loss.Penalty_Percentage", value); }
|
||||
|
||||
public int getHardcoreDeathStatPenaltyLevelThreshold() { return config.getInt("Hardcore.Death_Stat_Loss.Level_Threshold", 0); }
|
||||
|
||||
public boolean getHardcoreVampirismEnabled(SkillType skillType) { return config.getBoolean("Hardcore.Vampirism.Enabled." + StringUtils.getCapitalized(skillType.toString()), false); }
|
||||
public void setHardcoreVampirismEnabled(SkillType skillType, boolean enabled) { config.set("Hardcore.Vampirism.Enabled." + StringUtils.getCapitalized(skillType.toString()), enabled); }
|
||||
|
||||
public double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism.Leech_Percentage", 5.0D); }
|
||||
public void setHardcoreVampirismStatLeechPercentage(double value) { config.set("Hardcore.Vampirism.Leech_Percentage", value); }
|
||||
|
||||
public int getHardcoreVampirismLevelThreshold() { return config.getInt("Hardcore.Vampirism.Level_Threshold", 0); }
|
||||
|
||||
/* SMP Mods */
|
||||
public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
||||
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Armor_Mods_Enabled", false); }
|
||||
@@ -337,19 +374,29 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
/* PARTY SETTINGS */
|
||||
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
||||
public int getAutoPartyKickTime() { return config.getInt("Party.Old_Party_Member_Cutoff", 7); }
|
||||
public boolean getExpShareEnabled() { return config.getBoolean("Party.Sharing.ExpShare_enabled", true); }
|
||||
|
||||
public double getPartyShareBonusBase() { return config.getDouble("Party.Sharing.ExpShare_bonus_base", 1.1D); }
|
||||
public double getPartyShareBonusIncrease() { return config.getDouble("Party.Sharing.ExpShare_bonus_increase", 0.05D); }
|
||||
public double getPartyShareBonusCap() { return config.getDouble("Party.Sharing.ExpShare_bonus_cap", 1.5D); }
|
||||
public boolean getItemShareEnabled() { return config.getBoolean("Party.Sharing.ItemShare_enabled", true); }
|
||||
public double getPartyShareRange() { return config.getDouble("Party.Sharing.Range", 75.0D); }
|
||||
|
||||
public int getPartyLevelCap() {
|
||||
int cap = config.getInt("Party.Leveling.Level_Cap", 10);
|
||||
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
||||
}
|
||||
|
||||
public int getPartyXpCurveMultiplier() { return config.getInt("Party.Leveling.Xp_Curve_Modifier", 3); }
|
||||
public boolean getPartyXpNearMembersNeeded() { return config.getBoolean("Party.Leveling.Near_Members_Needed", false); }
|
||||
public boolean getPartyInformAllMembers() { return config.getBoolean("Party.Leveling.Inform_All_Party_Members_On_LevelUp", false); }
|
||||
|
||||
public int getPartyFeatureUnlockLevel(PartyFeature partyFeature) { return config.getInt("Party.Leveling." + StringUtils.getPrettyPartyFeatureString(partyFeature).replace(" ", "") + "_UnlockLevel", 0); }
|
||||
|
||||
/* Party Teleport Settings */
|
||||
public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 120); }
|
||||
public int getPTPCommandWarmup() { return config.getInt("Commands.ptp.Warmup", 5); }
|
||||
public int getPTPCommandRecentlyHurtCooldown() { return config.getInt("Commands.ptp.RecentlyHurt_Cooldown", 60); }
|
||||
public int getPTPCommandTimeout() { return config.getInt("Commands.ptp.Request_Timeout", 300); }
|
||||
public boolean getPTPCommandConfirmRequired() { return config.getBoolean("Commands.ptp.Confirm_Required", true); }
|
||||
public boolean getPTPCommandConfirmRequired() { return config.getBoolean("Commands.ptp.Accept_Required", true); }
|
||||
public boolean getPTPCommandWorldPermissions() { return config.getBoolean("Commands.ptp.World_Based_Permissions", false); }
|
||||
|
||||
/* Inspect command distance */
|
||||
@@ -396,10 +443,17 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
/* Acrobatics */
|
||||
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
||||
public boolean getPreventXPAfterTeleport() { return config.getBoolean("Skills.Acrobatics.Prevent_XP_After_Teleport", true); }
|
||||
public int getXPAfterTeleportCooldown() { return config.getInt("Skills.Acrobatics.XP_After_Teleport_Cooldown", 5); }
|
||||
|
||||
/* Alchemy */
|
||||
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
||||
public boolean getPreventHopperTransferIngredients() { return config.getBoolean("Skills.Alchemy.Prevent_Hopper_Transfer_Ingredients", false); }
|
||||
public boolean getPreventHopperTransferBottles() { return config.getBoolean("Skills.Alchemy.Prevent_Hopper_Transfer_Bottles", false); }
|
||||
|
||||
/* Fishing */
|
||||
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
||||
public boolean getFishingOverrideTreasures() { return config.getBoolean("Skills.Fishing.Override_Vanilla_Treasures", true); }
|
||||
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
|
||||
|
||||
/* Mining */
|
||||
public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); }
|
||||
@@ -409,26 +463,27 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getRepairAnvilPlaceSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Placed_Sounds", true); }
|
||||
public boolean getRepairAnvilUseSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Use_Sounds", true); }
|
||||
public Material getRepairAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Anvil_Material", "IRON_BLOCK")); }
|
||||
public Material getSalvageAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Salvage_Anvil_Material", "GOLD_BLOCK")); }
|
||||
public boolean getSalvageTools() { return config.getBoolean("Skills.Repair.Salvage_tools", true); }
|
||||
public boolean getSalvageArmor() { return config.getBoolean("Skills.Repair.Salvage_armor", true); }
|
||||
public boolean getRepairConfirmRequired() { return config.getBoolean("Skills.Repair.Confirm_Required", true); }
|
||||
|
||||
/* Salvage */
|
||||
public boolean getSalvageAnvilMessagesEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Messages", true); }
|
||||
public boolean getSalvageAnvilPlaceSoundsEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Placed_Sounds", true); }
|
||||
public boolean getSalvageAnvilUseSoundsEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Use_Sounds", true); }
|
||||
public Material getSalvageAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Salvage.Anvil_Material", "GOLD_BLOCK")); }
|
||||
public boolean getSalvageConfirmRequired() { return config.getBoolean("Skills.Salvage.Confirm_Required", true); }
|
||||
|
||||
/* Unarmed */
|
||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
||||
public boolean getUnarmedItemPickupDisabled() { return config.getBoolean("Skills.Unarmed.Item_Pickup_Disabled_Full_Inventory", true); }
|
||||
|
||||
/* Taming */
|
||||
public int getTamingCOTWHorseCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Apples_Required", 10); }
|
||||
public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
|
||||
public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
|
||||
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||
public int getTamingCOTWCost(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Amount"); }
|
||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Summon_Amount"); }
|
||||
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type)+ "_Amount"); }
|
||||
|
||||
/* Woodcutting */
|
||||
public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
|
||||
public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
|
||||
public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
|
||||
public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
|
||||
public boolean getWoodcuttingDoubleDropsEnabled(TreeSpecies species) { return config.getBoolean("Double_Drops.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
||||
|
||||
/* AFK Leveling */
|
||||
|
||||
@@ -3,13 +3,18 @@ package com.gmail.nossr50.config.experience;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.GrassSpecies;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeSpecies;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.material.LongGrass;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
@@ -76,6 +81,13 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
* XP SETTINGS
|
||||
*/
|
||||
|
||||
/* Alchemy */
|
||||
for (PotionStage potionStage : PotionStage.values()) {
|
||||
if (getPotionXP(potionStage) < 0) {
|
||||
reason.add("Experience.Alchemy.Potion_Stage_" + potionStage.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
}
|
||||
|
||||
/* Combat XP Multipliers */
|
||||
if (getAnimalsXP() < 0) {
|
||||
reason.add("Experience.Combat.Multiplier.Animals should be at least 0!");
|
||||
@@ -98,9 +110,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Fishing */
|
||||
if (getFishingBaseXP() <= 0) {
|
||||
reason.add("Experience.Fishing.Base should be greater than 0!");
|
||||
}
|
||||
// TODO: Add validation for each fish type once enum is available.
|
||||
|
||||
if (getFishingShakeXP() <= 0) {
|
||||
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
||||
@@ -121,20 +131,12 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Woodcutting */
|
||||
if (getWoodcuttingXPOak() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Oak should be greater than 0!");
|
||||
}
|
||||
for (TreeSpecies species : TreeSpecies.values()) {
|
||||
String key = "Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_");
|
||||
|
||||
if (getWoodcuttingXPBirch() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Birch should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPSpruce() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Spruce should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPJungle() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Jungle should be greater than 0!");
|
||||
if (config.getInt(key) <= 0) {
|
||||
reason.add(key + " should be greater than 0!");
|
||||
}
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
||||
@@ -159,7 +161,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
/* Curve values */
|
||||
public double getMultiplier(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.multiplier"); }
|
||||
public int getBase(FormulaType type) { return config.getInt("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.base"); }
|
||||
public double getExponent(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) +"_Values.exponent"); }
|
||||
public double getExponent(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.exponent"); }
|
||||
|
||||
/* Global modifier */
|
||||
public double getExperienceGainsGlobalMultiplier() { return config.getDouble("Experience_Formula.Multiplier.Global", 1.0); }
|
||||
@@ -174,6 +176,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
/* Skill modifiers */
|
||||
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
||||
|
||||
/* Custom XP perk */
|
||||
public double getCustomXpPerkBoost() { return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25); }
|
||||
|
||||
/* Conversion */
|
||||
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
||||
|
||||
@@ -199,13 +204,120 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
||||
|
||||
/* Alchemy */
|
||||
public double getPotionXP(PotionStage stage) { return config.getDouble("Experience.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
||||
|
||||
/* Fishing */
|
||||
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
||||
public int getFishXp(MaterialData data) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Fishing.Raw_Fish", 800);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Fishing.Raw_Salmon", 800);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Fishing.Clownfish", 800);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Fishing.Pufferfish", 800);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
||||
|
||||
/* Herbalism */
|
||||
public int getFlowerAndGrassXp(MaterialData data) {
|
||||
Material type = data.getItemType();
|
||||
|
||||
if (type == Material.RED_ROSE) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Herbalism.Poppy", 100);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Herbalism.Blue_Orchid", 150);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Herbalism.Allium", 300);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Herbalism.Azure_Bluet", 150);
|
||||
|
||||
case 0x4:
|
||||
return config.getInt("Experience.Herbalism.Red_Tulip", 150);
|
||||
|
||||
case 0x5:
|
||||
return config.getInt("Experience.Herbalism.Orange_Tulip", 150);
|
||||
|
||||
case 0x6:
|
||||
return config.getInt("Experience.Herbalism.White_Tulip", 150);
|
||||
|
||||
case 0x7:
|
||||
return config.getInt("Experience.Herbalism.Pink_Tulip", 150);
|
||||
|
||||
case 0x8:
|
||||
return config.getInt("Experience.Herbalism.Oxeye_Daisy", 150);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
else if (type == Material.LONG_GRASS) {
|
||||
GrassSpecies species = ((LongGrass) data).getSpecies();
|
||||
if (species == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (species) {
|
||||
case DEAD:
|
||||
return config.getInt("Experience.Herbalism.Dead_Bush", 30);
|
||||
|
||||
case FERN_LIKE:
|
||||
return config.getInt("Experience.Herbalism.Small_Fern", 10);
|
||||
|
||||
case NORMAL:
|
||||
return config.getInt("Experience.Herbalism.Small_Grass", 10);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (type == Material.DOUBLE_PLANT) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Herbalism.Sunflower", 50);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Herbalism.Lilac", 50);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Herbalism.Tall_Grass", 50);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Herbalism.Tall_Fern", 50);
|
||||
|
||||
case 0x4:
|
||||
return config.getInt("Experience.Herbalism.Rose_Bush", 50);
|
||||
|
||||
case 0x5:
|
||||
return config.getInt("Experience.Herbalism.Peony", 50);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Repair */
|
||||
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
||||
public double getRepairXP(RepairMaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||
public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||
|
||||
/* Taming */
|
||||
public int getTamingXPHorse() { return config.getInt("Experience.Taming.Animal_Taming.Horse", 1000); }
|
||||
@@ -213,10 +325,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
||||
|
||||
/* Woodcutting */
|
||||
public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
|
||||
public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
|
||||
public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
|
||||
public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
|
||||
public int getWoodcuttingTreeXP(TreeSpecies species) { return config.getInt("Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
||||
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class ArmorConfigManager {
|
||||
public ArmorConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("armor\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.armor\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "armor.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "armor.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomArmor(new CustomArmorConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class BlockConfigManager {
|
||||
public BlockConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("blocks\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.blocks\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "blocks.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "blocks.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomBlocks(new CustomBlockConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,49 +9,29 @@ import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairItemType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class CustomArmorConfig extends ConfigLoader {
|
||||
private static CustomArmorConfig instance;
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
|
||||
private List<Repairable> repairables;
|
||||
public List<Material> customBoots = new ArrayList<Material>();
|
||||
public List<Material> customChestplates = new ArrayList<Material>();
|
||||
public List<Material> customHelmets = new ArrayList<Material>();
|
||||
public List<Material> customLeggings = new ArrayList<Material>();
|
||||
|
||||
private List<Material> customBoots = new ArrayList<Material>();
|
||||
private List<Material> customChestplates = new ArrayList<Material>();
|
||||
private List<Material> customHelmets = new ArrayList<Material>();
|
||||
private List<Material> customLeggings = new ArrayList<Material>();
|
||||
public List<Repairable> repairables = new ArrayList<Repairable>();
|
||||
|
||||
public CustomArmorConfig() {
|
||||
super("mods", "armor.yml");
|
||||
protected CustomArmorConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomArmorConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomArmorConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public List<Repairable> getLoadedRepairables() {
|
||||
if (repairables == null) {
|
||||
return new ArrayList<Repairable>();
|
||||
}
|
||||
|
||||
return repairables;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
loadArmor("Boots", customBoots);
|
||||
loadArmor("Chestplates", customChestplates);
|
||||
loadArmor("Helmets", customHelmets);
|
||||
@@ -99,38 +79,26 @@ public class CustomArmorConfig extends ConfigLoader {
|
||||
|
||||
if (repairable) {
|
||||
byte repairData = (byte) config.getInt(armorType + "." + armorName + ".Repair_Material_Data_Value", -1);
|
||||
int repairQuantity = Repair.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
||||
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
||||
|
||||
if (repairQuantity == 0) {
|
||||
repairQuantity = config.getInt(armorType + "." + armorName + ".Repair_Material_Data_Quantity", 2);
|
||||
}
|
||||
|
||||
String repairItemName = config.getString(armorType + "." + armorName + ".Repair_Material_Pretty_Name");
|
||||
int repairMinimumLevel = config.getInt(armorType + "." + armorName + ".Repair_MinimumLevel", 0);
|
||||
double repairXpMultiplier = config.getDouble(armorType + "." + armorName + ".Repair_XpMultiplier", 1);
|
||||
|
||||
short durability = armorMaterial.getMaxDurability();
|
||||
|
||||
if (durability == 0) {
|
||||
durability = (short) config.getInt(armorType + "." + armorName + ".Durability", 70);
|
||||
}
|
||||
|
||||
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, 0, repairQuantity, durability, RepairItemType.ARMOR, RepairMaterialType.OTHER, 1.0));
|
||||
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, repairItemName, repairMinimumLevel, repairQuantity, durability, ItemType.ARMOR, MaterialType.OTHER, repairXpMultiplier));
|
||||
}
|
||||
|
||||
materialList.add(armorMaterial);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomBoots(Material material) {
|
||||
return customBoots.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomChestplate(Material material) {
|
||||
return customChestplates.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomHelmet(Material material) {
|
||||
return customHelmets.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomLeggings(Material material) {
|
||||
return customLeggings.contains(material);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,40 +13,29 @@ import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
|
||||
public class CustomBlockConfig extends ConfigLoader {
|
||||
private static CustomBlockConfig instance;
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
|
||||
private List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customWoodcuttingBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customOres = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customAbilityBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customOres = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customAbilityBlocks = new ArrayList<MaterialData>();
|
||||
|
||||
private HashMap<MaterialData, CustomBlock> customBlockMap = new HashMap<MaterialData, CustomBlock>();
|
||||
public HashMap<MaterialData, CustomBlock> customBlockMap = new HashMap<MaterialData, CustomBlock>();
|
||||
|
||||
public CustomBlockConfig() {
|
||||
super("mods", "blocks.yml");
|
||||
protected CustomBlockConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomBlockConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomBlockConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
loadBlocks("Excavation", customExcavationBlocks);
|
||||
loadBlocks("Herbalism", customHerbalismBlocks);
|
||||
loadBlocks("Mining", customMiningBlocks);
|
||||
loadBlocks("Woodcutting", customWoodcuttingBlocks);
|
||||
loadBlocks("Woodcutting", null);
|
||||
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
||||
|
||||
if (needsUpdate) {
|
||||
@@ -79,72 +68,59 @@ public class CustomBlockConfig extends ConfigLoader {
|
||||
Material blockMaterial = Material.matchMaterial(blockInfo[0]);
|
||||
|
||||
if (blockMaterial == null) {
|
||||
plugin.getLogger().warning("Invalid material name. This item will be skipped. - " + blockInfo[0]);
|
||||
plugin.getLogger().warning("Invalid material name. [" + blockInfo[0] + "] This item will be skipped. - " + blockName);
|
||||
continue;
|
||||
}
|
||||
|
||||
byte blockData = Byte.valueOf(blockInfo[1]);
|
||||
if (blockInfo.length == 2) {
|
||||
String[] dataInfo = blockInfo[1].split("[-]");
|
||||
|
||||
if (dataInfo.length == 2) {
|
||||
byte startData = Byte.valueOf(dataInfo[0]);
|
||||
byte endData = Byte.valueOf(dataInfo[1]);
|
||||
|
||||
for (byte blockData = startData; blockData <= endData; blockData++) {
|
||||
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||
loadBlock(skillType, blockList, blockName, blockMaterialData);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
byte blockData = (blockInfo.length == 2) ? Byte.valueOf(blockInfo[1]) : 0;
|
||||
|
||||
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||
blockList.add(blockMaterialData);
|
||||
|
||||
if (skillType.equals("Ability_Blocks")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain");
|
||||
int smeltingXp = 0;
|
||||
|
||||
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
||||
customOres.add(blockMaterialData);
|
||||
smeltingXp = config.getInt(skillType + "." + blockName + ".Smelting_XP_Gain", xp / 10);
|
||||
}
|
||||
else if (skillType.equals("Woodcutting")) {
|
||||
if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) {
|
||||
customLogs.add(blockMaterialData);
|
||||
}
|
||||
else {
|
||||
customLeaves.add(blockMaterialData);
|
||||
xp = 0; // Leaves don't grant XP
|
||||
}
|
||||
}
|
||||
|
||||
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
||||
loadBlock(skillType, blockList, blockName, blockMaterialData);
|
||||
}
|
||||
}
|
||||
|
||||
public CustomBlock getCustomBlock(MaterialData data) {
|
||||
return customBlockMap.get(data);
|
||||
}
|
||||
private void loadBlock(String skillType, List<MaterialData> blockList, String blockName, MaterialData blockMaterialData) {
|
||||
if (blockList != null) {
|
||||
blockList.add(blockMaterialData);
|
||||
}
|
||||
|
||||
public boolean isCustomOre(MaterialData data) {
|
||||
return customOres.contains(data);
|
||||
}
|
||||
if (skillType.equals("Ability_Blocks")) {
|
||||
return;
|
||||
}
|
||||
|
||||
public boolean isCustomLog(MaterialData data) {
|
||||
return customLogs.contains(data);
|
||||
}
|
||||
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain");
|
||||
int smeltingXp = 0;
|
||||
|
||||
public boolean isCustomLeaf(MaterialData data) {
|
||||
return customLeaves.contains(data);
|
||||
}
|
||||
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
||||
customOres.add(blockMaterialData);
|
||||
smeltingXp = config.getInt(skillType + "." + blockName + ".Smelting_XP_Gain", xp / 10);
|
||||
}
|
||||
else if (skillType.equals("Woodcutting")) {
|
||||
if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) {
|
||||
customLogs.add(blockMaterialData);
|
||||
}
|
||||
else {
|
||||
customLeaves.add(blockMaterialData);
|
||||
xp = 0; // Leaves don't grant XP
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomAbilityBlock(MaterialData data) {
|
||||
return customAbilityBlocks.contains(data);
|
||||
}
|
||||
|
||||
public boolean isCustomExcavationBlock(MaterialData data) {
|
||||
return customExcavationBlocks.contains(data);
|
||||
}
|
||||
|
||||
public boolean isCustomHerbalismBlock(MaterialData data) {
|
||||
return customHerbalismBlocks.contains(data);
|
||||
}
|
||||
|
||||
public boolean isCustomMiningBlock(MaterialData data) {
|
||||
return customMiningBlocks.contains(data);
|
||||
}
|
||||
|
||||
public boolean isCustomWoodcuttingBlock(MaterialData data) {
|
||||
return customWoodcuttingBlocks.contains(data);
|
||||
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.gmail.nossr50.config.mods;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
@@ -12,24 +11,14 @@ import com.gmail.nossr50.datatypes.mods.CustomEntity;
|
||||
import org.apache.commons.lang.ClassUtils;
|
||||
|
||||
public class CustomEntityConfig extends ConfigLoader {
|
||||
private static CustomEntityConfig instance;
|
||||
public HashMap<String, CustomEntity> customEntityClassMap = new HashMap<String, CustomEntity>();
|
||||
public HashMap<String, CustomEntity> customEntityTypeMap = new HashMap<String, CustomEntity>();
|
||||
|
||||
private HashMap<String, CustomEntity> customEntityClassMap = new HashMap<String, CustomEntity>();
|
||||
private HashMap<String, CustomEntity> customEntityTypeMap = new HashMap<String, CustomEntity>();
|
||||
|
||||
public CustomEntityConfig() {
|
||||
super("mods", "entities.yml");
|
||||
protected CustomEntityConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomEntityConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomEntityConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
if (config.getConfigurationSection("Hostile") != null) {
|
||||
@@ -71,47 +60,4 @@ public class CustomEntityConfig extends ConfigLoader {
|
||||
customEntityClassMap.put(clazz == null ? null : clazz.getName(), entity);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomEntity(Entity entity) {
|
||||
if (customEntityTypeMap.containsKey(entity.getType().toString())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
return customEntityClassMap.containsKey(((Class<?>) entity.getClass().getDeclaredField("entityClass").get(entity)).getName());
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof NoSuchFieldException || e instanceof IllegalArgumentException || e instanceof IllegalAccessException) {
|
||||
return customEntityClassMap.containsKey(entity.getClass().getName());
|
||||
}
|
||||
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public CustomEntity getCustomEntity(Entity entity) {
|
||||
CustomEntity customEntity = customEntityTypeMap.get(entity.getType().toString());
|
||||
|
||||
if (customEntity == null) {
|
||||
try {
|
||||
customEntity = customEntityClassMap.get(((Class<?>) entity.getClass().getDeclaredField("entityClass").get(entity)).getName());
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof NoSuchFieldException || e instanceof IllegalArgumentException || e instanceof IllegalAccessException) {
|
||||
customEntity = customEntityClassMap.get(entity.getClass().getName());
|
||||
}
|
||||
else {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return customEntity;
|
||||
}
|
||||
|
||||
public void addEntity(CustomEntity customEntity, String className, String entityName) {
|
||||
customEntityTypeMap.put(entityName, customEntity);
|
||||
customEntityClassMap.put(className, customEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,53 +11,33 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||
import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairItemType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class CustomToolConfig extends ConfigLoader {
|
||||
private static CustomToolConfig instance;
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
|
||||
private List<Repairable> repairables;
|
||||
public List<Material> customAxes = new ArrayList<Material>();
|
||||
public List<Material> customBows = new ArrayList<Material>();
|
||||
public List<Material> customHoes = new ArrayList<Material>();
|
||||
public List<Material> customPickaxes = new ArrayList<Material>();
|
||||
public List<Material> customShovels = new ArrayList<Material>();
|
||||
public List<Material> customSwords = new ArrayList<Material>();
|
||||
|
||||
private List<Material> customAxes = new ArrayList<Material>();
|
||||
private List<Material> customBows = new ArrayList<Material>();
|
||||
private List<Material> customHoes = new ArrayList<Material>();
|
||||
private List<Material> customPickaxes = new ArrayList<Material>();
|
||||
private List<Material> customShovels = new ArrayList<Material>();
|
||||
private List<Material> customSwords = new ArrayList<Material>();
|
||||
public HashMap<Material, CustomTool> customToolMap = new HashMap<Material, CustomTool>();
|
||||
|
||||
private HashMap<Material, CustomTool> customToolMap = new HashMap<Material, CustomTool>();
|
||||
public List<Repairable> repairables = new ArrayList<Repairable>();
|
||||
|
||||
private CustomToolConfig() {
|
||||
super("mods", "tools.yml");
|
||||
protected CustomToolConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomToolConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomToolConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public List<Repairable> getLoadedRepairables() {
|
||||
if (repairables == null) {
|
||||
return new ArrayList<Repairable>();
|
||||
}
|
||||
|
||||
return repairables;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
loadTool("Axes", customAxes);
|
||||
loadTool("Bows", customBows);
|
||||
loadTool("Hoes", customHoes);
|
||||
@@ -107,19 +87,23 @@ public class CustomToolConfig extends ConfigLoader {
|
||||
|
||||
if (repairable) {
|
||||
byte repairData = (byte) config.getInt(toolType + "." + toolName + ".Repair_Material_Data_Value", -1);
|
||||
int repairQuantity = Repair.getRepairAndSalvageQuantities(new ItemStack(toolMaterial), repairMaterial, repairData);
|
||||
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(toolMaterial), repairMaterial, repairData);
|
||||
|
||||
if (repairQuantity == 0) {
|
||||
repairQuantity = config.getInt(toolType + "." + toolName + ".Repair_Material_Data_Quantity", 2);
|
||||
}
|
||||
|
||||
String repairItemName = config.getString(toolType + "." + toolName + ".Repair_Material_Pretty_Name");
|
||||
int repairMinimumLevel = config.getInt(toolType + "." + toolName + ".Repair_MinimumLevel", 0);
|
||||
double repairXpMultiplier = config.getDouble(toolType + "." + toolName + ".Repair_XpMultiplier", 1);
|
||||
|
||||
short durability = toolMaterial.getMaxDurability();
|
||||
|
||||
if (durability == 0) {
|
||||
durability = (short) config.getInt(toolType + "." + toolName + ".Durability", 60);
|
||||
}
|
||||
|
||||
repairables.add(RepairableFactory.getRepairable(toolMaterial, repairMaterial, repairData, 0, repairQuantity, durability, RepairItemType.TOOL, RepairMaterialType.OTHER, 1.0));
|
||||
repairables.add(RepairableFactory.getRepairable(toolMaterial, repairMaterial, repairData, repairItemName, repairMinimumLevel, repairQuantity, durability, ItemType.TOOL, MaterialType.OTHER, repairXpMultiplier));
|
||||
}
|
||||
|
||||
double multiplier = config.getDouble(toolType + "." + toolName + ".XP_Modifier", 1.0);
|
||||
@@ -132,36 +116,4 @@ public class CustomToolConfig extends ConfigLoader {
|
||||
customToolMap.put(toolMaterial, tool);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomAxe(Material material) {
|
||||
return customAxes.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomBow(Material material) {
|
||||
return customBows.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomHoe(Material material) {
|
||||
return customHoes.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomPickaxe(Material material) {
|
||||
return customPickaxes.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomShovel(Material material) {
|
||||
return customShovels.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomSword(Material material) {
|
||||
return customSwords.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomTool(Material material) {
|
||||
return customToolMap.containsKey(material);
|
||||
}
|
||||
|
||||
public CustomTool getCustomTool(Material material) {
|
||||
return customToolMap.get(material);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class EntityConfigManager {
|
||||
public EntityConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("entities\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.entities\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "entities.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "entities.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomEntities(new CustomEntityConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class ToolConfigManager {
|
||||
public ToolConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("tools\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.tools\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "tools.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "tools.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomTools(new CustomToolConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.gmail.nossr50.config.skills.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion;
|
||||
|
||||
public class PotionConfig extends ConfigLoader {
|
||||
private static PotionConfig instance;
|
||||
|
||||
private List<ItemStack> concoctionsIngredientsTierOne = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierTwo = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierThree = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierFour = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierFive = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierSix = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierSeven = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> concoctionsIngredientsTierEight = new ArrayList<ItemStack>();
|
||||
|
||||
private Map<Short, AlchemyPotion> potionMap = new HashMap<Short, AlchemyPotion>();
|
||||
|
||||
private PotionConfig() {
|
||||
super("potions.yml");
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static PotionConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new PotionConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
loadConcoctions();
|
||||
loadPotionMap();
|
||||
}
|
||||
|
||||
private void loadConcoctions() {
|
||||
ConfigurationSection concoctionSection = config.getConfigurationSection("Concoctions");
|
||||
|
||||
loadConcoctionsTier(concoctionsIngredientsTierOne, concoctionSection.getStringList("Tier_One_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierTwo, concoctionSection.getStringList("Tier_Two_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierThree, concoctionSection.getStringList("Tier_Three_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierFour, concoctionSection.getStringList("Tier_Four_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierFive, concoctionSection.getStringList("Tier_Five_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierSix, concoctionSection.getStringList("Tier_Six_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierSeven, concoctionSection.getStringList("Tier_Seven_Ingredients"));
|
||||
loadConcoctionsTier(concoctionsIngredientsTierEight, concoctionSection.getStringList("Tier_Eight_Ingredients"));
|
||||
|
||||
concoctionsIngredientsTierTwo.addAll(concoctionsIngredientsTierOne);
|
||||
concoctionsIngredientsTierThree.addAll(concoctionsIngredientsTierTwo);
|
||||
concoctionsIngredientsTierFour.addAll(concoctionsIngredientsTierThree);
|
||||
concoctionsIngredientsTierFive.addAll(concoctionsIngredientsTierFour);
|
||||
concoctionsIngredientsTierSix.addAll(concoctionsIngredientsTierFive);
|
||||
concoctionsIngredientsTierSeven.addAll(concoctionsIngredientsTierSix);
|
||||
concoctionsIngredientsTierEight.addAll(concoctionsIngredientsTierSeven);
|
||||
}
|
||||
|
||||
private void loadConcoctionsTier(List<ItemStack> ingredientList, List<String> ingredientStrings) {
|
||||
if (ingredientStrings != null && ingredientStrings.size() > 0) {
|
||||
for (String ingredientString : ingredientStrings) {
|
||||
ItemStack ingredient = loadIngredient(ingredientString);
|
||||
|
||||
if (ingredient != null) {
|
||||
ingredientList.add(ingredient);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the Potions configuration section and load all defined potions.
|
||||
*/
|
||||
private void loadPotionMap() {
|
||||
ConfigurationSection potionSection = config.getConfigurationSection("Potions");
|
||||
int pass = 0;
|
||||
int fail = 0;
|
||||
|
||||
for (String dataValue : potionSection.getKeys(false)) {
|
||||
AlchemyPotion potion = loadPotion(potionSection.getConfigurationSection(dataValue));
|
||||
|
||||
if (potion != null) {
|
||||
potionMap.put(potion.getDataValue(), potion);
|
||||
pass++;
|
||||
}
|
||||
else {
|
||||
fail++;
|
||||
}
|
||||
}
|
||||
|
||||
mcMMO.p.debug("Loaded " + pass + " Alchemy potions, skipped " + fail + ".");
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a ConfigurationSection representing a AlchemyPotion.
|
||||
* Returns null if input cannot be parsed.
|
||||
*
|
||||
* @param potion_section ConfigurationSection to be parsed.
|
||||
*
|
||||
* @return Parsed AlchemyPotion.
|
||||
*/
|
||||
private AlchemyPotion loadPotion(ConfigurationSection potion_section) {
|
||||
try {
|
||||
short dataValue = Short.parseShort(potion_section.getName());
|
||||
|
||||
String name = potion_section.getString("Name");
|
||||
|
||||
List<String> lore = new ArrayList<String>();
|
||||
if (potion_section.contains("Lore")) {
|
||||
for (String line : potion_section.getStringList("Lore")) {
|
||||
lore.add(line);
|
||||
}
|
||||
}
|
||||
|
||||
List<PotionEffect> effects = new ArrayList<PotionEffect>();
|
||||
if (potion_section.contains("Effects")) {
|
||||
for (String effect : potion_section.getStringList("Effects")) {
|
||||
String[] parts = effect.split(" ");
|
||||
|
||||
PotionEffectType type = parts.length > 0 ? PotionEffectType.getByName(parts[0]) : null;
|
||||
int amplifier = parts.length > 1 ? Integer.parseInt(parts[1]) : 0;
|
||||
int duration = parts.length > 2 ? Integer.parseInt(parts[2]) : 0;
|
||||
|
||||
if (type != null) {
|
||||
effects.add(new PotionEffect(type, duration, amplifier));
|
||||
}
|
||||
else {
|
||||
mcMMO.p.getLogger().warning("Failed to parse effect for potion " + name + ": " + effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<ItemStack, Short> children = new HashMap<ItemStack, Short>();
|
||||
if (potion_section.contains("Children")) {
|
||||
for (String child : potion_section.getConfigurationSection("Children").getKeys(false)) {
|
||||
ItemStack ingredient = loadIngredient(child);
|
||||
if (ingredient != null) {
|
||||
children.put(ingredient, Short.parseShort(potion_section.getConfigurationSection("Children").getString(child)));
|
||||
}
|
||||
else {
|
||||
mcMMO.p.getLogger().warning("Failed to parse child for potion " + name + ": " + child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new AlchemyPotion(dataValue, name, lore, effects, children);
|
||||
}
|
||||
catch (Exception e) {
|
||||
mcMMO.p.getLogger().warning("Failed to load Alchemy potion: " + potion_section.getName());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a string representation of an ingredient.
|
||||
* Format: '<MATERIAL>[:data]'
|
||||
* Returns null if input cannot be parsed.
|
||||
*
|
||||
* @param ingredient String representing an ingredient.
|
||||
*
|
||||
* @return Parsed ingredient.
|
||||
*/
|
||||
private ItemStack loadIngredient(String ingredient) {
|
||||
if (ingredient == null || ingredient.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String[] parts = ingredient.split(":");
|
||||
|
||||
Material material = parts.length > 0 ? Material.getMaterial(parts[0]) : null;
|
||||
short data = parts.length > 1 ? Short.parseShort(parts[1]) : 0;
|
||||
|
||||
if (material != null) {
|
||||
return new ItemStack(material, 1, data);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<ItemStack> getIngredients(int tier) {
|
||||
switch (tier) {
|
||||
case 8:
|
||||
return concoctionsIngredientsTierEight;
|
||||
case 7:
|
||||
return concoctionsIngredientsTierSeven;
|
||||
case 6:
|
||||
return concoctionsIngredientsTierSix;
|
||||
case 5:
|
||||
return concoctionsIngredientsTierFive;
|
||||
case 4:
|
||||
return concoctionsIngredientsTierFour;
|
||||
case 3:
|
||||
return concoctionsIngredientsTierThree;
|
||||
case 2:
|
||||
return concoctionsIngredientsTierTwo;
|
||||
case 1:
|
||||
default:
|
||||
return concoctionsIngredientsTierOne;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isValidPotion(ItemStack item) {
|
||||
return potionMap.containsKey(item.getDurability());
|
||||
}
|
||||
|
||||
public AlchemyPotion getPotion(short durability) {
|
||||
return potionMap.get(durability);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.gmail.nossr50.skills.repair.config;
|
||||
package com.gmail.nossr50.config.skills.repair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -9,12 +9,12 @@ import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairItemType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class RepairConfig extends ConfigLoader {
|
||||
private List<Repairable> repairables;
|
||||
@@ -48,37 +48,37 @@ public class RepairConfig extends ConfigLoader {
|
||||
}
|
||||
|
||||
// Repair Material Type
|
||||
RepairMaterialType repairMaterialType = RepairMaterialType.OTHER;
|
||||
MaterialType repairMaterialType = MaterialType.OTHER;
|
||||
String repairMaterialTypeString = config.getString("Repairables." + key + ".MaterialType", "OTHER");
|
||||
|
||||
if (!config.contains("Repairables." + key + ".MaterialType") && itemMaterial != null) {
|
||||
ItemStack repairItem = new ItemStack(itemMaterial);
|
||||
|
||||
if (ItemUtils.isWoodTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.WOOD;
|
||||
repairMaterialType = MaterialType.WOOD;
|
||||
}
|
||||
else if (ItemUtils.isStoneTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.STONE;
|
||||
repairMaterialType = MaterialType.STONE;
|
||||
}
|
||||
else if (ItemUtils.isStringTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.STRING;
|
||||
repairMaterialType = MaterialType.STRING;
|
||||
}
|
||||
else if (ItemUtils.isLeatherArmor(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.LEATHER;
|
||||
repairMaterialType = MaterialType.LEATHER;
|
||||
}
|
||||
else if (ItemUtils.isIronArmor(repairItem) || ItemUtils.isIronTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.IRON;
|
||||
repairMaterialType = MaterialType.IRON;
|
||||
}
|
||||
else if (ItemUtils.isGoldArmor(repairItem) || ItemUtils.isGoldTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.GOLD;
|
||||
repairMaterialType = MaterialType.GOLD;
|
||||
}
|
||||
else if (ItemUtils.isDiamondArmor(repairItem) || ItemUtils.isDiamondTool(repairItem)) {
|
||||
repairMaterialType = RepairMaterialType.DIAMOND;
|
||||
repairMaterialType = MaterialType.DIAMOND;
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
repairMaterialType = RepairMaterialType.valueOf(repairMaterialTypeString);
|
||||
repairMaterialType = MaterialType.valueOf(repairMaterialTypeString);
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
reason.add(key + " has an invalid MaterialType of " + repairMaterialTypeString);
|
||||
@@ -87,7 +87,7 @@ public class RepairConfig extends ConfigLoader {
|
||||
|
||||
// Repair Material
|
||||
String repairMaterialName = config.getString("Repairables." + key + ".RepairMaterial");
|
||||
Material repairMaterial = (repairMaterialName == null ? repairMaterialType.getDefaultRepairMaterial() : Material.matchMaterial(repairMaterialName));
|
||||
Material repairMaterial = (repairMaterialName == null ? repairMaterialType.getDefaultMaterial() : Material.matchMaterial(repairMaterialName));
|
||||
|
||||
if (repairMaterial == null) {
|
||||
reason.add(key + " has an invalid repair material: " + repairMaterialName);
|
||||
@@ -96,27 +96,31 @@ public class RepairConfig extends ConfigLoader {
|
||||
// Maximum Durability
|
||||
short maximumDurability = (itemMaterial != null ? itemMaterial.getMaxDurability() : (short) config.getInt("Repairables." + key + ".MaximumDurability"));
|
||||
|
||||
if (maximumDurability <= 0) {
|
||||
maximumDurability = (short) config.getInt("Repairables." + key + ".MaximumDurability");
|
||||
}
|
||||
|
||||
if (maximumDurability <= 0) {
|
||||
reason.add("Maximum durability of " + key + " must be greater than 0!");
|
||||
}
|
||||
|
||||
// Item Type
|
||||
RepairItemType repairItemType = RepairItemType.OTHER;
|
||||
ItemType repairItemType = ItemType.OTHER;
|
||||
String repairItemTypeString = config.getString("Repairables." + key + ".ItemType", "OTHER");
|
||||
|
||||
if (!config.contains("Repairables." + key + ".ItemType") && itemMaterial != null) {
|
||||
ItemStack repairItem = new ItemStack(itemMaterial);
|
||||
|
||||
if (ItemUtils.isMinecraftTool(repairItem)) {
|
||||
repairItemType = RepairItemType.TOOL;
|
||||
repairItemType = ItemType.TOOL;
|
||||
}
|
||||
else if (ItemUtils.isArmor(repairItem)) {
|
||||
repairItemType = RepairItemType.ARMOR;
|
||||
repairItemType = ItemType.ARMOR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
repairItemType = RepairItemType.valueOf(repairItemTypeString);
|
||||
repairItemType = ItemType.valueOf(repairItemTypeString);
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
reason.add(key + " has an invalid ItemType of " + repairItemTypeString);
|
||||
@@ -132,7 +136,7 @@ public class RepairConfig extends ConfigLoader {
|
||||
}
|
||||
|
||||
// Minimum Quantity
|
||||
int minimumQuantity = (itemMaterial != null ? Repair.getRepairAndSalvageQuantities(new ItemStack(itemMaterial), repairMaterial, repairMetadata) : config.getInt("Repairables." + key + ".MinimumQuantity", 2));
|
||||
int minimumQuantity = (itemMaterial != null ? SkillUtils.getRepairAndSalvageQuantities(new ItemStack(itemMaterial), repairMaterial, repairMetadata) : config.getInt("Repairables." + key + ".MinimumQuantity", 2));
|
||||
|
||||
if (minimumQuantity <= 0 && itemMaterial != null) {
|
||||
minimumQuantity = config.getInt("Repairables." + key + ".MinimumQuantity", 2);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.gmail.nossr50.skills.repair.config;
|
||||
package com.gmail.nossr50.config.skills.repair;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -9,11 +9,9 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
|
||||
public class RepairConfigManager {
|
||||
private List<Repairable> repairables;
|
||||
private final List<Repairable> repairables = new ArrayList<Repairable>();
|
||||
|
||||
public RepairConfigManager(mcMMO plugin) {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
Pattern pattern = Pattern.compile("repair\\.(?:.+)\\.yml");
|
||||
File dataFolder = plugin.getDataFolder();
|
||||
File vanilla = new File(dataFolder, "repair.vanilla.yml");
|
||||
@@ -34,19 +32,11 @@ public class RepairConfigManager {
|
||||
}
|
||||
|
||||
RepairConfig rConfig = new RepairConfig(fileName);
|
||||
List<Repairable> rConfigRepairables = rConfig.getLoadedRepairables();
|
||||
|
||||
if (rConfigRepairables != null) {
|
||||
repairables.addAll(rConfigRepairables);
|
||||
}
|
||||
repairables.addAll(rConfig.getLoadedRepairables());
|
||||
}
|
||||
}
|
||||
|
||||
public List<Repairable> getLoadedRepairables() {
|
||||
if (repairables == null) {
|
||||
return new ArrayList<Repairable>();
|
||||
}
|
||||
|
||||
return repairables;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.gmail.nossr50.config.skills.salvage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
||||
import com.gmail.nossr50.skills.salvage.salvageables.SalvageableFactory;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class SalvageConfig extends ConfigLoader {
|
||||
private List<Salvageable> salvageables;
|
||||
|
||||
public SalvageConfig(String fileName) {
|
||||
super(fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
salvageables = new ArrayList<Salvageable>();
|
||||
|
||||
ConfigurationSection section = config.getConfigurationSection("Salvageables");
|
||||
Set<String> keys = section.getKeys(false);
|
||||
|
||||
for (String key : keys) {
|
||||
// Validate all the things!
|
||||
List<String> reason = new ArrayList<String>();
|
||||
|
||||
// Item Material
|
||||
Material itemMaterial = Material.matchMaterial(key);
|
||||
|
||||
if (itemMaterial == null) {
|
||||
reason.add("Invalid material: " + key);
|
||||
}
|
||||
|
||||
// Salvage Material Type
|
||||
MaterialType salvageMaterialType = MaterialType.OTHER;
|
||||
String salvageMaterialTypeString = config.getString("Salvageables." + key + ".MaterialType", "OTHER");
|
||||
|
||||
if (!config.contains("Salvageables." + key + ".MaterialType") && itemMaterial != null) {
|
||||
ItemStack salvageItem = new ItemStack(itemMaterial);
|
||||
|
||||
if (ItemUtils.isWoodTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.WOOD;
|
||||
}
|
||||
else if (ItemUtils.isStoneTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.STONE;
|
||||
}
|
||||
else if (ItemUtils.isStringTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.STRING;
|
||||
}
|
||||
else if (ItemUtils.isLeatherArmor(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.LEATHER;
|
||||
}
|
||||
else if (ItemUtils.isIronArmor(salvageItem) || ItemUtils.isIronTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.IRON;
|
||||
}
|
||||
else if (ItemUtils.isGoldArmor(salvageItem) || ItemUtils.isGoldTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.GOLD;
|
||||
}
|
||||
else if (ItemUtils.isDiamondArmor(salvageItem) || ItemUtils.isDiamondTool(salvageItem)) {
|
||||
salvageMaterialType = MaterialType.DIAMOND;
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
salvageMaterialType = MaterialType.valueOf(salvageMaterialTypeString);
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
reason.add(key + " has an invalid MaterialType of " + salvageMaterialTypeString);
|
||||
}
|
||||
}
|
||||
|
||||
// Salvage Material
|
||||
String salvageMaterialName = config.getString("Salvageables." + key + ".SalvageMaterial");
|
||||
Material salvageMaterial = (salvageMaterialName == null ? salvageMaterialType.getDefaultMaterial() : Material.matchMaterial(salvageMaterialName));
|
||||
|
||||
if (salvageMaterial == null) {
|
||||
reason.add(key + " has an invalid salvage material: " + salvageMaterialName);
|
||||
}
|
||||
|
||||
// Maximum Durability
|
||||
short maximumDurability = (itemMaterial != null ? itemMaterial.getMaxDurability() : (short) config.getInt("Salvageables." + key + ".MaximumDurability"));
|
||||
|
||||
// Item Type
|
||||
ItemType salvageItemType = ItemType.OTHER;
|
||||
String salvageItemTypeString = config.getString("Salvageables." + key + ".ItemType", "OTHER");
|
||||
|
||||
if (!config.contains("Salvageables." + key + ".ItemType") && itemMaterial != null) {
|
||||
ItemStack salvageItem = new ItemStack(itemMaterial);
|
||||
|
||||
if (ItemUtils.isMinecraftTool(salvageItem)) {
|
||||
salvageItemType = ItemType.TOOL;
|
||||
}
|
||||
else if (ItemUtils.isArmor(salvageItem)) {
|
||||
salvageItemType = ItemType.ARMOR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
salvageItemType = ItemType.valueOf(salvageItemTypeString);
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
reason.add(key + " has an invalid ItemType of " + salvageItemTypeString);
|
||||
}
|
||||
}
|
||||
|
||||
byte salvageMetadata = (byte) config.getInt("Salvageables." + key + ".SalvageMaterialMetadata", -1);
|
||||
int minimumLevel = config.getInt("Salvageables." + key + ".MinimumLevel");
|
||||
double xpMultiplier = config.getDouble("Salvageables." + key + ".XpMultiplier", 1);
|
||||
|
||||
if (minimumLevel < 0) {
|
||||
reason.add(key + " has an invalid MinimumLevel of " + minimumLevel);
|
||||
}
|
||||
|
||||
// Maximum Quantity
|
||||
int maximumQuantity = (itemMaterial != null ? SkillUtils.getRepairAndSalvageQuantities(new ItemStack(itemMaterial), salvageMaterial, salvageMetadata) : config.getInt("Salvageables." + key + ".MaximumQuantity", 2));
|
||||
|
||||
if (maximumQuantity <= 0 && itemMaterial != null) {
|
||||
maximumQuantity = config.getInt("Salvageables." + key + ".MaximumQuantity", 2);
|
||||
}
|
||||
|
||||
int configMaximumQuantity = config.getInt("Salvageables." + key + ".MaximumQuantity", -1);
|
||||
|
||||
if (configMaximumQuantity > 0) {
|
||||
maximumQuantity = configMaximumQuantity;
|
||||
}
|
||||
|
||||
if (maximumQuantity <= 0) {
|
||||
reason.add("Maximum quantity of " + key + " must be greater than 0!");
|
||||
}
|
||||
|
||||
if (noErrorsInSalvageable(reason)) {
|
||||
Salvageable salvageable = SalvageableFactory.getSalvageable(itemMaterial, salvageMaterial, salvageMetadata, minimumLevel, maximumQuantity, maximumDurability, salvageItemType, salvageMaterialType, xpMultiplier);
|
||||
salvageables.add(salvageable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected List<Salvageable> getLoadedSalvageables() {
|
||||
return salvageables == null ? new ArrayList<Salvageable>() : salvageables;
|
||||
}
|
||||
|
||||
private boolean noErrorsInSalvageable(List<String> issues) {
|
||||
if (!issues.isEmpty()) {
|
||||
plugin.getLogger().warning("Errors have been found in: " + fileName);
|
||||
plugin.getLogger().warning("The following issues were found:");
|
||||
}
|
||||
|
||||
for (String issue : issues) {
|
||||
plugin.getLogger().warning(issue);
|
||||
}
|
||||
|
||||
return issues.isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gmail.nossr50.config.skills.salvage;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
||||
|
||||
public class SalvageConfigManager {
|
||||
private final List<Salvageable> salvageables = new ArrayList<Salvageable>();
|
||||
|
||||
public SalvageConfigManager(mcMMO plugin) {
|
||||
Pattern pattern = Pattern.compile("salvage\\.(?:.+)\\.yml");
|
||||
File dataFolder = plugin.getDataFolder();
|
||||
File vanilla = new File(dataFolder, "salvage.vanilla.yml");
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource("salvage.vanilla.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!pattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
SalvageConfig salvageConfig = new SalvageConfig(fileName);
|
||||
salvageables.addAll(salvageConfig.getLoadedSalvageables());
|
||||
}
|
||||
}
|
||||
|
||||
public List<Salvageable> getLoadedSalvageables() {
|
||||
return salvageables;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,8 @@ public class TreasureConfig extends ConfigLoader {
|
||||
public List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
||||
public List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
||||
public List<ExcavationTreasure> excavationFromSnow = new ArrayList<ExcavationTreasure>();
|
||||
public List<ExcavationTreasure> excavationFromRedSand = new ArrayList<ExcavationTreasure>();
|
||||
public List<ExcavationTreasure> excavationFromPodzol = new ArrayList<ExcavationTreasure>();
|
||||
|
||||
public List<HylianTreasure> hylianFromBushes = new ArrayList<HylianTreasure>();
|
||||
public List<HylianTreasure> hylianFromFlowers = new ArrayList<HylianTreasure>();
|
||||
@@ -158,26 +160,29 @@ public class TreasureConfig extends ConfigLoader {
|
||||
// Validate all the things!
|
||||
List<String> reason = new ArrayList<String>();
|
||||
|
||||
String[] treasureInfo = treasureName.split("[|]");
|
||||
String materialName = treasureInfo[0];
|
||||
|
||||
/*
|
||||
* Material, Amount, and Data
|
||||
*/
|
||||
Material material;
|
||||
|
||||
if (treasureName.contains("POTION")) {
|
||||
if (materialName.contains("POTION")) {
|
||||
material = Material.POTION;
|
||||
}
|
||||
else if (treasureName.contains("INK_SACK")) {
|
||||
else if (materialName.contains("INK_SACK")) {
|
||||
material = Material.INK_SACK;
|
||||
}
|
||||
else {
|
||||
material = Material.matchMaterial(treasureName);
|
||||
material = Material.matchMaterial(materialName);
|
||||
}
|
||||
|
||||
int amount = config.getInt(type + "." + treasureName + ".Amount");
|
||||
int data = config.getInt(type + "." + treasureName + ".Data");
|
||||
short data = (treasureInfo.length == 2) ? Byte.valueOf(treasureInfo[1]) : (short) config.getInt(type + "." + treasureName + ".Data");
|
||||
|
||||
if (material == null) {
|
||||
reason.add("Invalid material: " + treasureName);
|
||||
reason.add("Invalid material: " + materialName);
|
||||
}
|
||||
|
||||
if (amount <= 0) {
|
||||
@@ -226,8 +231,8 @@ public class TreasureConfig extends ConfigLoader {
|
||||
*/
|
||||
ItemStack item = null;
|
||||
|
||||
if (treasureName.contains("POTION")) {
|
||||
String potionType = treasureName.substring(7);
|
||||
if (materialName.contains("POTION")) {
|
||||
String potionType = materialName.substring(7);
|
||||
|
||||
try {
|
||||
item = new Potion(PotionType.valueOf(potionType.toUpperCase().trim())).toItemStack(amount);
|
||||
@@ -236,8 +241,8 @@ public class TreasureConfig extends ConfigLoader {
|
||||
reason.add("Invalid Potion_Type: " + potionType);
|
||||
}
|
||||
}
|
||||
else if (treasureName.contains("INK_SACK")) {
|
||||
String color = treasureName.substring(9);
|
||||
else if (materialName.contains("INK_SACK")) {
|
||||
String color = materialName.substring(9);
|
||||
|
||||
try {
|
||||
Dye dye = new Dye();
|
||||
@@ -250,17 +255,17 @@ public class TreasureConfig extends ConfigLoader {
|
||||
}
|
||||
}
|
||||
else if (material != null) {
|
||||
item = new ItemStack(material, amount, (short) data);
|
||||
item = new ItemStack(material, amount, data);
|
||||
|
||||
if (config.contains(type + "." + treasureName + ".Custom_Name")) {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
itemMeta.setDisplayName(config.getString(type + "." + treasureName + "Custom_Name"));
|
||||
itemMeta.setDisplayName(config.getString(type + "." + treasureName + ".Custom_Name"));
|
||||
item.setItemMeta(itemMeta);
|
||||
}
|
||||
|
||||
if (config.contains(type + "." + treasureName + ".Lore")) {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
itemMeta.setLore(config.getStringList(type + "." + treasureName + "Custom_Name"));
|
||||
itemMeta.setLore(config.getStringList(type + "." + treasureName + ".Lore"));
|
||||
item.setItemMeta(itemMeta);
|
||||
}
|
||||
}
|
||||
@@ -371,6 +376,14 @@ public class TreasureConfig extends ConfigLoader {
|
||||
if (dropList.contains("Snow")) {
|
||||
excavationFromSnow.add(excavationTreasure);
|
||||
}
|
||||
|
||||
if (dropList.contains("Red_Sand")) {
|
||||
excavationFromRedSand.add(excavationTreasure);
|
||||
}
|
||||
|
||||
if (dropList.contains("Podzol")) {
|
||||
excavationFromPodzol.add(excavationTreasure);
|
||||
}
|
||||
}
|
||||
else if (isHylian) {
|
||||
HylianTreasure hylianTreasure = new HylianTreasure(item, xp, dropChance, dropLevel);
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface DatabaseManager {
|
||||
/**
|
||||
* Retrieve leaderboard info.
|
||||
*
|
||||
* @param skillName The skill to retrieve info on
|
||||
* @param skill The skill to retrieve info on
|
||||
* @param pageNumber Which page in the leaderboards to retrieve
|
||||
* @param statsPerPage The number of stats per page
|
||||
* @return the requested leaderboard information
|
||||
|
||||
@@ -22,10 +22,14 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.database.UpgradeType;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
|
||||
public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
||||
@@ -56,7 +60,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
in = new BufferedReader(new FileReader(usersFilePath));
|
||||
StringBuilder writer = new StringBuilder();
|
||||
String line = "";
|
||||
String line;
|
||||
|
||||
while ((line = in.readLine()) != null) {
|
||||
String[] character = line.split(":");
|
||||
@@ -111,7 +115,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
in = new BufferedReader(new FileReader(usersFilePath));
|
||||
StringBuilder writer = new StringBuilder();
|
||||
String line = "";
|
||||
String line;
|
||||
|
||||
while ((line = in.readLine()) != null) {
|
||||
String[] character = line.split(":");
|
||||
@@ -173,7 +177,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
in = new BufferedReader(new FileReader(usersFilePath));
|
||||
StringBuilder writer = new StringBuilder();
|
||||
String line = "";
|
||||
String line;
|
||||
|
||||
while ((line = in.readLine()) != null) {
|
||||
// Write out the same file but when we get to the player we want to remove, we skip his line.
|
||||
@@ -265,6 +269,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
writer.append(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR).append(":");
|
||||
MobHealthbarType mobHealthbarType = profile.getMobHealthbarType();
|
||||
writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":");
|
||||
writer.append(profile.getSkillLevel(SkillType.ALCHEMY)).append(":");
|
||||
writer.append(profile.getSkillXpLevel(SkillType.ALCHEMY)).append(":");
|
||||
writer.append("\r\n");
|
||||
}
|
||||
}
|
||||
@@ -354,7 +360,9 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
out.append("0:"); // Blast Mining
|
||||
out.append(String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)).append(":"); // LastLogin
|
||||
out.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":"); // Mob Healthbar HUD
|
||||
|
||||
out.append("0:"); // Alchemy
|
||||
out.append("0:"); // AlchemyXp
|
||||
|
||||
// Add more in the same format as the line above
|
||||
|
||||
out.newLine();
|
||||
@@ -386,8 +394,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerProfile p = loadFromLine(character);
|
||||
return p;
|
||||
return loadFromLine(character);
|
||||
}
|
||||
|
||||
// Didn't find the player, create a new one
|
||||
@@ -503,6 +510,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
List<PlayerStat> unarmed = new ArrayList<PlayerStat>();
|
||||
List<PlayerStat> taming = new ArrayList<PlayerStat>();
|
||||
List<PlayerStat> fishing = new ArrayList<PlayerStat>();
|
||||
List<PlayerStat> alchemy = new ArrayList<PlayerStat>();
|
||||
|
||||
BufferedReader in = null;
|
||||
String playerName = null;
|
||||
@@ -510,7 +518,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
synchronized (fileWritingLock) {
|
||||
try {
|
||||
in = new BufferedReader(new FileReader(usersFilePath));
|
||||
String line = "";
|
||||
String line;
|
||||
|
||||
while ((line = in.readLine()) != null) {
|
||||
String[] data = line.split(":");
|
||||
@@ -520,6 +528,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
Map<SkillType, Integer> skills = getSkillMapFromLine(data);
|
||||
|
||||
powerLevel += putStat(acrobatics, playerName, skills.get(SkillType.ACROBATICS));
|
||||
powerLevel += putStat(alchemy, playerName, skills.get(SkillType.ALCHEMY));
|
||||
powerLevel += putStat(archery, playerName, skills.get(SkillType.ARCHERY));
|
||||
powerLevel += putStat(axes, playerName, skills.get(SkillType.AXES));
|
||||
powerLevel += putStat(excavation, playerName, skills.get(SkillType.EXCAVATION));
|
||||
@@ -557,6 +566,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
Collections.sort(acrobatics, c);
|
||||
Collections.sort(taming, c);
|
||||
Collections.sort(fishing, c);
|
||||
Collections.sort(alchemy, c);
|
||||
Collections.sort(powerLevels, c);
|
||||
|
||||
playerStatHash.put(SkillType.MINING, mining);
|
||||
@@ -571,6 +581,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
playerStatHash.put(SkillType.ACROBATICS, acrobatics);
|
||||
playerStatHash.put(SkillType.TAMING, taming);
|
||||
playerStatHash.put(SkillType.FISHING, fishing);
|
||||
playerStatHash.put(SkillType.ALCHEMY, alchemy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -586,7 +597,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
in = new BufferedReader(new FileReader(usersFilePath));
|
||||
StringBuilder writer = new StringBuilder();
|
||||
String line = "";
|
||||
String line;
|
||||
HashSet<String> players = new HashSet<String>();
|
||||
|
||||
while ((line = in.readLine()) != null) {
|
||||
@@ -597,7 +608,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
|
||||
// Length checks depend on last character being ':'
|
||||
if (line.charAt(line.length() - 1) != ':') {
|
||||
line = line + ":";
|
||||
line = line.concat(":");
|
||||
}
|
||||
String[] character = line.split(":");
|
||||
|
||||
@@ -614,29 +625,33 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
|
||||
String oldVersion = null;
|
||||
|
||||
if (character.length <= 33) {
|
||||
// Introduction of HUDType
|
||||
// Version 1.1.06
|
||||
// commit 78f79213cdd7190cd11ae54526f3b4ea42078e8a
|
||||
line = line.concat(" :");
|
||||
character = line.split(":");
|
||||
oldVersion = "1.1.06";
|
||||
}
|
||||
|
||||
if (!character[33].isEmpty()) {
|
||||
// Removal of Spout Support
|
||||
// Version 1.4.07-dev2
|
||||
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
||||
line = line.replace(character[33], "");
|
||||
oldVersion = "1.4.07";
|
||||
if (oldVersion == null) {
|
||||
oldVersion = "1.4.07";
|
||||
}
|
||||
}
|
||||
|
||||
// If they're valid, rewrite them to the file.
|
||||
if (character.length > 38) {
|
||||
if (character.length == 41) {
|
||||
writer.append(line).append("\r\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
StringBuilder newLine = new StringBuilder(line);
|
||||
|
||||
if (character.length <= 33) {
|
||||
// Introduction of HUDType
|
||||
// Version 1.1.06
|
||||
// commit 78f79213cdd7190cd11ae54526f3b4ea42078e8a
|
||||
newLine.append(":");
|
||||
oldVersion = "1.1.06";
|
||||
}
|
||||
if (character.length <= 35) {
|
||||
// Introduction of Fishing
|
||||
// Version 1.2.00
|
||||
@@ -675,11 +690,64 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
oldVersion = "1.4.06";
|
||||
}
|
||||
}
|
||||
if (character.length <= 39) {
|
||||
// Addition of Alchemy
|
||||
// Version 1.4.08
|
||||
newLine.append("0").append(":");
|
||||
newLine.append("0").append(":");
|
||||
if (oldVersion == null) {
|
||||
oldVersion = "1.4.08";
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any blanks that shouldn't be there, and validate the other fields
|
||||
String[] newCharacter = newLine.toString().split(":");
|
||||
boolean corrupted = false;
|
||||
|
||||
for (int i = 0; i < newCharacter.length; i++) {
|
||||
if (newCharacter[i].isEmpty() && !(i == 2 || i == 3 || i == 23 || i == 33)) {
|
||||
corrupted = true;
|
||||
|
||||
if (newCharacter.length != 41) {
|
||||
newCharacter = (String[]) ArrayUtils.remove(newCharacter, i);
|
||||
}
|
||||
else {
|
||||
if (i == 37) {
|
||||
newCharacter[i] = String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
|
||||
}
|
||||
else if (i == 38) {
|
||||
newCharacter[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
||||
}
|
||||
else {
|
||||
newCharacter[i] = "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isInt(newCharacter[i]) && i == 38) {
|
||||
corrupted = true;
|
||||
newCharacter[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
||||
}
|
||||
|
||||
if (!StringUtils.isInt(newCharacter[i]) && !(i == 0 || i == 2 || i == 3 || i == 23 || i == 33 || i == 38)) {
|
||||
corrupted = true;
|
||||
newCharacter[i] = "0";
|
||||
}
|
||||
}
|
||||
|
||||
if (corrupted) {
|
||||
mcMMO.p.debug("Updating corrupted database line for player " + newCharacter[0]);
|
||||
}
|
||||
|
||||
if (oldVersion != null) {
|
||||
mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion);
|
||||
}
|
||||
|
||||
if (corrupted || oldVersion != null) {
|
||||
newLine = new StringBuilder(org.apache.commons.lang.StringUtils.join(newCharacter, ":"));
|
||||
newLine = newLine.append(":");
|
||||
}
|
||||
|
||||
writer.append(newLine).append("\r\n");
|
||||
}
|
||||
|
||||
@@ -695,6 +763,14 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
tryClose(out);
|
||||
}
|
||||
}
|
||||
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_FISHING);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_BLAST_MINING_COOLDOWN);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_SQL_INDEXES);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_MOB_HEALTHBARS);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.DROP_SQL_PARTY_NAMES);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.DROP_SPOUT);
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_ALCHEMY);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -751,7 +827,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
}
|
||||
}
|
||||
|
||||
private PlayerProfile loadFromLine(String[] character) throws Exception {
|
||||
private PlayerProfile loadFromLine(String[] character) {
|
||||
Map<SkillType, Integer> skills = getSkillMapFromLine(character); // Skill levels
|
||||
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||
Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
||||
@@ -771,6 +847,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
skillsXp.put(SkillType.AXES, (float) Integer.valueOf(character[21]));
|
||||
skillsXp.put(SkillType.ACROBATICS, (float) Integer.valueOf(character[22]));
|
||||
skillsXp.put(SkillType.FISHING, (float) Integer.valueOf(character[35]));
|
||||
skillsXp.put(SkillType.ALCHEMY, (float) Integer.valueOf(character[40]));
|
||||
|
||||
// Taming - Unused
|
||||
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[32]));
|
||||
@@ -810,6 +887,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||
skills.put(SkillType.AXES, Integer.valueOf(character[13]));
|
||||
skills.put(SkillType.ACROBATICS, Integer.valueOf(character[14]));
|
||||
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
||||
skills.put(SkillType.ALCHEMY, Integer.valueOf(character[39]));
|
||||
|
||||
return skills;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
@@ -17,8 +18,8 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||
import com.gmail.nossr50.datatypes.database.DatabaseUpdateType;
|
||||
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.database.UpgradeType;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
@@ -135,9 +136,9 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
success &= saveHuds(userId, (mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()));
|
||||
success &= saveLongs(
|
||||
"UPDATE " + tablePrefix + "cooldowns SET "
|
||||
+ " mining = ?, woodcutting = ?, unarmed = ?"
|
||||
+ ", herbalism = ?, excavation = ?, swords = ?"
|
||||
+ ", axes = ?, blast_mining = ? WHERE user_id = ?",
|
||||
+ " mining = ?, woodcutting = ?, unarmed = ?"
|
||||
+ ", herbalism = ?, excavation = ?, swords = ?"
|
||||
+ ", axes = ?, blast_mining = ? WHERE user_id = ?",
|
||||
userId,
|
||||
profile.getAbilityDATS(AbilityType.SUPER_BREAKER),
|
||||
profile.getAbilityDATS(AbilityType.TREE_FELLER),
|
||||
@@ -149,10 +150,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
profile.getAbilityDATS(AbilityType.BLAST_MINING));
|
||||
success &= saveIntegers(
|
||||
"UPDATE " + tablePrefix + "skills SET "
|
||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||
+ ", fishing = ? WHERE user_id = ?",
|
||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||
+ ", fishing = ?, alchemy = ? WHERE user_id = ?",
|
||||
profile.getSkillLevel(SkillType.TAMING),
|
||||
profile.getSkillLevel(SkillType.MINING),
|
||||
profile.getSkillLevel(SkillType.REPAIR),
|
||||
@@ -165,13 +166,14 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
profile.getSkillLevel(SkillType.AXES),
|
||||
profile.getSkillLevel(SkillType.ACROBATICS),
|
||||
profile.getSkillLevel(SkillType.FISHING),
|
||||
profile.getSkillLevel(SkillType.ALCHEMY),
|
||||
userId);
|
||||
success &= saveIntegers(
|
||||
"UPDATE " + tablePrefix + "experience SET "
|
||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||
+ ", fishing = ? WHERE user_id = ?",
|
||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||
+ ", fishing = ?, alchemy = ? WHERE user_id = ?",
|
||||
profile.getSkillXpLevel(SkillType.TAMING),
|
||||
profile.getSkillXpLevel(SkillType.MINING),
|
||||
profile.getSkillXpLevel(SkillType.REPAIR),
|
||||
@@ -184,6 +186,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
profile.getSkillXpLevel(SkillType.AXES),
|
||||
profile.getSkillXpLevel(SkillType.ACROBATICS),
|
||||
profile.getSkillXpLevel(SkillType.FISHING),
|
||||
profile.getSkillXpLevel(SkillType.ALCHEMY),
|
||||
userId);
|
||||
return success;
|
||||
}
|
||||
@@ -192,8 +195,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
List<PlayerStat> stats = new ArrayList<PlayerStat>();
|
||||
|
||||
if (checkConnected()) {
|
||||
String query = skill == null ? "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing" : skill.name().toLowerCase();
|
||||
ResultSet resultSet = null;
|
||||
String query = skill == null ? "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy" : skill.name().toLowerCase();
|
||||
ResultSet resultSet;
|
||||
PreparedStatement statement = null;
|
||||
|
||||
try {
|
||||
@@ -240,8 +243,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
String skillName = skillType.name().toLowerCase();
|
||||
String sql = "SELECT COUNT(*) AS rank FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE " + skillName + " > 0 " +
|
||||
"AND " + skillName + " > (SELECT " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE user = ?)";
|
||||
"AND " + skillName + " > (SELECT " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE user = ?)";
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement(sql);
|
||||
statement.setString(1, playerName);
|
||||
@@ -252,8 +255,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
int rank = resultSet.getInt("rank");
|
||||
|
||||
sql = "SELECT user, " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE " + skillName + " > 0 " +
|
||||
"AND " + skillName + " = (SELECT " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE user = '" + playerName + "') ORDER BY user";
|
||||
"AND " + skillName + " = (SELECT " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE user = '" + playerName + "') ORDER BY user";
|
||||
|
||||
statement.close();
|
||||
|
||||
@@ -271,9 +274,9 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
}
|
||||
|
||||
String sql = "SELECT COUNT(*) AS rank FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing > 0 " +
|
||||
"AND taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing > " +
|
||||
"(SELECT taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing " +
|
||||
"WHERE taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy > 0 " +
|
||||
"AND taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy > " +
|
||||
"(SELECT taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy " +
|
||||
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE user = ?)";
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement(sql);
|
||||
@@ -286,11 +289,11 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
|
||||
statement.close();
|
||||
|
||||
sql = "SELECT user, taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing " +
|
||||
sql = "SELECT user, taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy " +
|
||||
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing > 0 " +
|
||||
"AND taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing = " +
|
||||
"(SELECT taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing " +
|
||||
"WHERE taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy > 0 " +
|
||||
"AND taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy = " +
|
||||
"(SELECT taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy " +
|
||||
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE user = ?) ORDER BY user";
|
||||
|
||||
statement = connection.prepareStatement(sql);
|
||||
@@ -359,16 +362,16 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
statement = connection.prepareStatement(
|
||||
"SELECT "
|
||||
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, "
|
||||
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, "
|
||||
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
|
||||
+ "h.mobhealthbar "
|
||||
+ "FROM " + tablePrefix + "users u "
|
||||
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
|
||||
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
|
||||
+ "JOIN " + tablePrefix + "cooldowns c ON (u.id = c.user_id) "
|
||||
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
||||
+ "WHERE u.user = ?");
|
||||
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, s.alchemy, "
|
||||
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, e.alchemy, "
|
||||
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
|
||||
+ "h.mobhealthbar "
|
||||
+ "FROM " + tablePrefix + "users u "
|
||||
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
|
||||
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
|
||||
+ "JOIN " + tablePrefix + "cooldowns c ON (u.id = c.user_id) "
|
||||
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
||||
+ "WHERE u.user = ?");
|
||||
statement.setString(1, playerName);
|
||||
|
||||
ResultSet result = statement.executeQuery();
|
||||
@@ -435,27 +438,27 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
statement = connection.prepareStatement(
|
||||
"SELECT "
|
||||
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, "
|
||||
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, "
|
||||
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
|
||||
+ "h.mobhealthbar "
|
||||
+ "FROM " + tablePrefix + "users u "
|
||||
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
|
||||
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
|
||||
+ "JOIN " + tablePrefix + "cooldowns c ON (u.id = c.user_id) "
|
||||
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
||||
+ "WHERE u.user = ?");
|
||||
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, s.alchemy, "
|
||||
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, e.alchemy, "
|
||||
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
|
||||
+ "h.mobhealthbar "
|
||||
+ "FROM " + tablePrefix + "users u "
|
||||
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
|
||||
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
|
||||
+ "JOIN " + tablePrefix + "cooldowns c ON (u.id = c.user_id) "
|
||||
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
||||
+ "WHERE u.user = ?");
|
||||
List<String> usernames = getStoredUsers();
|
||||
ResultSet result = null;
|
||||
ResultSet resultSet;
|
||||
int convertedUsers = 0;
|
||||
long startMillis = System.currentTimeMillis();
|
||||
for (String playerName : usernames) {
|
||||
statement.setString(1, playerName);
|
||||
try {
|
||||
result = statement.executeQuery();
|
||||
result.next();
|
||||
destination.saveUser(loadFromResult(playerName, result));
|
||||
result.close();
|
||||
resultSet = statement.executeQuery();
|
||||
resultSet.next();
|
||||
destination.saveUser(loadFromResult(playerName, resultSet));
|
||||
resultSet.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// Ignore
|
||||
@@ -481,20 +484,20 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check connection status and re-establish if dead or stale.
|
||||
*
|
||||
* If the very first immediate attempt fails, further attempts
|
||||
* will be made in progressively larger intervals up to MAX_WAIT
|
||||
* intervals.
|
||||
*
|
||||
* This allows for MySQL to time out idle connections as needed by
|
||||
* server operator, without affecting McMMO, while still providing
|
||||
* protection against a database outage taking down Bukkit's tick
|
||||
* processing loop due to attempting a database connection each
|
||||
* time McMMO needs the database.
|
||||
*
|
||||
* @return the boolean value for whether or not we are connected
|
||||
*/
|
||||
* Check connection status and re-establish if dead or stale.
|
||||
* <p/>
|
||||
* If the very first immediate attempt fails, further attempts
|
||||
* will be made in progressively larger intervals up to MAX_WAIT
|
||||
* intervals.
|
||||
* <p/>
|
||||
* This allows for MySQL to time out idle connections as needed by
|
||||
* server operator, without affecting McMMO, while still providing
|
||||
* protection against a database outage taking down Bukkit's tick
|
||||
* processing loop due to attempting a database connection each
|
||||
* time McMMO needs the database.
|
||||
*
|
||||
* @return the boolean value for whether or not we are connected
|
||||
*/
|
||||
public boolean checkConnected() {
|
||||
boolean isClosed = true;
|
||||
boolean isValid = false;
|
||||
@@ -616,7 +619,6 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
connectionProperties.put("user", Config.getInstance().getMySQLUserName());
|
||||
connectionProperties.put("password", Config.getInstance().getMySQLUserPassword());
|
||||
connectionProperties.put("autoReconnect", "false");
|
||||
connectionProperties.put("maxReconnects", "0");
|
||||
connection = DriverManager.getConnection(connectionString, connectionProperties);
|
||||
|
||||
mcMMO.p.getLogger().info("Connection to MySQL was a success!");
|
||||
@@ -687,6 +689,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`fishing` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`alchemy` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "PRIMARY KEY (`user_id`)) "
|
||||
+ "DEFAULT CHARSET=latin1;");
|
||||
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "experience` ("
|
||||
@@ -703,144 +706,178 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`fishing` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`alchemy` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "PRIMARY KEY (`user_id`)) "
|
||||
+ "DEFAULT CHARSET=latin1;");
|
||||
|
||||
for (DatabaseUpdateType updateType : DatabaseUpdateType.values()) {
|
||||
for (UpgradeType updateType : UpgradeType.values()) {
|
||||
checkDatabaseStructure(updateType);
|
||||
}
|
||||
|
||||
mcMMO.p.getLogger().info("Killing orphans");
|
||||
write("DELETE FROM `" + tablePrefix + "experience` WHERE NOT EXISTS (SELECT * FROM `" + tablePrefix + "users` `u` WHERE `" + tablePrefix + "experience`.`user_id` = `u`.`id`)");
|
||||
write("DELETE FROM `" + tablePrefix + "huds` WHERE NOT EXISTS (SELECT * FROM `" + tablePrefix + "users` `u` WHERE `" + tablePrefix + "huds`.`user_id` = `u`.`id`)");
|
||||
write("DELETE FROM `" + tablePrefix + "cooldowns` WHERE NOT EXISTS (SELECT * FROM `" + tablePrefix + "users` `u` WHERE `" + tablePrefix + "cooldowns`.`user_id` = `u`.`id`)");
|
||||
write("DELETE FROM `" + tablePrefix + "skills` WHERE NOT EXISTS (SELECT * FROM `" + tablePrefix + "users` `u` WHERE `" + tablePrefix + "skills`.`user_id` = `u`.`id`)");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check database structure for missing values.
|
||||
* Check database structure for necessary upgrades.
|
||||
*
|
||||
* @param update Type of data to check updates for
|
||||
* @param upgrade Upgrade to attempt to apply
|
||||
*/
|
||||
private void checkDatabaseStructure(DatabaseUpdateType update) {
|
||||
String sql = "";
|
||||
|
||||
switch (update) {
|
||||
case BLAST_MINING:
|
||||
sql = "SELECT * FROM `" + tablePrefix + "cooldowns` ORDER BY `" + tablePrefix + "cooldowns`.`blast_mining` ASC LIMIT 0 , 30";
|
||||
break;
|
||||
|
||||
case FISHING:
|
||||
sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`fishing` ASC LIMIT 0 , 30";
|
||||
break;
|
||||
|
||||
case INDEX:
|
||||
if (read("SHOW INDEX FROM " + tablePrefix + "skills").size() != 13 && checkConnected()) {
|
||||
mcMMO.p.getLogger().info("Indexing tables, this may take a while on larger databases");
|
||||
write("ALTER TABLE `" + tablePrefix + "skills` ADD INDEX `idx_taming` (`taming`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_mining` (`mining`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_woodcutting` (`woodcutting`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_repair` (`repair`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_unarmed` (`unarmed`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_herbalism` (`herbalism`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_excavation` (`excavation`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_archery` (`archery`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_swords` (`swords`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_axes` (`axes`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_acrobatics` (`acrobatics`) USING BTREE, "
|
||||
+ "ADD INDEX `idx_fishing` (`fishing`) USING BTREE;");
|
||||
}
|
||||
return;
|
||||
|
||||
case MOB_HEALTHBARS:
|
||||
sql = "SELECT * FROM `" + tablePrefix + "huds` ORDER BY `" + tablePrefix + "huds`.`mobhealthbar` ASC LIMIT 0 , 30";
|
||||
break;
|
||||
|
||||
case PARTY_NAMES:
|
||||
write("ALTER TABLE `" + tablePrefix + "users` DROP COLUMN `party` ;");
|
||||
return;
|
||||
|
||||
case DROPPED_SPOUT:
|
||||
write("ALTER TABLE `" + tablePrefix + "huds` DROP COLUMN `hudtype` ;");
|
||||
return;
|
||||
|
||||
case KILL_ORPHANS:
|
||||
mcMMO.p.getLogger().info("Killing orphans");
|
||||
write(
|
||||
"DELETE FROM " + tablePrefix + "experience " +
|
||||
"WHERE NOT EXISTS (SELECT * FROM " +
|
||||
tablePrefix + "users u WHERE " +
|
||||
tablePrefix + "experience.user_id = u.id);"
|
||||
);
|
||||
write(
|
||||
"DELETE FROM " + tablePrefix + "huds " +
|
||||
"WHERE NOT EXISTS (SELECT * FROM " +
|
||||
tablePrefix + "users u WHERE " +
|
||||
tablePrefix + "huds.user_id = u.id);"
|
||||
);
|
||||
write(
|
||||
"DELETE FROM " + tablePrefix + "cooldowns " +
|
||||
"WHERE NOT EXISTS (SELECT * FROM " +
|
||||
tablePrefix + "users u WHERE " +
|
||||
tablePrefix + "cooldowns.user_id = u.id);"
|
||||
);
|
||||
write(
|
||||
"DELETE FROM " + tablePrefix + "skills " +
|
||||
"WHERE NOT EXISTS (SELECT * FROM " +
|
||||
tablePrefix + "users u WHERE " +
|
||||
tablePrefix + "skills.user_id = u.id);"
|
||||
);
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
private void checkDatabaseStructure(UpgradeType upgrade) {
|
||||
if (!checkConnected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mcMMO.getUpgradeManager().shouldUpgrade(upgrade)) {
|
||||
mcMMO.p.debug("Skipping " + upgrade.name() + " upgrade (unneeded)");
|
||||
return;
|
||||
}
|
||||
|
||||
Statement statement = null;
|
||||
ResultSet resultSet = null;
|
||||
HashMap<Integer, ArrayList<String>> rows = new HashMap<Integer, ArrayList<String>>();
|
||||
PreparedStatement statement = null;
|
||||
|
||||
try {
|
||||
if (!checkConnected()) {
|
||||
return;
|
||||
}
|
||||
statement = connection.createStatement();
|
||||
|
||||
statement = connection.prepareStatement(sql);
|
||||
resultSet = statement.executeQuery();
|
||||
|
||||
while (resultSet.next()) {
|
||||
ArrayList<String> column = new ArrayList<String>();
|
||||
|
||||
for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
|
||||
column.add(resultSet.getString(i));
|
||||
}
|
||||
|
||||
rows.put(resultSet.getRow(), column);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
switch (update) {
|
||||
case BLAST_MINING:
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Blast Mining...");
|
||||
write("ALTER TABLE `"+tablePrefix + "cooldowns` ADD `blast_mining` int(32) NOT NULL DEFAULT '0' ;");
|
||||
switch (upgrade) {
|
||||
case ADD_FISHING:
|
||||
try {
|
||||
statement.executeQuery("SELECT `fishing` FROM `" + tablePrefix + "skills` LIMIT 1");
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Fishing...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "skills` ADD `fishing` int(10) NOT NULL DEFAULT '0'");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "experience` ADD `fishing` int(10) NOT NULL DEFAULT '0'");
|
||||
}
|
||||
break;
|
||||
|
||||
case FISHING:
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Fishing...");
|
||||
write("ALTER TABLE `"+tablePrefix + "skills` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
||||
write("ALTER TABLE `"+tablePrefix + "experience` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
||||
case ADD_BLAST_MINING_COOLDOWN:
|
||||
try {
|
||||
statement.executeQuery("SELECT `blast_mining` FROM `" + tablePrefix + "cooldowns` LIMIT 1");
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Blast Mining...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "cooldowns` ADD `blast_mining` int(32) NOT NULL DEFAULT '0'");
|
||||
}
|
||||
break;
|
||||
|
||||
case MOB_HEALTHBARS:
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for mob healthbars...");
|
||||
write("ALTER TABLE `" + tablePrefix + "huds` ADD `mobhealthbar` varchar(50) NOT NULL DEFAULT '" + Config.getInstance().getMobHealthbarDefault() + "' ;");
|
||||
case ADD_SQL_INDEXES:
|
||||
resultSet = statement.executeQuery("SHOW INDEX FROM `" + tablePrefix + "skills` WHERE `Key_name` LIKE 'idx\\_%'");
|
||||
resultSet.last();
|
||||
|
||||
if (resultSet.getRow() != SkillType.NON_CHILD_SKILLS.size()) {
|
||||
mcMMO.p.getLogger().info("Indexing tables, this may take a while on larger databases");
|
||||
|
||||
for (SkillType skill : SkillType.NON_CHILD_SKILLS) {
|
||||
String skill_name = skill.name().toLowerCase();
|
||||
|
||||
try {
|
||||
statement.executeUpdate("ALTER TABLE `" + tablePrefix + "skills` ADD INDEX `idx_" + skill_name + "` (`" + skill_name + "`) USING BTREE");
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ADD_MOB_HEALTHBARS:
|
||||
try {
|
||||
statement.executeQuery("SELECT `mobhealthbar` FROM `" + tablePrefix + "huds` LIMIT 1");
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for mob healthbars...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "huds` ADD `mobhealthbar` varchar(50) NOT NULL DEFAULT '" + Config.getInstance().getMobHealthbarDefault() + "'");
|
||||
}
|
||||
break;
|
||||
|
||||
case DROP_SQL_PARTY_NAMES:
|
||||
try {
|
||||
resultSet = statement.executeQuery("SELECT * FROM `" + tablePrefix + "users` LIMIT 1");
|
||||
|
||||
ResultSetMetaData rsmeta = resultSet.getMetaData();
|
||||
boolean column_exists = false;
|
||||
|
||||
for (int i = 1; i <= rsmeta.getColumnCount(); i++) {
|
||||
if (rsmeta.getColumnName(i).equalsIgnoreCase("party")) {
|
||||
column_exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (column_exists) {
|
||||
mcMMO.p.getLogger().info("Removing party name from users table...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "users` DROP COLUMN `party`");
|
||||
}
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
// Ignore
|
||||
}
|
||||
break;
|
||||
|
||||
case DROP_SPOUT:
|
||||
try {
|
||||
resultSet = statement.executeQuery("SELECT * FROM `" + tablePrefix + "huds` LIMIT 1");
|
||||
|
||||
ResultSetMetaData rsmeta = resultSet.getMetaData();
|
||||
boolean column_exists = false;
|
||||
|
||||
for (int i = 1; i <= rsmeta.getColumnCount(); i++) {
|
||||
if (rsmeta.getColumnName(i).equalsIgnoreCase("hudtype")) {
|
||||
column_exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (column_exists) {
|
||||
mcMMO.p.getLogger().info("Removing Spout HUD type from huds table...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "huds` DROP COLUMN `hudtype`");
|
||||
}
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
// Ignore
|
||||
}
|
||||
break;
|
||||
|
||||
case ADD_ALCHEMY:
|
||||
try {
|
||||
statement.executeQuery("SELECT `alchemy` FROM `" + tablePrefix + "skills` LIMIT 1");
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Alchemy...");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "skills` ADD `alchemy` int(10) NOT NULL DEFAULT '0'");
|
||||
statement.executeQuery("ALTER TABLE `" + tablePrefix + "experience` ADD `alchemy` int(10) NOT NULL DEFAULT '0'");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
mcMMO.getUpgradeManager().setUpgradeCompleted(upgrade);
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
|
||||
}
|
||||
finally {
|
||||
if (resultSet != null) {
|
||||
try {
|
||||
resultSet.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
if (statement != null) {
|
||||
try {
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// Ignore the error, we're leaving
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -850,6 +887,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
* Attempt to write the SQL query.
|
||||
*
|
||||
* @param sql Query to write.
|
||||
*
|
||||
* @return true if the query was successfully written, false otherwise.
|
||||
*/
|
||||
private boolean write(String sql) {
|
||||
@@ -885,6 +923,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
* Returns the number of rows affected by either a DELETE or UPDATE query
|
||||
*
|
||||
* @param sql SQL query to execute
|
||||
*
|
||||
* @return the number of rows affected
|
||||
*/
|
||||
private int update(String sql) {
|
||||
@@ -919,6 +958,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
* Read SQL query.
|
||||
*
|
||||
* @param sql SQL query to read
|
||||
*
|
||||
* @return the rows in this SQL query
|
||||
*/
|
||||
private HashMap<Integer, ArrayList<String>> read(String sql) {
|
||||
@@ -964,13 +1004,14 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
* Get the Integer. Only return first row / first field.
|
||||
*
|
||||
* @param statement SQL query to execute
|
||||
*
|
||||
* @return the value in the first row / first field
|
||||
*/
|
||||
private int readInt(PreparedStatement statement) {
|
||||
int result = -1;
|
||||
|
||||
if (checkConnected()) {
|
||||
ResultSet resultSet = null;
|
||||
ResultSet resultSet;
|
||||
|
||||
try {
|
||||
resultSet = statement.executeQuery();
|
||||
@@ -1107,6 +1148,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
* Retrieve the database id for a player
|
||||
*
|
||||
* @param playerName The name of the user to retrieve the id for
|
||||
*
|
||||
* @return the requested id or -1 if not found
|
||||
*/
|
||||
private int readId(String playerName) {
|
||||
@@ -1177,15 +1219,15 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
}
|
||||
|
||||
private PlayerProfile loadFromResult(String playerName, ResultSet result) throws SQLException {
|
||||
Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); // Skill & Level
|
||||
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||
Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); // Skill & Level
|
||||
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||
Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
||||
MobHealthbarType mobHealthbarType;
|
||||
|
||||
final int OFFSET_SKILLS = 0; // TODO update these numbers when the query changes (a new skill is added)
|
||||
final int OFFSET_XP = 12;
|
||||
final int OFFSET_DATS = 24;
|
||||
final int OFFSET_OTHER = 36;
|
||||
final int OFFSET_XP = 13;
|
||||
final int OFFSET_DATS = 26;
|
||||
final int OFFSET_OTHER = 38;
|
||||
|
||||
skills.put(SkillType.TAMING, result.getInt(OFFSET_SKILLS + 1));
|
||||
skills.put(SkillType.MINING, result.getInt(OFFSET_SKILLS + 2));
|
||||
@@ -1199,6 +1241,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
skills.put(SkillType.AXES, result.getInt(OFFSET_SKILLS + 10));
|
||||
skills.put(SkillType.ACROBATICS, result.getInt(OFFSET_SKILLS + 11));
|
||||
skills.put(SkillType.FISHING, result.getInt(OFFSET_SKILLS + 12));
|
||||
skills.put(SkillType.ALCHEMY, result.getInt(OFFSET_SKILLS + 13));
|
||||
|
||||
skillsXp.put(SkillType.TAMING, result.getFloat(OFFSET_XP + 1));
|
||||
skillsXp.put(SkillType.MINING, result.getFloat(OFFSET_XP + 2));
|
||||
@@ -1212,6 +1255,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
skillsXp.put(SkillType.AXES, result.getFloat(OFFSET_XP + 10));
|
||||
skillsXp.put(SkillType.ACROBATICS, result.getFloat(OFFSET_XP + 11));
|
||||
skillsXp.put(SkillType.FISHING, result.getFloat(OFFSET_XP + 12));
|
||||
skillsXp.put(SkillType.ALCHEMY, result.getFloat(OFFSET_XP + 13));
|
||||
|
||||
// Taming - Unused - result.getInt(OFFSET_DATS + 1)
|
||||
skillsDATS.put(AbilityType.SUPER_BREAKER, result.getInt(OFFSET_DATS + 2));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user