mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
135 Commits
dev-events
...
dev-serial
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3df0d0f6aa | ||
|
|
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 |
@@ -8,18 +8,48 @@ Key:
|
|||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 1.4.08-dev
|
Version 1.4.08-dev
|
||||||
|
+ 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 the possibility to gain experience when using Fishing "Shake"
|
||||||
+ Added config options to disable various sound effects
|
+ 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.
|
+ 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 automatic cleanup of backups folder.
|
||||||
+ Added bypass permission for finding Fishing traps
|
+ 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
|
||||||
|
= 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 bug with toggle commands not properly displaying the success message.
|
||||||
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||||
= Fixed bug with Salvage not reading the config value for the anvil material.
|
= 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 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 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 bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
||||||
|
= 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 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
|
||||||
|
! 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
|
! 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
|
||||||
|
- Removed /stats alias for /mcstats
|
||||||
|
|
||||||
Version 1.4.07
|
Version 1.4.07
|
||||||
+ Added XP boost to Acrobatics when wearing Boots of Feather Falling
|
+ 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/).
|
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
|
### 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
|
## 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)
|
(https://github.com/riking)
|
||||||
|
|
||||||
|
### Special thanks
|
||||||
|
[]
|
||||||
|
(https://github.com/EasyMFnE)
|
||||||
|
Added the Alchemy skill
|
||||||
|
|
||||||
## Compiling
|
## 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`
|
The typical command used to build mcMMO is: `mvn clean package install`
|
||||||
|
|
||||||
|
|||||||
439
extras/mods/LOTR.armor.yml
Executable file
439
extras/mods/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/LOTR.blocks.yml
Executable file
211
extras/mods/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/LOTR.tools.yml
Executable file
700
extras/mods/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/extrabiomesxl.blocks.yml
Executable file
182
extras/mods/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/galacticraft.armor.yml
Executable file
71
extras/mods/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/galacticraft.blocks.yml
Executable file
98
extras/mods/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/galacticraft.tools.yml
Executable file
123
extras/mods/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/metallurgy3.armor.yml
Executable file
1018
extras/mods/metallurgy3.armor.yml
Executable file
File diff suppressed because it is too large
Load Diff
185
extras/mods/metallurgy3.blocks.yml
Executable file
185
extras/mods/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/metallurgy3.tools.yml
Normal file
1807
extras/mods/metallurgy3.tools.yml
Normal file
File diff suppressed because it is too large
Load Diff
44
extras/mods/railcraft.armor.yml
Executable file
44
extras/mods/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/railcraft.blocks.yml
Executable file
103
extras/mods/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/railcraft.tools.yml
Executable file
76
extras/mods/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/simcraft.blocks.yml
Executable file
543
extras/mods/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/simcraft.tools.yml
Executable file
61
extras/mods/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/twilightforest.armor.yml
Executable file
134
extras/mods/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/twilightforest.blocks.yml
Executable file
117
extras/mods/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/twilightforest.tools.yml
Executable file
186
extras/mods/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/underground_biomes.blocks.yml
Executable file
171
extras/mods/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
|
||||||
16
pom.xml
16
pom.xml
@@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>1.4.08-dev1</version>
|
<version>1.4.08-SNAPSHOT</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
@@ -108,6 +108,10 @@
|
|||||||
<id>bukkit-repo</id>
|
<id>bukkit-repo</id>
|
||||||
<url>http://repo.bukkit.org/content/groups/public/</url>
|
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>md_5-releases</id>
|
||||||
|
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||||
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>Plugin MetricsExtension</id>
|
<id>Plugin MetricsExtension</id>
|
||||||
<url>http://repo.turt2live.com</url>
|
<url>http://repo.turt2live.com</url>
|
||||||
@@ -117,7 +121,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>LATEST</version>
|
<version>1.6.4-R2.0</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -135,9 +139,13 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>mcmmo-repo</id>
|
<id>md_5-releases</id>
|
||||||
<url>file:///var/lib/jenkins/repo</url>
|
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>md_5-snapshots</id>
|
||||||
|
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|||||||
@@ -174,4 +174,17 @@ public final class PartyAPI {
|
|||||||
public static List<Player> getOnlineMembers(Player player) {
|
public static List<Player> getOnlineMembers(Player player) {
|
||||||
return PartyManager.getOnlineMembers(player);
|
return PartyManager.getOnlineMembers(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasAlly(String partyName) {
|
||||||
|
return PartyManager.getParty(partyName).getAlly() != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getAllyName(String partyName) {
|
||||||
|
Party ally = PartyManager.getParty(partyName).getAlly();
|
||||||
|
if (ally != null) {
|
||||||
|
return ally.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.gmail.nossr50.chat;
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@@ -7,6 +10,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
public class PartyChatManager extends ChatManager {
|
public class PartyChatManager extends ChatManager {
|
||||||
private Party party;
|
private Party party;
|
||||||
@@ -27,13 +31,20 @@ public class PartyChatManager extends ChatManager {
|
|||||||
@Override
|
@Override
|
||||||
protected void sendMessage() {
|
protected void sendMessage() {
|
||||||
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||||
message = message.replaceFirst(displayName, ChatColor.GOLD + displayName + ChatColor.RESET);
|
message = message.replaceFirst(Pattern.quote(displayName), ChatColor.GOLD + Matcher.quoteReplacement(displayName) + ChatColor.RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Player member : party.getOnlineMembers()) {
|
for (Player member : party.getOnlineMembers()) {
|
||||||
member.sendMessage(message);
|
member.sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (party.getAlly() != null) {
|
||||||
|
for (Player member : party.getAlly().getOnlineMembers()) {
|
||||||
|
String allyPrefix = LocaleLoader.formatString(Config.getInstance().getPartyChatPrefixAlly());
|
||||||
|
member.sendMessage(allyPrefix + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
|
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -40,7 +39,7 @@ public class KrakenCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.HolidayManager;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class McmmoCommand implements CommandExecutor {
|
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(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
if (Permissions.showversion(sender)) {
|
||||||
HolidayManager.anniversaryCheck(sender);
|
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@@ -43,9 +45,9 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
|
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
|
||||||
displayPartyCommands(sender);
|
displayGeneralCommands(sender);
|
||||||
displayOtherCommands(sender);
|
displayOtherCommands(sender);
|
||||||
|
displayPartyCommands(sender);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -54,55 +56,57 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayPartyCommands(CommandSender sender) {
|
private void displayGeneralCommands(CommandSender sender) {
|
||||||
if (Permissions.party(sender)) {
|
sender.sendMessage(ChatColor.DARK_AQUA + " /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
sender.sendMessage(ChatColor.DARK_AQUA + " /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||||
sender.sendMessage(" /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
sender.sendMessage(ChatColor.DARK_AQUA + " /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||||
sender.sendMessage(" /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
|
||||||
sender.sendMessage(" /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
|
||||||
|
|
||||||
if (Permissions.partyChat(sender)) {
|
if (Permissions.inspect(sender)) {
|
||||||
sender.sendMessage(" /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
sender.sendMessage(ChatColor.DARK_AQUA + " /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(" /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
if (Permissions.mcability(sender)) {
|
||||||
sender.sendMessage(" /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
sender.sendMessage(ChatColor.DARK_AQUA + " /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||||
|
|
||||||
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
|
||||||
sender.sendMessage(" /party teleport " + LocaleLoader.getString("Commands.Party.Teleport"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayOtherCommands(CommandSender sender) {
|
private void displayOtherCommands(CommandSender sender) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
|
||||||
sender.sendMessage(" /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
|
||||||
sender.sendMessage(" /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
|
||||||
|
|
||||||
if (Permissions.skillreset(sender)) {
|
if (Permissions.skillreset(sender)) {
|
||||||
sender.sendMessage(" /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
sender.sendMessage(ChatColor.DARK_AQUA + " /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"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.mmoedit(sender)) {
|
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)) {
|
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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
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.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.chat.ChatManager;
|
import com.gmail.nossr50.chat.ChatManager;
|
||||||
import com.gmail.nossr50.chat.ChatManagerFactory;
|
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||||
@@ -111,6 +113,11 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
return;
|
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);
|
mcMMOPlayer.enableChat(chatMode);
|
||||||
sender.sendMessage(chatMode.getEnabledMessage());
|
sender.sendMessage(chatMode.getEnabledMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.chat.PartyChatManager;
|
import com.gmail.nossr50.chat.PartyChatManager;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -28,6 +30,11 @@ public class PartyChatCommand extends ChatCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
message = buildChatMessage(args, 0);
|
message = buildChatMessage(args, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.bukkit.util.StringUtil;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ public class McremoveCommand implements TabExecutor {
|
|||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
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.getPlayer(playerName, true) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -24,6 +23,8 @@ import com.google.common.collect.ImmutableList;
|
|||||||
public abstract class ExperienceCommand implements TabExecutor {
|
public abstract class ExperienceCommand implements TabExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
SkillType skill;
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
@@ -39,7 +40,13 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
return true;
|
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;
|
return true;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
@@ -52,10 +59,15 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
return true;
|
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]);
|
int value = Integer.parseInt(args[2]);
|
||||||
|
|
||||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
// 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 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.
|
||||||
@@ -100,11 +112,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
protected abstract void handlePlayerMessageSkill(Player player, int value, SkillType skill);
|
protected abstract void handlePlayerMessageSkill(Player player, int value, SkillType skill);
|
||||||
|
|
||||||
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
||||||
if (CommandUtils.isInvalidInteger(sender, value) || CommandUtils.isInvalidSkill(sender, skillName)) {
|
return !(CommandUtils.isInvalidInteger(sender, value) || (!skillName.equalsIgnoreCase("all") && CommandUtils.isInvalidSkill(sender, skillName)));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
||||||
@@ -118,7 +126,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
|
|
||||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill, int value) {
|
protected void editValues(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||||
if (skill == null) {
|
if (skill == null) {
|
||||||
for (SkillType skillType : SkillType.values()) {
|
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||||
handleCommand(player, profile, skillType, value);
|
handleCommand(player, profile, skillType, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,12 +16,16 @@ import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
|||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
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 {
|
public class SkillresetCommand implements TabExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
@@ -31,31 +35,37 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Permissions.skillreset(sender)) {
|
if (!permissionsCheckSelf(sender)) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommandUtils.isInvalidSkill(sender, args[0])) {
|
if (!validateArguments(sender, args[0])) {
|
||||||
return true;
|
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;
|
return true;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (!Permissions.skillresetOthers(sender)) {
|
if (!permissionsCheckOthers(sender)) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommandUtils.isInvalidSkill(sender, args[1])) {
|
if (!validateArguments(sender, args[1])) {
|
||||||
return true;
|
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]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
// 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 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.
|
||||||
@@ -66,13 +76,13 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
editValues(null, profile, skill, args.length, sender, command);
|
editValues(null, profile, skill);
|
||||||
}
|
}
|
||||||
else {
|
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;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -93,31 +103,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void editValues(Player player, PlayerProfile profile, SkillType skill, int argsLength, CommandSender sender, Command command) {
|
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill) {
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
int levelsRemoved = profile.getSkillLevel(skill);
|
int levelsRemoved = profile.getSkillLevel(skill);
|
||||||
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||||
|
|
||||||
@@ -130,4 +116,52 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
|
|
||||||
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false);
|
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
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;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class PartyChangeOwnerCommand implements CommandExecutor {
|
public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||||
@@ -17,7 +17,7 @@ public class PartyChangeOwnerCommand implements CommandExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
|
|
||||||
if (!playerParty.getMembers().contains(targetName)) {
|
if (!playerParty.getMembers().contains(targetName)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@@ -14,6 +11,7 @@ import org.bukkit.util.StringUtil;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
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.commands.party.teleport.PtpCommand;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@@ -25,7 +23,7 @@ import com.google.common.collect.ImmutableList;
|
|||||||
|
|
||||||
public class PartyCommand implements TabExecutor {
|
public class PartyCommand implements TabExecutor {
|
||||||
private static final List<String> PARTY_SUBCOMMANDS;
|
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");
|
private static final List<String> ITEMSHARE_COMPLETIONS = ImmutableList.of("none", "equal", "random", "loot", "mining", "herbalism", "woodcutting", "misc");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -43,7 +41,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
private CommandExecutor partyAcceptCommand = new PartyAcceptCommand();
|
private CommandExecutor partyAcceptCommand = new PartyAcceptCommand();
|
||||||
private CommandExecutor partyCreateCommand = new PartyCreateCommand();
|
private CommandExecutor partyCreateCommand = new PartyCreateCommand();
|
||||||
private CommandExecutor partyQuitCommand = new PartyQuitCommand();
|
private CommandExecutor partyQuitCommand = new PartyQuitCommand();
|
||||||
private CommandExecutor partyExpShareCommand = new PartyExpShareCommand();
|
private CommandExecutor partyXpShareCommand = new PartyXpShareCommand();
|
||||||
private CommandExecutor partyItemShareCommand = new PartyItemShareCommand();
|
private CommandExecutor partyItemShareCommand = new PartyItemShareCommand();
|
||||||
private CommandExecutor partyInviteCommand = new PartyInviteCommand();
|
private CommandExecutor partyInviteCommand = new PartyInviteCommand();
|
||||||
private CommandExecutor partyKickCommand = new PartyKickCommand();
|
private CommandExecutor partyKickCommand = new PartyKickCommand();
|
||||||
@@ -56,6 +54,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
private CommandExecutor partyHelpCommand = new PartyHelpCommand();
|
private CommandExecutor partyHelpCommand = new PartyHelpCommand();
|
||||||
private CommandExecutor partyTeleportCommand = mcMMO.p.getCommand("ptp").getExecutor();
|
private CommandExecutor partyTeleportCommand = mcMMO.p.getCommand("ptp").getExecutor();
|
||||||
private CommandExecutor partyChatCommand = new PartyChatCommand();
|
private CommandExecutor partyChatCommand = new PartyChatCommand();
|
||||||
|
private CommandExecutor partyAllianceCommand = new PartyAllianceCommand();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
@@ -133,8 +132,8 @@ public class PartyCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (subcommand) {
|
switch (subcommand) {
|
||||||
case EXPSHARE:
|
case XPSHARE:
|
||||||
return partyExpShareCommand.onCommand(sender, command, label, args);
|
return partyXpShareCommand.onCommand(sender, command, label, args);
|
||||||
case ITEMSHARE:
|
case ITEMSHARE:
|
||||||
return partyItemShareCommand.onCommand(sender, command, label, args);
|
return partyItemShareCommand.onCommand(sender, command, label, args);
|
||||||
case KICK:
|
case KICK:
|
||||||
@@ -150,6 +149,8 @@ public class PartyCommand implements TabExecutor {
|
|||||||
return partyChangePasswordCommand.onCommand(sender, command, label, args);
|
return partyChangePasswordCommand.onCommand(sender, command, label, args);
|
||||||
case RENAME:
|
case RENAME:
|
||||||
return partyRenameCommand.onCommand(sender, command, label, args);
|
return partyRenameCommand.onCommand(sender, command, label, args);
|
||||||
|
case ALLIANCE:
|
||||||
|
return partyAllianceCommand.onCommand(sender, command, label, args);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -176,8 +177,8 @@ public class PartyCommand implements TabExecutor {
|
|||||||
case OWNER:
|
case OWNER:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
case EXPSHARE:
|
case XPSHARE:
|
||||||
return StringUtil.copyPartialMatches(args[1], EXPSHARE_COMPLETIONS, new ArrayList<String>(EXPSHARE_COMPLETIONS.size()));
|
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
||||||
case ITEMSHARE:
|
case ITEMSHARE:
|
||||||
return StringUtil.copyPartialMatches(args[1], ITEMSHARE_COMPLETIONS, new ArrayList<String>(ITEMSHARE_COMPLETIONS.size()));
|
return StringUtil.copyPartialMatches(args[1], ITEMSHARE_COMPLETIONS, new ArrayList<String>(ITEMSHARE_COMPLETIONS.size()));
|
||||||
case LOCK:
|
case LOCK:
|
||||||
@@ -216,13 +217,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String[] extractArgs(String[] args) {
|
private String[] extractArgs(String[] args) {
|
||||||
String[] newArgs = new String[args.length - 1];
|
return Arrays.copyOfRange(args, 1, args.length);
|
||||||
|
|
||||||
for (int i = 1; i < args.length; i++) {
|
|
||||||
newArgs[i - 1] = args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return newArgs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isItemShareCategory(String category) {
|
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.7", "/party leader"));
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.Help.8", "/party disband"));
|
sender.sendMessage(LocaleLoader.getString("Party.Help.8", "/party disband"));
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.Help.9", "/party itemshare"));
|
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;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
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.party.ShareMode;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@@ -26,7 +29,8 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
Party party = mcMMOPlayer.getParty();
|
Party party = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
displayPartyHeader(player, party);
|
displayPartyHeader(player, party);
|
||||||
displayShareModeInfo(party, player);
|
displayShareModeInfo(player, party);
|
||||||
|
displayPartyFeatures(player, party);
|
||||||
displayMemberInfo(player, mcMMOPlayer, party);
|
displayMemberInfo(player, mcMMOPlayer, party);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -36,31 +40,52 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createMembersList(Party party) {
|
private void displayPartyHeader(Player player, Party party) {
|
||||||
StringBuilder memberList = new StringBuilder();
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||||
|
|
||||||
for (String memberName : party.getMembers()) {
|
StringBuilder status = new StringBuilder();
|
||||||
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
status.append(LocaleLoader.getString("Commands.Party.Status", party.getName(), LocaleLoader.getString("Party.Status." + (party.isLocked() ? "Locked" : "Unlocked")), party.getLevel()));
|
||||||
|
|
||||||
if (party.getLeader().equalsIgnoreCase(memberName)) {
|
if (!party.hasReachedLevelCap()) {
|
||||||
memberList.append(ChatColor.GOLD);
|
status.append(" (").append(party.getXpToLevelPercentage()).append(")");
|
||||||
}
|
|
||||||
else if (member != null) {
|
|
||||||
memberList.append(ChatColor.WHITE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
memberList.append(ChatColor.GRAY);
|
|
||||||
}
|
|
||||||
|
|
||||||
memberList.append(memberName).append(" ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return memberList.toString();
|
player.sendMessage(status.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayShareModeInfo(Party party, Player player) {
|
private void displayPartyFeatures(Player player, Party party) {
|
||||||
boolean xpShareEnabled = Config.getInstance().getExpShareEnabled();
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Features.Header"));
|
||||||
boolean itemShareEnabled = Config.getInstance().getItemShareEnabled();
|
|
||||||
|
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);
|
boolean itemSharingActive = (party.getItemShareMode() != ShareMode.NONE);
|
||||||
|
|
||||||
if (!xpShareEnabled && !itemShareEnabled) {
|
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) {
|
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;
|
int membersOnline = party.getOnlineMembers().size() - 1;
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", membersNear, membersOnline));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", nearMembers.size(), membersOnline));
|
||||||
player.sendMessage(createMembersList(party));
|
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.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ public class PartyInviteCommand implements CommandExecutor {
|
|||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
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.party.ShareMode;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
@@ -17,13 +18,13 @@ import com.gmail.nossr50.util.player.UserManager;
|
|||||||
public class PartyItemShareCommand implements CommandExecutor {
|
public class PartyItemShareCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (!Config.getInstance().getItemShareEnabled()) {
|
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.ItemShare.Disabled"));
|
|
||||||
|
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ITEM_SHARE)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.4"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
||||||
@@ -37,7 +38,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
boolean toggle = false;
|
boolean toggle;
|
||||||
|
|
||||||
if (CommandUtils.shouldEnableToggle(args[2])) {
|
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||||
toggle = true;
|
toggle = true;
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.datatypes.party.Party;
|
|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -19,7 +18,7 @@ public class PartyJoinCommand implements CommandExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ public enum PartySubcommandType {
|
|||||||
HELP,
|
HELP,
|
||||||
INFO,
|
INFO,
|
||||||
QUIT,
|
QUIT,
|
||||||
EXPSHARE,
|
XPSHARE,
|
||||||
ITEMSHARE,
|
ITEMSHARE,
|
||||||
INVITE,
|
INVITE,
|
||||||
KICK,
|
KICK,
|
||||||
@@ -18,7 +18,8 @@ public enum PartySubcommandType {
|
|||||||
PASSWORD,
|
PASSWORD,
|
||||||
RENAME,
|
RENAME,
|
||||||
TELEPORT,
|
TELEPORT,
|
||||||
CHAT;
|
CHAT,
|
||||||
|
ALLIANCE;
|
||||||
|
|
||||||
public static PartySubcommandType getSubcommand(String commandName) {
|
public static PartySubcommandType getSubcommand(String commandName) {
|
||||||
for (PartySubcommandType command : values()) {
|
for (PartySubcommandType command : values()) {
|
||||||
@@ -37,11 +38,14 @@ public enum PartySubcommandType {
|
|||||||
return OWNER;
|
return OWNER;
|
||||||
}
|
}
|
||||||
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
||||||
return EXPSHARE;
|
return XPSHARE;
|
||||||
}
|
}
|
||||||
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
||||||
return ITEMSHARE;
|
return ITEMSHARE;
|
||||||
}
|
}
|
||||||
|
else if (commandName.equalsIgnoreCase("ally")) {
|
||||||
|
return ALLIANCE;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,24 +7,25 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
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.party.ShareMode;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class PartyExpShareCommand implements CommandExecutor {
|
public class PartyXpShareCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (!Config.getInstance().getExpShareEnabled()) {
|
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.ExpShare.Disabled"));
|
|
||||||
|
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.XP_SHARE)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.5"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
|
||||||
|
|
||||||
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
handleChangingShareMode(party, ShareMode.NONE);
|
handleChangingShareMode(party, ShareMode.NONE);
|
||||||
}
|
}
|
||||||
@@ -32,13 +33,13 @@ public class PartyExpShareCommand implements CommandExecutor {
|
|||||||
handleChangingShareMode(party, ShareMode.EQUAL);
|
handleChangingShareMode(party, ShareMode.EQUAL);
|
||||||
}
|
}
|
||||||
else {
|
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;
|
return true;
|
||||||
|
|
||||||
default:
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +47,7 @@ public class PartyExpShareCommand implements CommandExecutor {
|
|||||||
private void handleChangingShareMode(Party party, ShareMode mode) {
|
private void handleChangingShareMode(Party party, ShareMode mode) {
|
||||||
party.setXpShareMode(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()) {
|
for (Player member : party.getOnlineMembers()) {
|
||||||
member.sendMessage(changeModeMessage);
|
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,136 @@
|
|||||||
|
package com.gmail.nossr50.commands.party.alliance;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
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) {
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
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.getPlayer(targetName, true);
|
||||||
|
|
||||||
|
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.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||||
|
|
||||||
public class PtpAcceptCommand implements CommandExecutor {
|
public class PtpAcceptCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
@@ -29,7 +29,7 @@ public class PtpAcceptCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ptpRecord.getTimeout() + Config.getInstance().getPTPCommandTimeout()) * Misc.TIME_CONVERSION_FACTOR < System.currentTimeMillis()) {
|
if (SkillUtils.cooldownExpired(ptpRecord.getTimeout(), Config.getInstance().getPTPCommandTimeout())) {
|
||||||
ptpRecord.removeRequest();
|
ptpRecord.removeRequest();
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired"));
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired"));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||||
@@ -40,6 +42,15 @@ public class PtpCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
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) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
if (args[0].equalsIgnoreCase("toggle")) {
|
if (args[0].equalsIgnoreCase("toggle")) {
|
||||||
@@ -50,9 +61,6 @@ public class PtpCommand implements TabExecutor {
|
|||||||
return ptpAcceptAnyCommand.onCommand(sender, command, label, args);
|
return ptpAcceptAnyCommand.onCommand(sender, command, label, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
|
||||||
|
|
||||||
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
||||||
int hurtCooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
int hurtCooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
||||||
|
|
||||||
@@ -86,7 +94,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendTeleportRequest(sender, player, Misc.getMatchedPlayerName(args[0]));
|
sendTeleportRequest(sender, player, CommandUtils.getMatchedPlayerName(args[0]));
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -29,7 +28,7 @@ public class InspectCommand implements TabExecutor {
|
|||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
// 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 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.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class MccooldownCommand implements TabExecutor {
|
|||||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||||
|
|
||||||
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
for (AbilityType ability : AbilityType.values()) {
|
||||||
if (!ability.getPermissions(player)) {
|
if (!ability.getPermissions(player)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
if (mcMMOPlayer != null) {
|
if (mcMMOPlayer != null) {
|
||||||
@@ -93,7 +93,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getRankUseBoard());
|
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);
|
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class MctopCommand implements TabExecutor {
|
|||||||
|
|
||||||
private void display(int page, SkillType skill, CommandSender sender) {
|
private void display(int page, SkillType skill, CommandSender sender) {
|
||||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getTopUseBoard());
|
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);
|
new MctopCommandAsyncTask(page, skill, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.acrobatics.Acrobatics;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class AcrobaticsCommand extends SkillCommand {
|
public class AcrobaticsCommand extends SkillCommand {
|
||||||
@@ -30,21 +30,21 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||||
// DODGE
|
// DODGE
|
||||||
if (canDodge) {
|
if (canDodge) {
|
||||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.dodgeMaxBonusLevel, Acrobatics.dodgeMaxChance, isLucky);
|
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DODGE, isLucky);
|
||||||
dodgeChance = dodgeStrings[0];
|
dodgeChance = dodgeStrings[0];
|
||||||
dodgeChanceLucky = dodgeStrings[1];
|
dodgeChanceLucky = dodgeStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// ROLL
|
// ROLL
|
||||||
if (canRoll) {
|
if (canRoll) {
|
||||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.rollMaxBonusLevel, Acrobatics.rollMaxChance, isLucky);
|
String[] rollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.ROLL, isLucky);
|
||||||
rollChance = rollStrings[0];
|
rollChance = rollStrings[0];
|
||||||
rollChanceLucky = rollStrings[1];
|
rollChanceLucky = rollStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// GRACEFUL ROLL
|
// GRACEFUL ROLL
|
||||||
if (canGracefulRoll) {
|
if (canGracefulRoll) {
|
||||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollMaxChance, isLucky);
|
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GRACEFUL_ROLL, isLucky);
|
||||||
gracefulRollChance = gracefulRollStrings[0];
|
gracefulRollChance = gracefulRollStrings[0];
|
||||||
gracefulRollChanceLucky = gracefulRollStrings[1];
|
gracefulRollChanceLucky = gracefulRollStrings[1];
|
||||||
}
|
}
|
||||||
@@ -52,9 +52,9 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canDodge = Permissions.dodge(player);
|
canDodge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DODGE);
|
||||||
canRoll = Permissions.roll(player);
|
canRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ROLL);
|
||||||
canGracefulRoll = Permissions.gracefulRoll(player);
|
canGracefulRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GRACEFUL_ROLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.archery.Archery;
|
import com.gmail.nossr50.skills.archery.Archery;
|
||||||
@@ -35,14 +36,14 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
|
|
||||||
// DAZE
|
// DAZE
|
||||||
if (canDaze) {
|
if (canDaze) {
|
||||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, Archery.dazeMaxBonusLevel, Archery.dazeMaxBonus, isLucky);
|
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DAZE, isLucky);
|
||||||
dazeChance = dazeStrings[0];
|
dazeChance = dazeStrings[0];
|
||||||
dazeChanceLucky = dazeStrings[1];
|
dazeChanceLucky = dazeStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// RETRIEVE
|
// RETRIEVE
|
||||||
if (canRetrieve) {
|
if (canRetrieve) {
|
||||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, Archery.retrieveMaxBonusLevel, Archery.retrieveMaxChance, isLucky);
|
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.RETRIEVE, isLucky);
|
||||||
retrieveChance = retrieveStrings[0];
|
retrieveChance = retrieveStrings[0];
|
||||||
retrieveChanceLucky = retrieveStrings[1];
|
retrieveChanceLucky = retrieveStrings[1];
|
||||||
}
|
}
|
||||||
@@ -50,9 +51,9 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canSkillShot = Permissions.bonusDamage(player, skill);
|
canSkillShot = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SKILL_SHOT);
|
||||||
canDaze = Permissions.daze(player);
|
canDaze = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DAZE);
|
||||||
canRetrieve = Permissions.arrowRetrieval(player);
|
canRetrieve = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.RETRIEVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.axes.Axes;
|
import com.gmail.nossr50.skills.axes.Axes;
|
||||||
@@ -13,14 +14,14 @@ import com.gmail.nossr50.util.Permissions;
|
|||||||
public class AxesCommand extends SkillCommand {
|
public class AxesCommand extends SkillCommand {
|
||||||
private String critChance;
|
private String critChance;
|
||||||
private String critChanceLucky;
|
private String critChanceLucky;
|
||||||
private double bonusDamage;
|
private double axeMasteryDamage;
|
||||||
private double impactDamage;
|
private double impactDamage;
|
||||||
private String skullSplitterLength;
|
private String skullSplitterLength;
|
||||||
private String skullSplitterLengthEndurance;
|
private String skullSplitterLengthEndurance;
|
||||||
|
|
||||||
private boolean canSkullSplitter;
|
private boolean canSkullSplitter;
|
||||||
private boolean canCritical;
|
private boolean canCritical;
|
||||||
private boolean canBonusDamage;
|
private boolean canAxeMastery;
|
||||||
private boolean canImpact;
|
private boolean canImpact;
|
||||||
private boolean canGreaterImpact;
|
private boolean canGreaterImpact;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||||
// IMPACT
|
// ARMOR IMPACT
|
||||||
if (canImpact) {
|
if (canImpact) {
|
||||||
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
||||||
}
|
}
|
||||||
@@ -42,26 +43,26 @@ public class AxesCommand extends SkillCommand {
|
|||||||
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// CRITICAL STRIKES
|
// CRITICAL HIT
|
||||||
if (canCritical) {
|
if (canCritical) {
|
||||||
String[] criticalStrikeStrings = calculateAbilityDisplayValues(skillValue, Axes.criticalHitMaxBonusLevel, Axes.criticalHitMaxChance, isLucky);
|
String[] criticalHitStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.CRITICAL_HIT, isLucky);
|
||||||
critChance = criticalStrikeStrings[0];
|
critChance = criticalHitStrings[0];
|
||||||
critChanceLucky = criticalStrikeStrings[1];
|
critChanceLucky = criticalHitStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// AXE MASTERY
|
// AXE MASTERY
|
||||||
if (canBonusDamage) {
|
if (canAxeMastery) {
|
||||||
bonusDamage = Math.min(skillValue / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
axeMasteryDamage = Math.min(skillValue / (Axes.axeMasteryMaxBonusLevel / Axes.axeMasteryMaxBonus), Axes.axeMasteryMaxBonus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canSkullSplitter = Permissions.skullSplitter(player);
|
canSkullSplitter = Permissions.skullSplitter(player);
|
||||||
canCritical = Permissions.criticalStrikes(player);
|
canCritical = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CRITICAL_HIT);
|
||||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
canAxeMastery = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.AXE_MASTERY);
|
||||||
canImpact = Permissions.armorImpact(player);
|
canImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARMOR_IMPACT);
|
||||||
canGreaterImpact = Permissions.greaterImpact(player);
|
canGreaterImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GREATER_IMPACT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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")));
|
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")));
|
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) {
|
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<String>();
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
if (canBonusDamage) {
|
if (canAxeMastery) {
|
||||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
|
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", axeMasteryDamage)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canImpact) {
|
if (canImpact) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@@ -33,7 +34,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||||
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.EXCAVATION_TREASURE_HUNTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
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.skills.SkillType;
|
||||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@@ -114,12 +115,12 @@ public class FishingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canTreasureHunt = Permissions.fishingTreasureHunter(player);
|
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHING_TREASURE_HUNTER);
|
||||||
canMagicHunt = Permissions.magicHunter(player);
|
canMagicHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MAGIC_HUNTER);
|
||||||
canShake = Permissions.shake(player);
|
canShake = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHAKE);
|
||||||
canFishermansDiet = Permissions.fishermansDiet(player);
|
canFishermansDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHERMANS_DIET);
|
||||||
canMasterAngler = Permissions.masterAngler(player);
|
canMasterAngler = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MASTER_ANGLER);
|
||||||
canIceFish = Permissions.iceFishing(player);
|
canIceFish = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ICE_FISHING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -158,7 +159,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
List<String> messages = new ArrayList<String>();
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
if (canTreasureHunt) {
|
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));
|
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.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.herbalism.Herbalism;
|
import com.gmail.nossr50.skills.herbalism.Herbalism;
|
||||||
@@ -55,28 +56,28 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
||||||
greenThumbStage = calculateRank(skillValue, Herbalism.greenThumbStageMaxLevel, Herbalism.greenThumbStageChangeLevel);
|
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];
|
greenThumbChance = greenThumbStrings[0];
|
||||||
greenThumbChanceLucky = greenThumbStrings[1];
|
greenThumbChanceLucky = greenThumbStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Herbalism.doubleDropsMaxLevel, Herbalism.doubleDropsMaxChance, isLucky);
|
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HERBALISM_DOUBLE_DROPS, isLucky);
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// HYLIAN LUCK
|
// HYLIAN LUCK
|
||||||
if (hasHylianLuck) {
|
if (hasHylianLuck) {
|
||||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, Herbalism.hylianLuckMaxLevel, Herbalism.hylianLuckMaxChance, isLucky);
|
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HYLIAN_LUCK, isLucky);
|
||||||
hylianLuckChance = hylianLuckStrings[0];
|
hylianLuckChance = hylianLuckStrings[0];
|
||||||
hylianLuckChanceLucky = hylianLuckStrings[1];
|
hylianLuckChanceLucky = hylianLuckStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// SHROOM THUMB
|
// SHROOM THUMB
|
||||||
if (canShroomThumb) {
|
if (canShroomThumb) {
|
||||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, Herbalism.shroomThumbMaxLevel, Herbalism.shroomThumbMaxChance, isLucky);
|
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SHROOM_THUMB, isLucky);
|
||||||
shroomThumbChance = shroomThumbStrings[0];
|
shroomThumbChance = shroomThumbStrings[0];
|
||||||
shroomThumbChanceLucky = shroomThumbStrings[1];
|
shroomThumbChanceLucky = shroomThumbStrings[1];
|
||||||
}
|
}
|
||||||
@@ -84,13 +85,13 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
hasHylianLuck = Permissions.hylianLuck(player);
|
hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HYLIAN_LUCK);
|
||||||
canGreenTerra = Permissions.greenTerra(player);
|
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);
|
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);
|
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);
|
canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FARMERS_DIET);
|
||||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||||
canShroomThumb = Permissions.shroomThumb(player);
|
canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import java.util.List;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
|
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.skills.mining.MiningManager;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -48,7 +48,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
|
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Mining.doubleDropsMaxLevel, Mining.doubleDropsMaxChance, isLucky);
|
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.MINING_DOUBLE_DROPS, isLucky);
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
canBiggerBombs = Permissions.biggerBombs(player);
|
canBiggerBombs = Permissions.biggerBombs(player);
|
||||||
canBlast = Permissions.remoteDetonation(player);
|
canBlast = Permissions.remoteDetonation(player);
|
||||||
canDemoExpert = Permissions.demolitionsExpertise(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);
|
canSuperBreaker = Permissions.superBreaker(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel)));
|
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel)));
|
||||||
}
|
}
|
||||||
else {
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||||
@@ -65,7 +66,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
|
|
||||||
// SUPER REPAIR
|
// SUPER REPAIR
|
||||||
if (canSuperRepair) {
|
if (canSuperRepair) {
|
||||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, Repair.superRepairMaxBonusLevel, Repair.superRepairMaxChance, isLucky);
|
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SUPER_REPAIR, isLucky);
|
||||||
superRepairChance = superRepairStrings[0];
|
superRepairChance = superRepairStrings[0];
|
||||||
superRepairChanceLucky = superRepairStrings[1];
|
superRepairChanceLucky = superRepairStrings[1];
|
||||||
}
|
}
|
||||||
@@ -73,10 +74,10 @@ public class RepairCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canSuperRepair = Permissions.superRepair(player);
|
canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SUPER_REPAIR);
|
||||||
canMasterRepair = Permissions.repairMastery(player);
|
canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.REPAIR_MASTERY);
|
||||||
canArcaneForge = Permissions.arcaneForging(player);
|
canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_FORGING);
|
||||||
canSalvage = Permissions.salvage(player);
|
canSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SALVAGE);
|
||||||
canRepairDiamond = Permissions.repairDiamond(player);
|
canRepairDiamond = Permissions.repairDiamond(player);
|
||||||
canRepairGold = Permissions.repairGold(player);
|
canRepairGold = Permissions.repairGold(player);
|
||||||
canRepairIron = Permissions.repairIron(player);
|
canRepairIron = Permissions.repairIron(player);
|
||||||
@@ -147,7 +148,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
if (canArcaneForge) {
|
if (canArcaneForge) {
|
||||||
RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
|
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) {
|
if (ArcaneForging.arcaneForgingEnchantLoss) {
|
||||||
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));
|
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.text.DecimalFormat;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.util.Motd;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -13,6 +14,7 @@ import org.bukkit.entity.Player;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
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.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
@@ -86,8 +88,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||||
|
|
||||||
if (isLucky) {
|
if (isLucky) {
|
||||||
String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
|
player.sendMessage(Motd.PERK_PREFIX + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
||||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String message : effectMessages) {
|
for (String message : effectMessages) {
|
||||||
@@ -136,8 +137,10 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return displayValues;
|
return displayValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String[] calculateAbilityDisplayValues(float skillValue, int maxBonusLevel, double maxChance, boolean isLucky) {
|
protected String[] calculateAbilityDisplayValues(float skillValue, SecondaryAbility skillAbility, boolean isLucky) {
|
||||||
return calculateAbilityDisplayValues((maxChance / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), 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) {
|
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||||
@@ -38,7 +39,7 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
|
|
||||||
// SECOND SMELT
|
// SECOND SMELT
|
||||||
if (canSecondSmelt) {
|
if (canSecondSmelt) {
|
||||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, Smelting.secondSmeltMaxLevel, Smelting.secondSmeltMaxChance, isLucky);
|
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SECOND_SMELT, isLucky);
|
||||||
secondSmeltChance = secondSmeltStrings[0];
|
secondSmeltChance = secondSmeltStrings[0];
|
||||||
secondSmeltChanceLucky = secondSmeltStrings[1];
|
secondSmeltChanceLucky = secondSmeltStrings[1];
|
||||||
}
|
}
|
||||||
@@ -53,9 +54,9 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canFuelEfficiency = Permissions.fuelEfficiency(player);
|
canFuelEfficiency = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FUEL_EFFICIENCY);
|
||||||
canSecondSmelt = Permissions.doubleDrops(player, skill);
|
canSecondSmelt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SECOND_SMELT);
|
||||||
canFluxMine = Permissions.fluxMining(player);
|
canFluxMine = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FLUX_MINING);
|
||||||
canVanillaXPBoost = Permissions.vanillaXpBoost(player, skill);
|
canVanillaXPBoost = Permissions.vanillaXpBoost(player, skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,16 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
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.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.swords.Swords;
|
import com.gmail.nossr50.skills.swords.Swords;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class SwordsCommand extends SkillCommand {
|
public class SwordsCommand extends SkillCommand {
|
||||||
private String counterAttackChance;
|
private String counterChance;
|
||||||
private String counterAttackChanceLucky;
|
private String counterChanceLucky;
|
||||||
private int bleedLength;
|
private int bleedLength;
|
||||||
private String bleedChance;
|
private String bleedChance;
|
||||||
private String bleedChanceLucky;
|
private String bleedChanceLucky;
|
||||||
@@ -38,25 +40,25 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
|
|
||||||
// BLEED
|
// BLEED
|
||||||
if (canBleed) {
|
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];
|
bleedChance = bleedStrings[0];
|
||||||
bleedChanceLucky = bleedStrings[1];
|
bleedChanceLucky = bleedStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// COUNTER ATTACK
|
// COUNTER
|
||||||
if (canCounter) {
|
if (canCounter) {
|
||||||
String[] counterAttackStrings = calculateAbilityDisplayValues(skillValue, Swords.counterAttackMaxBonusLevel, Swords.counterAttackMaxChance, isLucky);
|
String[] counterStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.COUNTER, isLucky);
|
||||||
counterAttackChance = counterAttackStrings[0];
|
counterChance = counterStrings[0];
|
||||||
counterAttackChanceLucky = counterAttackStrings[1];
|
counterChanceLucky = counterStrings[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canBleed = Permissions.bleed(player);
|
canBleed = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BLEED);
|
||||||
canCounter = Permissions.counterAttack(player);
|
canCounter = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.COUNTER);
|
||||||
canSerratedStrike = Permissions.serratedStrikes(player);
|
canSerratedStrike = Permissions.serratedStrikes(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +87,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
List<String> messages = new ArrayList<String>();
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
if (canCounter) {
|
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) {
|
if (canBleed) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.taming.Taming;
|
import com.gmail.nossr50.skills.taming.Taming;
|
||||||
@@ -33,7 +34,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||||
if (canGore) {
|
if (canGore) {
|
||||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, Taming.goreMaxBonusLevel, Taming.goreMaxChance, isLucky);
|
String[] goreStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GORE, isLucky);
|
||||||
goreChance = goreStrings[0];
|
goreChance = goreStrings[0];
|
||||||
goreChanceLucky = goreStrings[1];
|
goreChanceLucky = goreStrings[1];
|
||||||
}
|
}
|
||||||
@@ -41,15 +42,15 @@ public class TamingCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
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);
|
canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT);
|
||||||
canEnvironmentallyAware = Permissions.environmentallyAware(player);
|
canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ENVIROMENTALLY_AWARE);
|
||||||
canFastFood = Permissions.fastFoodService(player);
|
canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FAST_FOOD);
|
||||||
canGore = Permissions.gore(player);
|
canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GORE);
|
||||||
canSharpenedClaws = Permissions.sharpenedClaws(player);
|
canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHARPENED_CLAWS);
|
||||||
canShockProof = Permissions.shockProof(player);
|
canShockProof = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHOCK_PROOF);
|
||||||
canThickFur = Permissions.thickFur(player);
|
canThickFur = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.THICK_FUR);
|
||||||
canHolyHound = Permissions.holyHound(player);
|
canHolyHound = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HOLY_HOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.unarmed.Unarmed;
|
import com.gmail.nossr50.skills.unarmed.Unarmed;
|
||||||
@@ -23,7 +24,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
private boolean canBerserk;
|
private boolean canBerserk;
|
||||||
private boolean canDisarm;
|
private boolean canDisarm;
|
||||||
private boolean canBonusDamage;
|
private boolean canIronArm;
|
||||||
private boolean canDeflect;
|
private boolean canDeflect;
|
||||||
private boolean canIronGrip;
|
private boolean canIronGrip;
|
||||||
|
|
||||||
@@ -42,26 +43,26 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
// DISARM
|
// DISARM
|
||||||
if (canDisarm) {
|
if (canDisarm) {
|
||||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, Unarmed.disarmMaxBonusLevel, Unarmed.disarmMaxChance, isLucky);
|
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DISARM, isLucky);
|
||||||
disarmChance = disarmStrings[0];
|
disarmChance = disarmStrings[0];
|
||||||
disarmChanceLucky = disarmStrings[1];
|
disarmChanceLucky = disarmStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEFLECT
|
// DEFLECT
|
||||||
if (canDeflect) {
|
if (canDeflect) {
|
||||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, Unarmed.deflectMaxBonusLevel, Unarmed.deflectMaxChance, isLucky);
|
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DEFLECT, isLucky);
|
||||||
deflectChance = deflectStrings[0];
|
deflectChance = deflectStrings[0];
|
||||||
deflectChanceLucky = deflectStrings[1];
|
deflectChanceLucky = deflectStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// IRON ARM
|
// IRON ARM
|
||||||
if (canBonusDamage) {
|
if (canIronArm) {
|
||||||
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IRON GRIP
|
// IRON GRIP
|
||||||
if (canIronGrip) {
|
if (canIronGrip) {
|
||||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, Unarmed.ironGripMaxBonusLevel, Unarmed.ironGripMaxChance, isLucky);
|
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.IRON_GRIP, isLucky);
|
||||||
ironGripChance = ironGripStrings[0];
|
ironGripChance = ironGripStrings[0];
|
||||||
ironGripChanceLucky = ironGripStrings[1];
|
ironGripChanceLucky = ironGripStrings[1];
|
||||||
}
|
}
|
||||||
@@ -70,10 +71,11 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canBerserk = Permissions.berserk(player);
|
canBerserk = Permissions.berserk(player);
|
||||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
canIronArm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_ARM);
|
||||||
canDeflect = Permissions.arrowDeflect(player);
|
canDeflect = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DEFLECT);
|
||||||
canDisarm = Permissions.disarm(player);
|
canDisarm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DISARM);
|
||||||
canIronGrip = Permissions.ironGrip(player);
|
canIronGrip = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_GRIP);
|
||||||
|
// TODO: Apparently we forgot about block cracker?
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -83,12 +85,13 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
if (canBerserk) {
|
if (canBerserk) {
|
||||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.0"), LocaleLoader.getString("Unarmed.Effect.1")));
|
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) {
|
if (canDisarm) {
|
||||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.2"), LocaleLoader.getString("Unarmed.Effect.3")));
|
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")));
|
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) {
|
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<String>();
|
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)));
|
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 org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class WoodcuttingCommand extends SkillCommand {
|
public class WoodcuttingCommand extends SkillCommand {
|
||||||
@@ -36,7 +36,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
|
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Woodcutting.doubleDropsMaxLevel, Woodcutting.doubleDropsMaxChance, isLucky);
|
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS, isLucky);
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
@@ -45,8 +45,8 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canTreeFell = Permissions.treeFeller(player);
|
canTreeFell = Permissions.treeFeller(player);
|
||||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||||
canLeafBlow = Permissions.leafBlower(player);
|
canLeafBlow = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.LEAF_BLOWER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
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.fishing.Fishing;
|
||||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
import com.gmail.nossr50.skills.mining.BlastMining;
|
||||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
public class AdvancedConfig extends AutoUpdateConfigLoader {
|
public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||||
private static AdvancedConfig instance;
|
private static AdvancedConfig instance;
|
||||||
@@ -40,11 +44,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ACROBATICS */
|
/* ACROBATICS */
|
||||||
if (getDodgeChanceMax() < 1) {
|
if (getMaxChance(SecondaryAbility.DODGE) < 1) {
|
||||||
reason.add("Skills.Acrobatics.Dodge.ChanceMax should be at least 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!");
|
reason.add("Skills.Acrobatics.Dodge.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,11 +56,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Acrobatics.Dodge.DamageModifier should be greater than 1!");
|
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!");
|
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!");
|
reason.add("Skills.Acrobatics.Roll.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,11 +68,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Acrobatics.Roll.DamageThreshold should be at least 0!");
|
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!");
|
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!");
|
reason.add("Skills.Acrobatics.GracefulRoll.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +80,38 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Acrobatics.GracefulRoll.DamageThreshold should be at least 0!");
|
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 */
|
/* ARCHERY */
|
||||||
if (getSkillShotIncreaseLevel() < 1) {
|
if (getSkillShotIncreaseLevel() < 1) {
|
||||||
reason.add("Skills.Archery.SkillShot.IncreaseLevel should be at least 1!");
|
reason.add("Skills.Archery.SkillShot.IncreaseLevel should be at least 1!");
|
||||||
@@ -89,11 +125,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Archery.SkillShot.MaxBonus should be at least 0!");
|
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!");
|
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!");
|
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,11 +137,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 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!");
|
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!");
|
reason.add("Skills.Acrobatics.Retrieve.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,28 +150,28 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* AXES */
|
/* AXES */
|
||||||
if (getBonusDamageAxesBonusMax() < 1) {
|
if (getAxeMasteryBonusMax() < 1) {
|
||||||
reason.add("Skills.Axes.DamageIncrease.MaxBonus should be at least 1!");
|
reason.add("Skills.Axes.AxeMastery.MaxBonus should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getBonusDamageAxesMaxBonusLevel() < 1) {
|
if (getAxeMasteryMaxBonusLevel() < 1) {
|
||||||
reason.add("Skills.Axes.DamageIncrease.MaxBonusLevel should be at least 1!");
|
reason.add("Skills.Axes.AxeMastery.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAxesCriticalChance() < 1) {
|
if (getMaxChance(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||||
reason.add("Skills.Axes.AxesCritical.ChanceMax should be at least 1!");
|
reason.add("Skills.Axes.CriticalHit.ChanceMax should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAxesCriticalMaxBonusLevel() < 1) {
|
if (getMaxBonusLevel(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||||
reason.add("Skills.Axes.AxesCritical.MaxBonusLevel should be at least 1!");
|
reason.add("Skills.Axes.CriticalHit.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAxesCriticalPVPModifier() < 1) {
|
if (getCriticalHitPVPModifier() < 1) {
|
||||||
reason.add("Skills.Axes.AxesCritical.PVP_Modifier should be at least 1!");
|
reason.add("Skills.Axes.CriticalHit.PVP_Modifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAxesCriticalPVEModifier() < 1) {
|
if (getCriticalHitPVEModifier() < 1) {
|
||||||
reason.add("Skills.Axes.AxesCritical.PVE_Modifier should be at least 1!");
|
reason.add("Skills.Axes.CriticalHit.PVE_Modifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getGreaterImpactChance() < 1) {
|
if (getGreaterImpactChance() < 1) {
|
||||||
@@ -185,8 +221,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
if (tier != Fishing.Tier.EIGHT) {
|
if (tier != Fishing.Tier.EIGHT) {
|
||||||
Fishing.Tier nextTier = fishingTierList.get(fishingTierList.indexOf(tier) - 1);
|
Fishing.Tier nextTier = fishingTierList.get(fishingTierList.indexOf(tier) - 1);
|
||||||
|
|
||||||
if (getFishingTierLevel(tier) >= getFishingTierLevel(nextTier)) {
|
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() + "!");
|
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)) {
|
if (getShakeChance(tier) > getShakeChance(nextTier)) {
|
||||||
@@ -203,12 +239,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
|
reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getIceFishingUnlockLevel() < 1) {
|
if (getIceFishingUnlockLevel() < 0) {
|
||||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 1!");
|
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getMasterAnglerUnlockLevel() < 1) {
|
if (getMasterAnglerUnlockLevel() < 0) {
|
||||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 1!");
|
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getMasterAnglerBoatModifier() < 1) {
|
if (getMasterAnglerBoatModifier() < 1) {
|
||||||
@@ -228,44 +264,44 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Herbalism.GreenThumb.StageChange should be at least 1!");
|
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!");
|
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!");
|
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!");
|
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!");
|
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!");
|
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!");
|
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!");
|
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!");
|
reason.add("Skills.Herbalism.ShroomThumb.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MINING */
|
/* MINING */
|
||||||
if (getMiningDoubleDropChance() < 1) {
|
if (getMaxChance(SecondaryAbility.MINING_DOUBLE_DROPS) < 1) {
|
||||||
reason.add("Skills.Mining.DoubleDrops.ChanceMax should be at least 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!");
|
reason.add("Skills.Mining.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,8 +335,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
if (tier != BlastMining.Tier.EIGHT) {
|
if (tier != BlastMining.Tier.EIGHT) {
|
||||||
BlastMining.Tier nextTier = blastMiningTierList.get(blastMiningTierList.indexOf(tier) - 1);
|
BlastMining.Tier nextTier = blastMiningTierList.get(blastMiningTierList.indexOf(tier) - 1);
|
||||||
|
|
||||||
if (getBlastMiningRankLevel(tier) >= getBlastMiningRankLevel(nextTier)) {
|
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() + "!");
|
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)) {
|
if (getBlastDamageDecrease(tier) > getBlastDamageDecrease(nextTier)) {
|
||||||
@@ -334,16 +370,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Repair.RepairMastery.MaxBonusLevel should be at least 1!");
|
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!");
|
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!");
|
reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSalvageUnlockLevel() < 1) {
|
if (getSalvageUnlockLevel() < 0) {
|
||||||
reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 1!");
|
reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
|
List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
|
||||||
@@ -364,8 +400,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
if (tier != ArcaneForging.Tier.EIGHT) {
|
if (tier != ArcaneForging.Tier.EIGHT) {
|
||||||
ArcaneForging.Tier nextTier = arcaneForgingTierList.get(arcaneForgingTierList.indexOf(tier) - 1);
|
ArcaneForging.Tier nextTier = arcaneForgingTierList.get(arcaneForgingTierList.indexOf(tier) - 1);
|
||||||
|
|
||||||
if (getArcaneForgingRankLevel(tier) >= getArcaneForgingRankLevel(nextTier)) {
|
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() + "!");
|
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)) {
|
if (getArcaneForgingDowngradeChance(nextTier) > getArcaneForgingDowngradeChance(tier)) {
|
||||||
@@ -387,16 +423,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Smelting.FuelEfficiency.Multiplier should be at least 1!");
|
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!");
|
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!");
|
reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getFluxMiningUnlockLevel() < 1) {
|
if (getFluxMiningUnlockLevel() < 0) {
|
||||||
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 1!");
|
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getFluxMiningChance() < 1) {
|
if (getFluxMiningChance() < 1) {
|
||||||
@@ -417,22 +453,22 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
if (tier != Smelting.Tier.EIGHT) {
|
if (tier != Smelting.Tier.EIGHT) {
|
||||||
Smelting.Tier nextTier = smeltingTierList.get(smeltingTierList.indexOf(tier) - 1);
|
Smelting.Tier nextTier = smeltingTierList.get(smeltingTierList.indexOf(tier) - 1);
|
||||||
|
|
||||||
if (getSmeltingRankLevel(tier) >= getSmeltingRankLevel(nextTier)) {
|
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() + "!");
|
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() + "!");
|
reason.add("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.VanillaXPMultiplier.Rank_" + nextTier.toNumerical() + "!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SWORDS */
|
/* SWORDS */
|
||||||
if (getBleedChanceMax() < 1) {
|
if (getMaxChance(SecondaryAbility.BLEED) < 1) {
|
||||||
reason.add("Skills.Swords.Bleed.ChanceMax should be at least 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!");
|
reason.add("Skills.Swords.Bleed.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,11 +484,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Swords.Bleed.BaseTicks should be at least 1!");
|
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!");
|
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!");
|
reason.add("Skills.Swords.Counter.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,11 +506,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* TAMING */
|
/* TAMING */
|
||||||
|
|
||||||
if (getGoreChanceMax() < 1) {
|
if (getMaxChance(SecondaryAbility.GORE) < 1) {
|
||||||
reason.add("Skills.Taming.Gore.ChanceMax should be at least 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!");
|
reason.add("Skills.Taming.Gore.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,40 +522,40 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
|
reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getFastFoodUnlock() < 1) {
|
if (getFastFoodUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getFastFoodChance() < 1) {
|
if (getFastFoodChance() < 1) {
|
||||||
reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
|
reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getEnviromentallyAwareUnlock() < 1) {
|
if (getEnviromentallyAwareUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getThickFurUnlock() < 1) {
|
if (getThickFurUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getThickFurModifier() < 1) {
|
if (getThickFurModifier() < 1) {
|
||||||
reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
|
reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getHolyHoundUnlock() < 1) {
|
if (getHolyHoundUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getShockProofUnlock() < 1) {
|
if (getShockProofUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getShockProofModifier() < 1) {
|
if (getShockProofModifier() < 1) {
|
||||||
reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
|
reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSharpenedClawsUnlock() < 1) {
|
if (getSharpenedClawsUnlock() < 0) {
|
||||||
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 1!");
|
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSharpenedClawsBonus() < 1) {
|
if (getSharpenedClawsBonus() < 1) {
|
||||||
@@ -531,27 +567,27 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* UNARMED */
|
/* UNARMED */
|
||||||
if (getDisarmChanceMax() < 1) {
|
if (getMaxChance(SecondaryAbility.DISARM) < 1) {
|
||||||
reason.add("Skills.Unarmed.Disarm.ChanceMax should be at least 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!");
|
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!");
|
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!");
|
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!");
|
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!");
|
reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,15 +608,15 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WOODCUTTING */
|
/* WOODCUTTING */
|
||||||
if (getLeafBlowUnlockLevel() < 1) {
|
if (getLeafBlowUnlockLevel() < 0) {
|
||||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 1!");
|
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!");
|
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!");
|
reason.add("Skills.Woodcutting.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,42 +647,41 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
||||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
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 */
|
/* 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 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 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); }
|
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 */
|
/* ARCHERY */
|
||||||
public int getSkillShotIncreaseLevel() { return config.getInt("Skills.Archery.SkillShot.IncreaseLevel", 50); }
|
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 getSkillShotIncreasePercentage() { return config.getDouble("Skills.Archery.SkillShot.IncreasePercentage", 0.1D); }
|
||||||
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
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 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 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 getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
||||||
|
|
||||||
/* AXES */
|
/* AXES */
|
||||||
public double getBonusDamageAxesBonusMax() { return config.getDouble("Skills.Axes.DamageIncrease.MaxBonus", 4.0D); }
|
public double getAxeMasteryBonusMax() { return config.getDouble("Skills.Axes.AxeMastery.MaxBonus", 4.0D); }
|
||||||
public int getBonusDamageAxesMaxBonusLevel() { return config.getInt("Skills.Axes.DamageIncrease.MaxBonusLevel", 200); }
|
public int getAxeMasteryMaxBonusLevel() { return config.getInt("Skills.Axes.AxeMastery.MaxBonusLevel", 200); }
|
||||||
|
|
||||||
public double getAxesCriticalChance() { return config.getDouble("Skills.Axes.AxesCritical.ChanceMax", 37.50D); }
|
public double getCriticalHitPVPModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVP_Modifier", 1.5D); }
|
||||||
public int getAxesCriticalMaxBonusLevel() { return config.getInt("Skills.Axes.AxesCritical.MaxBonusLevel", 750); }
|
public double getCriticalHitPVEModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVE_Modifier", 2.0D); }
|
||||||
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 getGreaterImpactChance() { return config.getDouble("Skills.Axes.GreaterImpact.Chance", 25.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); }
|
public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); }
|
||||||
@@ -678,22 +713,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
||||||
|
|
||||||
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 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 */
|
/* 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 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 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()); }
|
public double getOreBonus(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + tier.toNumerical()); }
|
||||||
@@ -704,8 +725,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
/* REPAIR */
|
/* REPAIR */
|
||||||
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
|
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
|
||||||
public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 1000); }
|
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); }
|
public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage.UnlockLevel", 600); }
|
||||||
|
|
||||||
/* Arcane Forging */
|
/* Arcane Forging */
|
||||||
@@ -721,9 +740,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency.MaxBonusLevel", 1000); }
|
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency.MaxBonusLevel", 1000); }
|
||||||
public double getBurnTimeMultiplier() { return config.getDouble("Skills.Smelting.FuelEfficiency.Multiplier", 3.0D); }
|
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 int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining.UnlockLevel", 250); }
|
||||||
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
|
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
|
||||||
|
|
||||||
@@ -732,22 +748,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||||
|
|
||||||
/* SWORDS */
|
/* 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 getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||||
|
|
||||||
public boolean getCounterRequiresBlock() { return config.getBoolean("Skills.Swords.Counter.RequiresBlock"); }
|
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 getCounterModifier() { return config.getDouble("Skills.Swords.Counter.DamageModifier", 2.0D); }
|
||||||
|
|
||||||
public double getSerratedStrikesModifier() { return config.getDouble("Skills.Swords.SerratedStrikes.DamageModifier", 4.0D); }
|
public double getSerratedStrikesModifier() { return config.getDouble("Skills.Swords.SerratedStrikes.DamageModifier", 4.0D); }
|
||||||
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.BleedTicks", 5); }
|
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.BleedTicks", 5); }
|
||||||
|
|
||||||
/* TAMING */
|
/* 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 int getGoreBleedTicks() { return config.getInt("Skills.Taming.Gore.BleedTicks", 2); }
|
||||||
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
|
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
|
||||||
|
|
||||||
@@ -770,25 +780,14 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
||||||
|
|
||||||
/* UNARMED */
|
/* 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 getIronArmMinBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMin", 3.0D); }
|
||||||
public double getIronArmMaxBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMax", 8.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 int getIronArmIncreaseLevel() { return config.getInt("Skills.Unarmed.IronArm.IncreaseLevel", 50); }
|
||||||
|
public boolean getDisarmProtected() { return config.getBoolean("Skills.Unarmed.Disarm.AntiTheft", false); }
|
||||||
|
|
||||||
/* WOODCUTTING */
|
/* WOODCUTTING */
|
||||||
public int getLeafBlowUnlockLevel() { return config.getInt("Skills.Woodcutting.LeafBlower.UnlockLevel", 100); }
|
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 */
|
/* KRAKEN STUFF */
|
||||||
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
||||||
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.bukkit.configuration.ConfigurationSection;
|
|||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
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.AbilityType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
@@ -109,7 +110,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getChimaeraRecipeCost() < 1 || getChimaeraRecipeCost() > 9) {
|
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) {
|
if (getChimaeraItem() == null) {
|
||||||
@@ -146,6 +147,16 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Party.Sharing.Range should be greater than 0!");
|
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 */
|
/* Inspect command distance */
|
||||||
if (getInspectDistance() <= 0) {
|
if (getInspectDistance() <= 0) {
|
||||||
reason.add("Commands.inspect.Max_Distance should be greater than 0!");
|
reason.add("Commands.inspect.Max_Distance should be greater than 0!");
|
||||||
@@ -212,6 +223,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
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 getPartyChatColorLeaderName() { return config.getBoolean("Commands.partychat.Gold_Leader_Name", true); }
|
||||||
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.partychat.Use_Display_Names", 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 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 getAdminDisplayNames() { return config.getBoolean("Commands.adminchat.Use_Display_Names", true); }
|
||||||
@@ -302,12 +314,16 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss.Penalty_Percentage", 75.0D); }
|
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 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 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 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 double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism.Leech_Percentage", 5.0D); }
|
||||||
public void setHardcoreVampirismStatLeechPercentage(double value) { config.set("Hardcore.Vampirism.Leech_Percentage", value); }
|
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 */
|
/* SMP Mods */
|
||||||
public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
||||||
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Armor_Mods_Enabled", false); }
|
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Armor_Mods_Enabled", false); }
|
||||||
@@ -338,19 +354,29 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* PARTY SETTINGS */
|
/* PARTY SETTINGS */
|
||||||
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
||||||
public int getAutoPartyKickTime() { return config.getInt("Party.Old_Party_Member_Cutoff", 7); }
|
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 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 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 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 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 */
|
/* Party Teleport Settings */
|
||||||
public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 120); }
|
public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 120); }
|
||||||
public int getPTPCommandWarmup() { return config.getInt("Commands.ptp.Warmup", 5); }
|
public int getPTPCommandWarmup() { return config.getInt("Commands.ptp.Warmup", 5); }
|
||||||
public int getPTPCommandRecentlyHurtCooldown() { return config.getInt("Commands.ptp.RecentlyHurt_Cooldown", 60); }
|
public int getPTPCommandRecentlyHurtCooldown() { return config.getInt("Commands.ptp.RecentlyHurt_Cooldown", 60); }
|
||||||
public int getPTPCommandTimeout() { return config.getInt("Commands.ptp.Request_Timeout", 300); }
|
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); }
|
public boolean getPTPCommandWorldPermissions() { return config.getBoolean("Commands.ptp.World_Based_Permissions", false); }
|
||||||
|
|
||||||
/* Inspect command distance */
|
/* Inspect command distance */
|
||||||
@@ -399,6 +425,10 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
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 boolean getPreventXPAfterTeleport() { return config.getBoolean("Skills.Acrobatics.Prevent_XP_After_Teleport", true); }
|
||||||
|
|
||||||
|
/* Alchemy */
|
||||||
|
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
||||||
|
public boolean getPreventHopperTransfer() { return config.getBoolean("Skills.Alchemy.Prevent_Hopper_Transfer", false); }
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
* XP SETTINGS
|
* XP SETTINGS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Alchemy */
|
||||||
|
if (getPotionXP() <= 0) {
|
||||||
|
reason.add("Experience.Alchemy.Potion should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
/* Combat XP Multipliers */
|
/* Combat XP Multipliers */
|
||||||
if (getAnimalsXP() < 0) {
|
if (getAnimalsXP() < 0) {
|
||||||
reason.add("Experience.Combat.Multiplier.Animals should be at least 0!");
|
reason.add("Experience.Combat.Multiplier.Animals should be at least 0!");
|
||||||
@@ -174,6 +179,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
/* Skill modifiers */
|
/* Skill modifiers */
|
||||||
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
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 */
|
/* Conversion */
|
||||||
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
||||||
|
|
||||||
@@ -199,6 +207,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
||||||
|
|
||||||
|
/* Alchemy */
|
||||||
|
public double getPotionXP() { return config.getDouble("Experience.Alchemy.Potion", 150D); }
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
||||||
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
||||||
|
|||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,42 +16,22 @@ import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
|||||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||||
|
|
||||||
public class CustomArmorConfig extends ConfigLoader {
|
public class CustomArmorConfig extends ConfigLoader {
|
||||||
private static CustomArmorConfig instance;
|
|
||||||
|
|
||||||
private boolean needsUpdate = false;
|
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>();
|
public List<Repairable> repairables = new ArrayList<Repairable>();
|
||||||
private List<Material> customChestplates = new ArrayList<Material>();
|
|
||||||
private List<Material> customHelmets = new ArrayList<Material>();
|
|
||||||
private List<Material> customLeggings = new ArrayList<Material>();
|
|
||||||
|
|
||||||
public CustomArmorConfig() {
|
protected CustomArmorConfig(String fileName) {
|
||||||
super("mods", "armor.yml");
|
super("mods", fileName);
|
||||||
loadKeys();
|
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
|
@Override
|
||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
repairables = new ArrayList<Repairable>();
|
|
||||||
|
|
||||||
loadArmor("Boots", customBoots);
|
loadArmor("Boots", customBoots);
|
||||||
loadArmor("Chestplates", customChestplates);
|
loadArmor("Chestplates", customChestplates);
|
||||||
loadArmor("Helmets", customHelmets);
|
loadArmor("Helmets", customHelmets);
|
||||||
@@ -117,20 +97,4 @@ public class CustomArmorConfig extends ConfigLoader {
|
|||||||
materialList.add(armorMaterial);
|
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;
|
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||||
|
|
||||||
public class CustomBlockConfig extends ConfigLoader {
|
public class CustomBlockConfig extends ConfigLoader {
|
||||||
private static CustomBlockConfig instance;
|
|
||||||
|
|
||||||
private boolean needsUpdate = false;
|
private boolean needsUpdate = false;
|
||||||
|
|
||||||
private List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
public List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
public List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
public List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customWoodcuttingBlocks = new ArrayList<MaterialData>();
|
public List<MaterialData> customOres = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customOres = new ArrayList<MaterialData>();
|
public List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
public List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
||||||
private List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
public List<MaterialData> customAbilityBlocks = new ArrayList<MaterialData>();
|
||||||
private 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() {
|
protected CustomBlockConfig(String fileName) {
|
||||||
super("mods", "blocks.yml");
|
super("mods", fileName);
|
||||||
loadKeys();
|
loadKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CustomBlockConfig getInstance() {
|
|
||||||
if (instance == null) {
|
|
||||||
instance = new CustomBlockConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
loadBlocks("Excavation", customExcavationBlocks);
|
loadBlocks("Excavation", customExcavationBlocks);
|
||||||
loadBlocks("Herbalism", customHerbalismBlocks);
|
loadBlocks("Herbalism", customHerbalismBlocks);
|
||||||
loadBlocks("Mining", customMiningBlocks);
|
loadBlocks("Mining", customMiningBlocks);
|
||||||
loadBlocks("Woodcutting", customWoodcuttingBlocks);
|
loadBlocks("Woodcutting", null);
|
||||||
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
||||||
|
|
||||||
if (needsUpdate) {
|
if (needsUpdate) {
|
||||||
@@ -83,9 +72,12 @@ public class CustomBlockConfig extends ConfigLoader {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte blockData = Byte.valueOf(blockInfo[1]);
|
byte blockData = (blockInfo.length == 2) ? Byte.valueOf(blockInfo[1]) : 0;
|
||||||
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||||
blockList.add(blockMaterialData);
|
|
||||||
|
if (blockList != null) {
|
||||||
|
blockList.add(blockMaterialData);
|
||||||
|
}
|
||||||
|
|
||||||
if (skillType.equals("Ability_Blocks")) {
|
if (skillType.equals("Ability_Blocks")) {
|
||||||
continue;
|
continue;
|
||||||
@@ -111,40 +103,4 @@ public class CustomBlockConfig extends ConfigLoader {
|
|||||||
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CustomBlock getCustomBlock(MaterialData data) {
|
|
||||||
return customBlockMap.get(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCustomOre(MaterialData data) {
|
|
||||||
return customOres.contains(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCustomLog(MaterialData data) {
|
|
||||||
return customLogs.contains(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCustomLeaf(MaterialData data) {
|
|
||||||
return customLeaves.contains(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.gmail.nossr50.config.mods;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.ConfigLoader;
|
import com.gmail.nossr50.config.ConfigLoader;
|
||||||
@@ -12,24 +11,14 @@ import com.gmail.nossr50.datatypes.mods.CustomEntity;
|
|||||||
import org.apache.commons.lang.ClassUtils;
|
import org.apache.commons.lang.ClassUtils;
|
||||||
|
|
||||||
public class CustomEntityConfig extends ConfigLoader {
|
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>();
|
protected CustomEntityConfig(String fileName) {
|
||||||
private HashMap<String, CustomEntity> customEntityTypeMap = new HashMap<String, CustomEntity>();
|
super("mods", fileName);
|
||||||
|
|
||||||
public CustomEntityConfig() {
|
|
||||||
super("mods", "entities.yml");
|
|
||||||
loadKeys();
|
loadKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CustomEntityConfig getInstance() {
|
|
||||||
if (instance == null) {
|
|
||||||
instance = new CustomEntityConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
if (config.getConfigurationSection("Hostile") != null) {
|
if (config.getConfigurationSection("Hostile") != null) {
|
||||||
@@ -71,47 +60,4 @@ public class CustomEntityConfig extends ConfigLoader {
|
|||||||
customEntityClassMap.put(clazz == null ? null : clazz.getName(), entity);
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,46 +18,26 @@ import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
|||||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||||
|
|
||||||
public class CustomToolConfig extends ConfigLoader {
|
public class CustomToolConfig extends ConfigLoader {
|
||||||
private static CustomToolConfig instance;
|
|
||||||
|
|
||||||
private boolean needsUpdate = false;
|
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>();
|
public HashMap<Material, CustomTool> customToolMap = new HashMap<Material, CustomTool>();
|
||||||
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>();
|
|
||||||
|
|
||||||
private HashMap<Material, CustomTool> customToolMap = new HashMap<Material, CustomTool>();
|
public List<Repairable> repairables = new ArrayList<Repairable>();
|
||||||
|
|
||||||
private CustomToolConfig() {
|
protected CustomToolConfig(String fileName) {
|
||||||
super("mods", "tools.yml");
|
super("mods", fileName);
|
||||||
loadKeys();
|
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
|
@Override
|
||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
repairables = new ArrayList<Repairable>();
|
|
||||||
|
|
||||||
loadTool("Axes", customAxes);
|
loadTool("Axes", customAxes);
|
||||||
loadTool("Bows", customBows);
|
loadTool("Bows", customBows);
|
||||||
loadTool("Hoes", customHoes);
|
loadTool("Hoes", customHoes);
|
||||||
@@ -132,36 +112,4 @@ public class CustomToolConfig extends ConfigLoader {
|
|||||||
customToolMap.put(toolMaterial, tool);
|
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,223 @@
|
|||||||
|
package com.gmail.nossr50.config.skills.alchemy;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.skills.alchemy.Alchemy;
|
||||||
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -96,6 +96,10 @@ public class RepairConfig extends ConfigLoader {
|
|||||||
// Maximum Durability
|
// Maximum Durability
|
||||||
short maximumDurability = (itemMaterial != null ? itemMaterial.getMaxDurability() : (short) config.getInt("Repairables." + key + ".MaximumDurability"));
|
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) {
|
if (maximumDurability <= 0) {
|
||||||
reason.add("Maximum durability of " + key + " must be greater than 0!");
|
reason.add("Maximum durability of " + key + " must be greater than 0!");
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gmail.nossr50.skills.repair.config;
|
package com.gmail.nossr50.config.skills.repair;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -9,11 +9,9 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||||
|
|
||||||
public class RepairConfigManager {
|
public class RepairConfigManager {
|
||||||
private List<Repairable> repairables;
|
private final List<Repairable> repairables = new ArrayList<Repairable>();
|
||||||
|
|
||||||
public RepairConfigManager(mcMMO plugin) {
|
public RepairConfigManager(mcMMO plugin) {
|
||||||
repairables = new ArrayList<Repairable>();
|
|
||||||
|
|
||||||
Pattern pattern = Pattern.compile("repair\\.(?:.+)\\.yml");
|
Pattern pattern = Pattern.compile("repair\\.(?:.+)\\.yml");
|
||||||
File dataFolder = plugin.getDataFolder();
|
File dataFolder = plugin.getDataFolder();
|
||||||
File vanilla = new File(dataFolder, "repair.vanilla.yml");
|
File vanilla = new File(dataFolder, "repair.vanilla.yml");
|
||||||
@@ -34,19 +32,11 @@ public class RepairConfigManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RepairConfig rConfig = new RepairConfig(fileName);
|
RepairConfig rConfig = new RepairConfig(fileName);
|
||||||
List<Repairable> rConfigRepairables = rConfig.getLoadedRepairables();
|
repairables.addAll(rConfig.getLoadedRepairables());
|
||||||
|
|
||||||
if (rConfigRepairables != null) {
|
|
||||||
repairables.addAll(rConfigRepairables);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Repairable> getLoadedRepairables() {
|
public List<Repairable> getLoadedRepairables() {
|
||||||
if (repairables == null) {
|
|
||||||
return new ArrayList<Repairable>();
|
|
||||||
}
|
|
||||||
|
|
||||||
return repairables;
|
return repairables;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,6 +61,9 @@ public class DatabaseManagerFactory {
|
|||||||
case FLATFILE:
|
case FLATFILE:
|
||||||
return new FlatfileDatabaseManager();
|
return new FlatfileDatabaseManager();
|
||||||
|
|
||||||
|
case SERIALIZED:
|
||||||
|
return new SerializedDatabaseManager();
|
||||||
|
|
||||||
case SQL:
|
case SQL:
|
||||||
return new SQLDatabaseManager();
|
return new SQLDatabaseManager();
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -26,6 +28,7 @@ import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
|||||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
public final class FlatfileDatabaseManager implements DatabaseManager {
|
public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||||
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
||||||
@@ -56,7 +59,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
StringBuilder writer = new StringBuilder();
|
StringBuilder writer = new StringBuilder();
|
||||||
String line = "";
|
String line;
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
@@ -111,7 +114,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
StringBuilder writer = new StringBuilder();
|
StringBuilder writer = new StringBuilder();
|
||||||
String line = "";
|
String line;
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
@@ -173,7 +176,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
StringBuilder writer = new StringBuilder();
|
StringBuilder writer = new StringBuilder();
|
||||||
String line = "";
|
String line;
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
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.
|
// Write out the same file but when we get to the player we want to remove, we skip his line.
|
||||||
@@ -265,6 +268,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
writer.append(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR).append(":");
|
writer.append(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR).append(":");
|
||||||
MobHealthbarType mobHealthbarType = profile.getMobHealthbarType();
|
MobHealthbarType mobHealthbarType = profile.getMobHealthbarType();
|
||||||
writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":");
|
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");
|
writer.append("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,7 +359,9 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
out.append("0:"); // Blast Mining
|
out.append("0:"); // Blast Mining
|
||||||
out.append(String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)).append(":"); // LastLogin
|
out.append(String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)).append(":"); // LastLogin
|
||||||
out.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":"); // Mob Healthbar HUD
|
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
|
// Add more in the same format as the line above
|
||||||
|
|
||||||
out.newLine();
|
out.newLine();
|
||||||
@@ -386,8 +393,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProfile p = loadFromLine(character);
|
return loadFromLine(character);
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Didn't find the player, create a new one
|
// Didn't find the player, create a new one
|
||||||
@@ -503,6 +509,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
List<PlayerStat> unarmed = new ArrayList<PlayerStat>();
|
List<PlayerStat> unarmed = new ArrayList<PlayerStat>();
|
||||||
List<PlayerStat> taming = new ArrayList<PlayerStat>();
|
List<PlayerStat> taming = new ArrayList<PlayerStat>();
|
||||||
List<PlayerStat> fishing = new ArrayList<PlayerStat>();
|
List<PlayerStat> fishing = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> alchemy = new ArrayList<PlayerStat>();
|
||||||
|
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
String playerName = null;
|
String playerName = null;
|
||||||
@@ -510,7 +517,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
synchronized (fileWritingLock) {
|
synchronized (fileWritingLock) {
|
||||||
try {
|
try {
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
String line = "";
|
String line;
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] data = line.split(":");
|
String[] data = line.split(":");
|
||||||
@@ -520,6 +527,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
Map<SkillType, Integer> skills = getSkillMapFromLine(data);
|
Map<SkillType, Integer> skills = getSkillMapFromLine(data);
|
||||||
|
|
||||||
powerLevel += putStat(acrobatics, playerName, skills.get(SkillType.ACROBATICS));
|
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(archery, playerName, skills.get(SkillType.ARCHERY));
|
||||||
powerLevel += putStat(axes, playerName, skills.get(SkillType.AXES));
|
powerLevel += putStat(axes, playerName, skills.get(SkillType.AXES));
|
||||||
powerLevel += putStat(excavation, playerName, skills.get(SkillType.EXCAVATION));
|
powerLevel += putStat(excavation, playerName, skills.get(SkillType.EXCAVATION));
|
||||||
@@ -557,6 +565,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
Collections.sort(acrobatics, c);
|
Collections.sort(acrobatics, c);
|
||||||
Collections.sort(taming, c);
|
Collections.sort(taming, c);
|
||||||
Collections.sort(fishing, c);
|
Collections.sort(fishing, c);
|
||||||
|
Collections.sort(alchemy, c);
|
||||||
Collections.sort(powerLevels, c);
|
Collections.sort(powerLevels, c);
|
||||||
|
|
||||||
playerStatHash.put(SkillType.MINING, mining);
|
playerStatHash.put(SkillType.MINING, mining);
|
||||||
@@ -571,6 +580,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
playerStatHash.put(SkillType.ACROBATICS, acrobatics);
|
playerStatHash.put(SkillType.ACROBATICS, acrobatics);
|
||||||
playerStatHash.put(SkillType.TAMING, taming);
|
playerStatHash.put(SkillType.TAMING, taming);
|
||||||
playerStatHash.put(SkillType.FISHING, fishing);
|
playerStatHash.put(SkillType.FISHING, fishing);
|
||||||
|
playerStatHash.put(SkillType.ALCHEMY, alchemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -586,7 +596,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
StringBuilder writer = new StringBuilder();
|
StringBuilder writer = new StringBuilder();
|
||||||
String line = "";
|
String line;
|
||||||
HashSet<String> players = new HashSet<String>();
|
HashSet<String> players = new HashSet<String>();
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
@@ -597,7 +607,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
// Length checks depend on last character being ':'
|
// Length checks depend on last character being ':'
|
||||||
if (line.charAt(line.length() - 1) != ':') {
|
if (line.charAt(line.length() - 1) != ':') {
|
||||||
line = line + ":";
|
line = line.concat(":");
|
||||||
}
|
}
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
|
|
||||||
@@ -614,29 +624,33 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
String oldVersion = null;
|
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()) {
|
if (!character[33].isEmpty()) {
|
||||||
// Removal of Spout Support
|
// Removal of Spout Support
|
||||||
// Version 1.4.07-dev2
|
// Version 1.4.07-dev2
|
||||||
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
||||||
line = line.replace(character[33], "");
|
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 they're valid, rewrite them to the file.
|
||||||
if (character.length > 38) {
|
if (character.length == 41) {
|
||||||
writer.append(line).append("\r\n");
|
writer.append(line).append("\r\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder newLine = new StringBuilder(line);
|
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) {
|
if (character.length <= 35) {
|
||||||
// Introduction of Fishing
|
// Introduction of Fishing
|
||||||
// Version 1.2.00
|
// Version 1.2.00
|
||||||
@@ -675,6 +689,55 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
oldVersion = "1.4.06";
|
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]);
|
||||||
|
newLine = new StringBuilder(org.apache.commons.lang.StringUtils.join(newCharacter, ":"));
|
||||||
|
}
|
||||||
|
|
||||||
if (oldVersion != null) {
|
if (oldVersion != null) {
|
||||||
mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion);
|
mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion);
|
||||||
@@ -771,6 +834,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
skillsXp.put(SkillType.AXES, (float) Integer.valueOf(character[21]));
|
skillsXp.put(SkillType.AXES, (float) Integer.valueOf(character[21]));
|
||||||
skillsXp.put(SkillType.ACROBATICS, (float) Integer.valueOf(character[22]));
|
skillsXp.put(SkillType.ACROBATICS, (float) Integer.valueOf(character[22]));
|
||||||
skillsXp.put(SkillType.FISHING, (float) Integer.valueOf(character[35]));
|
skillsXp.put(SkillType.FISHING, (float) Integer.valueOf(character[35]));
|
||||||
|
skillsXp.put(SkillType.ALCHEMY, (float) Integer.valueOf(character[40]));
|
||||||
|
|
||||||
// Taming - Unused
|
// Taming - Unused
|
||||||
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[32]));
|
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[32]));
|
||||||
@@ -810,6 +874,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
skills.put(SkillType.AXES, Integer.valueOf(character[13]));
|
skills.put(SkillType.AXES, Integer.valueOf(character[13]));
|
||||||
skills.put(SkillType.ACROBATICS, Integer.valueOf(character[14]));
|
skills.put(SkillType.ACROBATICS, Integer.valueOf(character[14]));
|
||||||
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
||||||
|
skills.put(SkillType.ALCHEMY, Integer.valueOf(character[39]));
|
||||||
|
|
||||||
return skills;
|
return skills;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||||
+ ", fishing = ? WHERE user_id = ?",
|
+ ", fishing = ?, alchemy = ? WHERE user_id = ?",
|
||||||
profile.getSkillLevel(SkillType.TAMING),
|
profile.getSkillLevel(SkillType.TAMING),
|
||||||
profile.getSkillLevel(SkillType.MINING),
|
profile.getSkillLevel(SkillType.MINING),
|
||||||
profile.getSkillLevel(SkillType.REPAIR),
|
profile.getSkillLevel(SkillType.REPAIR),
|
||||||
@@ -165,13 +165,14 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
profile.getSkillLevel(SkillType.AXES),
|
profile.getSkillLevel(SkillType.AXES),
|
||||||
profile.getSkillLevel(SkillType.ACROBATICS),
|
profile.getSkillLevel(SkillType.ACROBATICS),
|
||||||
profile.getSkillLevel(SkillType.FISHING),
|
profile.getSkillLevel(SkillType.FISHING),
|
||||||
|
profile.getSkillLevel(SkillType.ALCHEMY),
|
||||||
userId);
|
userId);
|
||||||
success &= saveIntegers(
|
success &= saveIntegers(
|
||||||
"UPDATE " + tablePrefix + "experience SET "
|
"UPDATE " + tablePrefix + "experience SET "
|
||||||
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
+ " taming = ?, mining = ?, repair = ?, woodcutting = ?"
|
||||||
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
+ ", unarmed = ?, herbalism = ?, excavation = ?"
|
||||||
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
+ ", archery = ?, swords = ?, axes = ?, acrobatics = ?"
|
||||||
+ ", fishing = ? WHERE user_id = ?",
|
+ ", fishing = ?, alchemy = ? WHERE user_id = ?",
|
||||||
profile.getSkillXpLevel(SkillType.TAMING),
|
profile.getSkillXpLevel(SkillType.TAMING),
|
||||||
profile.getSkillXpLevel(SkillType.MINING),
|
profile.getSkillXpLevel(SkillType.MINING),
|
||||||
profile.getSkillXpLevel(SkillType.REPAIR),
|
profile.getSkillXpLevel(SkillType.REPAIR),
|
||||||
@@ -184,6 +185,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
profile.getSkillXpLevel(SkillType.AXES),
|
profile.getSkillXpLevel(SkillType.AXES),
|
||||||
profile.getSkillXpLevel(SkillType.ACROBATICS),
|
profile.getSkillXpLevel(SkillType.ACROBATICS),
|
||||||
profile.getSkillXpLevel(SkillType.FISHING),
|
profile.getSkillXpLevel(SkillType.FISHING),
|
||||||
|
profile.getSkillXpLevel(SkillType.ALCHEMY),
|
||||||
userId);
|
userId);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
@@ -192,8 +194,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
List<PlayerStat> stats = new ArrayList<PlayerStat>();
|
List<PlayerStat> stats = new ArrayList<PlayerStat>();
|
||||||
|
|
||||||
if (checkConnected()) {
|
if (checkConnected()) {
|
||||||
String query = skill == null ? "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing" : skill.name().toLowerCase();
|
String query = skill == null ? "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing+alchemy" : skill.name().toLowerCase();
|
||||||
ResultSet resultSet = null;
|
ResultSet resultSet;
|
||||||
PreparedStatement statement = null;
|
PreparedStatement statement = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -271,9 +273,9 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String sql = "SELECT COUNT(*) AS rank FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
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 " +
|
"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 > " +
|
"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 " +
|
"(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 = ?)";
|
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE user = ?)";
|
||||||
|
|
||||||
PreparedStatement statement = connection.prepareStatement(sql);
|
PreparedStatement statement = connection.prepareStatement(sql);
|
||||||
@@ -286,11 +288,11 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
statement.close();
|
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 " +
|
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||||
"WHERE taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing > 0 " +
|
"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 = " +
|
"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 " +
|
"(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";
|
"FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE user = ?) ORDER BY user";
|
||||||
|
|
||||||
statement = connection.prepareStatement(sql);
|
statement = connection.prepareStatement(sql);
|
||||||
@@ -359,8 +361,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
statement = connection.prepareStatement(
|
statement = connection.prepareStatement(
|
||||||
"SELECT "
|
"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, "
|
+ "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.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, "
|
+ "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 "
|
+ "h.mobhealthbar "
|
||||||
+ "FROM " + tablePrefix + "users u "
|
+ "FROM " + tablePrefix + "users u "
|
||||||
@@ -435,8 +437,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
try {
|
try {
|
||||||
statement = connection.prepareStatement(
|
statement = connection.prepareStatement(
|
||||||
"SELECT "
|
"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, "
|
+ "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.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, "
|
+ "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 "
|
+ "h.mobhealthbar "
|
||||||
+ "FROM " + tablePrefix + "users u "
|
+ "FROM " + tablePrefix + "users u "
|
||||||
@@ -446,16 +448,16 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
+ "JOIN " + tablePrefix + "huds h ON (u.id = h.user_id) "
|
||||||
+ "WHERE u.user = ?");
|
+ "WHERE u.user = ?");
|
||||||
List<String> usernames = getStoredUsers();
|
List<String> usernames = getStoredUsers();
|
||||||
ResultSet result = null;
|
ResultSet resultSet;
|
||||||
int convertedUsers = 0;
|
int convertedUsers = 0;
|
||||||
long startMillis = System.currentTimeMillis();
|
long startMillis = System.currentTimeMillis();
|
||||||
for (String playerName : usernames) {
|
for (String playerName : usernames) {
|
||||||
statement.setString(1, playerName);
|
statement.setString(1, playerName);
|
||||||
try {
|
try {
|
||||||
result = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
result.next();
|
resultSet.next();
|
||||||
destination.saveUser(loadFromResult(playerName, result));
|
destination.saveUser(loadFromResult(playerName, resultSet));
|
||||||
result.close();
|
resultSet.close();
|
||||||
}
|
}
|
||||||
catch (SQLException e) {
|
catch (SQLException e) {
|
||||||
// Ignore
|
// Ignore
|
||||||
@@ -687,6 +689,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`fishing` 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`)) "
|
+ "PRIMARY KEY (`user_id`)) "
|
||||||
+ "DEFAULT CHARSET=latin1;");
|
+ "DEFAULT CHARSET=latin1;");
|
||||||
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "experience` ("
|
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "experience` ("
|
||||||
@@ -703,6 +706,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`fishing` 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`)) "
|
+ "PRIMARY KEY (`user_id`)) "
|
||||||
+ "DEFAULT CHARSET=latin1;");
|
+ "DEFAULT CHARSET=latin1;");
|
||||||
|
|
||||||
@@ -728,6 +732,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`fishing` ASC LIMIT 0 , 30";
|
sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`fishing` ASC LIMIT 0 , 30";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ALCHEMY:
|
||||||
|
sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`alchemy` ASC LIMIT 0 , 30";
|
||||||
|
break;
|
||||||
|
|
||||||
case INDEX:
|
case INDEX:
|
||||||
if (read("SHOW INDEX FROM " + tablePrefix + "skills").size() != 13 && checkConnected()) {
|
if (read("SHOW INDEX FROM " + tablePrefix + "skills").size() != 13 && checkConnected()) {
|
||||||
mcMMO.p.getLogger().info("Indexing tables, this may take a while on larger databases");
|
mcMMO.p.getLogger().info("Indexing tables, this may take a while on larger databases");
|
||||||
@@ -790,7 +798,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultSet resultSet = null;
|
ResultSet resultSet;
|
||||||
HashMap<Integer, ArrayList<String>> rows = new HashMap<Integer, ArrayList<String>>();
|
HashMap<Integer, ArrayList<String>> rows = new HashMap<Integer, ArrayList<String>>();
|
||||||
PreparedStatement statement = null;
|
PreparedStatement statement = null;
|
||||||
|
|
||||||
@@ -830,6 +838,12 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
write("ALTER TABLE `" + tablePrefix + "huds` ADD `mobhealthbar` varchar(50) NOT NULL DEFAULT '" + Config.getInstance().getMobHealthbarDefault() + "' ;");
|
write("ALTER TABLE `" + tablePrefix + "huds` ADD `mobhealthbar` varchar(50) NOT NULL DEFAULT '" + Config.getInstance().getMobHealthbarDefault() + "' ;");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ALCHEMY:
|
||||||
|
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables for Alchemy...");
|
||||||
|
write("ALTER TABLE `"+tablePrefix + "skills` ADD `alchemy` int(10) NOT NULL DEFAULT '0' ;");
|
||||||
|
write("ALTER TABLE `"+tablePrefix + "experience` ADD `alchemy` int(10) NOT NULL DEFAULT '0' ;");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -970,7 +984,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
int result = -1;
|
int result = -1;
|
||||||
|
|
||||||
if (checkConnected()) {
|
if (checkConnected()) {
|
||||||
ResultSet resultSet = null;
|
ResultSet resultSet;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
@@ -1183,9 +1197,9 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
MobHealthbarType mobHealthbarType;
|
MobHealthbarType mobHealthbarType;
|
||||||
|
|
||||||
final int OFFSET_SKILLS = 0; // TODO update these numbers when the query changes (a new skill is added)
|
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_XP = 13;
|
||||||
final int OFFSET_DATS = 24;
|
final int OFFSET_DATS = 26;
|
||||||
final int OFFSET_OTHER = 36;
|
final int OFFSET_OTHER = 38;
|
||||||
|
|
||||||
skills.put(SkillType.TAMING, result.getInt(OFFSET_SKILLS + 1));
|
skills.put(SkillType.TAMING, result.getInt(OFFSET_SKILLS + 1));
|
||||||
skills.put(SkillType.MINING, result.getInt(OFFSET_SKILLS + 2));
|
skills.put(SkillType.MINING, result.getInt(OFFSET_SKILLS + 2));
|
||||||
@@ -1199,6 +1213,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
skills.put(SkillType.AXES, result.getInt(OFFSET_SKILLS + 10));
|
skills.put(SkillType.AXES, result.getInt(OFFSET_SKILLS + 10));
|
||||||
skills.put(SkillType.ACROBATICS, result.getInt(OFFSET_SKILLS + 11));
|
skills.put(SkillType.ACROBATICS, result.getInt(OFFSET_SKILLS + 11));
|
||||||
skills.put(SkillType.FISHING, result.getInt(OFFSET_SKILLS + 12));
|
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.TAMING, result.getFloat(OFFSET_XP + 1));
|
||||||
skillsXp.put(SkillType.MINING, result.getFloat(OFFSET_XP + 2));
|
skillsXp.put(SkillType.MINING, result.getFloat(OFFSET_XP + 2));
|
||||||
@@ -1212,6 +1227,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
skillsXp.put(SkillType.AXES, result.getFloat(OFFSET_XP + 10));
|
skillsXp.put(SkillType.AXES, result.getFloat(OFFSET_XP + 10));
|
||||||
skillsXp.put(SkillType.ACROBATICS, result.getFloat(OFFSET_XP + 11));
|
skillsXp.put(SkillType.ACROBATICS, result.getFloat(OFFSET_XP + 11));
|
||||||
skillsXp.put(SkillType.FISHING, result.getFloat(OFFSET_XP + 12));
|
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)
|
// Taming - Unused - result.getInt(OFFSET_DATS + 1)
|
||||||
skillsDATS.put(AbilityType.SUPER_BREAKER, result.getInt(OFFSET_DATS + 2));
|
skillsDATS.put(AbilityType.SUPER_BREAKER, result.getInt(OFFSET_DATS + 2));
|
||||||
|
|||||||
@@ -0,0 +1,440 @@
|
|||||||
|
package com.gmail.nossr50.database;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.ObjectInputStream;
|
||||||
|
import java.io.ObjectOutputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||||
|
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.datatypes.player.UserData;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
|
public class SerializedDatabaseManager implements DatabaseManager {
|
||||||
|
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
||||||
|
private final List<PlayerStat> powerLevels = new ArrayList<PlayerStat>();
|
||||||
|
private long lastUpdate = 0;
|
||||||
|
|
||||||
|
private final long UPDATE_WAIT_TIME = 600000L; // 10 minutes
|
||||||
|
|
||||||
|
protected SerializedDatabaseManager() {
|
||||||
|
updateLeaderboards();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void purgePowerlessUsers() {
|
||||||
|
int purgedUsers = 0;
|
||||||
|
|
||||||
|
mcMMO.p.getLogger().info("Purging powerless users...");
|
||||||
|
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean powerless = true;
|
||||||
|
for (int skill : data.getSkillLevels().values()) {
|
||||||
|
if (skill != 0) {
|
||||||
|
powerless = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (powerless && file.delete()) {
|
||||||
|
purgedUsers++;
|
||||||
|
Misc.profileCleanup(data.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.p.getLogger().info("Purged " + purgedUsers + " users from the database.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void purgeOldUsers() {
|
||||||
|
int removedPlayers = 0;
|
||||||
|
long currentTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
mcMMO.p.getLogger().info("Purging old users...");
|
||||||
|
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean rewrite = false;
|
||||||
|
String name = data.getName();
|
||||||
|
long lastPlayed = data.getLastPlayed();
|
||||||
|
|
||||||
|
if (lastPlayed == 0) {
|
||||||
|
OfflinePlayer player = mcMMO.p.getServer().getOfflinePlayer(name);
|
||||||
|
lastPlayed = player.getLastPlayed();
|
||||||
|
rewrite = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentTime - lastPlayed > PURGE_TIME) {
|
||||||
|
if (file.delete()) {
|
||||||
|
removedPlayers++;
|
||||||
|
Misc.profileCleanup(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rewrite) {
|
||||||
|
data.setLastPlayed(lastPlayed);
|
||||||
|
serialize(file, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.p.getLogger().info("Purged " + removedPlayers + " users from the database.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean removeUser(String playerName) {
|
||||||
|
boolean worked = false;
|
||||||
|
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return worked;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data != null && data.getName().equalsIgnoreCase(playerName)) {
|
||||||
|
mcMMO.p.getLogger().info("User found, removing...");
|
||||||
|
worked = file.delete();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return worked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean saveUser(PlayerProfile profile) {
|
||||||
|
UserData data = new UserData(profile);
|
||||||
|
|
||||||
|
return serialize(new File(mcMMO.getUsersDirectory(), data.getName() + ".mcmmoplayer"), data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PlayerStat> readLeaderboard(SkillType skill, int pageNumber, int statsPerPage) {
|
||||||
|
updateLeaderboards();
|
||||||
|
|
||||||
|
List<PlayerStat> statsList = skill == null ? powerLevels : playerStatHash.get(skill);
|
||||||
|
int fromIndex = (Math.max(pageNumber, 1) - 1) * statsPerPage;
|
||||||
|
|
||||||
|
return statsList.subList(Math.min(fromIndex, statsList.size()), Math.min(fromIndex + statsPerPage, statsList.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<SkillType, Integer> readRank(String playerName) {
|
||||||
|
updateLeaderboards();
|
||||||
|
|
||||||
|
Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>();
|
||||||
|
|
||||||
|
for (SkillType skill : SkillType.NON_CHILD_SKILLS) {
|
||||||
|
skills.put(skill, getPlayerRank(playerName, playerStatHash.get(skill)));
|
||||||
|
}
|
||||||
|
|
||||||
|
skills.put(null, getPlayerRank(playerName, powerLevels));
|
||||||
|
|
||||||
|
return skills;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void newUser(String playerName) {
|
||||||
|
serialize(new File(mcMMO.getUsersDirectory(), playerName + ".mcmmoplayer"), new UserData(new PlayerProfile(playerName)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlayerProfile loadPlayerProfile(String playerName, boolean createNew) {
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return new PlayerProfile(playerName, createNew);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data != null && data.getName().equalsIgnoreCase(playerName)) {
|
||||||
|
return loadFromData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new PlayerProfile(playerName, createNew);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getStoredUsers() {
|
||||||
|
ArrayList<String> users = new ArrayList<String>();
|
||||||
|
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
users.add(data.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void convertUsers(DatabaseManager destination) {
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
//TODO: log issue
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int convertedUsers = 0;
|
||||||
|
long startMillis = System.currentTimeMillis();
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (destination.saveUser(loadFromData(data))) {
|
||||||
|
convertedUsers++;
|
||||||
|
Misc.printProgress(convertedUsers, progressInterval, startMillis);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseType getDatabaseType() {
|
||||||
|
return DatabaseType.SERIALIZED;
|
||||||
|
}
|
||||||
|
|
||||||
|
private UserData deserialize(File file) {
|
||||||
|
UserData data = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
FileInputStream fis = new FileInputStream(file);
|
||||||
|
ObjectInputStream ois = new ObjectInputStream(fis);
|
||||||
|
|
||||||
|
data = (UserData) ois.readObject();
|
||||||
|
ois.close();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
mcMMO.p.getLogger().severe("Exception while reading " + file.getName() + ": " + e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean serialize(File file, UserData data) {
|
||||||
|
boolean success = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
FileOutputStream fos = new FileOutputStream(file);
|
||||||
|
ObjectOutputStream oos = new ObjectOutputStream(fos);
|
||||||
|
oos.writeObject(data);
|
||||||
|
oos.close();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
mcMMO.p.getLogger().severe("Exception while writing " + file.getName() + ": " + e.toString());
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PlayerProfile loadFromData(UserData data) {
|
||||||
|
return new PlayerProfile(data.getName(), data.getSkillLevels(), data.getSkillXp(), data.getAbilityData(), data.getMobHealthbarType());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the leader boards.
|
||||||
|
*/
|
||||||
|
private void updateLeaderboards() {
|
||||||
|
// Only update leaderboards every 10 minutes.. this puts a lot of strain on the server (depending on the size of the database) and should not be done frequently
|
||||||
|
if (System.currentTimeMillis() < lastUpdate + UPDATE_WAIT_TIME) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
File usersDirectory = new File(mcMMO.getUsersDirectory());
|
||||||
|
File[] userFiles = usersDirectory.listFiles();
|
||||||
|
|
||||||
|
if (userFiles == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastUpdate = System.currentTimeMillis(); // Log when the last update was run
|
||||||
|
powerLevels.clear(); // Clear old values from the power levels
|
||||||
|
|
||||||
|
// Initialize lists
|
||||||
|
List<PlayerStat> mining = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> woodcutting = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> herbalism = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> excavation = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> acrobatics = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> repair = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> swords = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> axes = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> archery = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> unarmed = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> taming = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> fishing = new ArrayList<PlayerStat>();
|
||||||
|
List<PlayerStat> alchemy = new ArrayList<PlayerStat>();
|
||||||
|
|
||||||
|
for (File file : userFiles) {
|
||||||
|
if (!file.isFile() || file.isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserData data = deserialize(file);
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int powerLevel = 0;
|
||||||
|
String playerName = data.getName();
|
||||||
|
Map<SkillType, Integer> skills = data.getSkillLevels();
|
||||||
|
|
||||||
|
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));
|
||||||
|
powerLevel += putStat(fishing, playerName, skills.get(SkillType.FISHING));
|
||||||
|
powerLevel += putStat(herbalism, playerName, skills.get(SkillType.HERBALISM));
|
||||||
|
powerLevel += putStat(mining, playerName, skills.get(SkillType.MINING));
|
||||||
|
powerLevel += putStat(repair, playerName, skills.get(SkillType.REPAIR));
|
||||||
|
powerLevel += putStat(swords, playerName, skills.get(SkillType.SWORDS));
|
||||||
|
powerLevel += putStat(taming, playerName, skills.get(SkillType.TAMING));
|
||||||
|
powerLevel += putStat(unarmed, playerName, skills.get(SkillType.UNARMED));
|
||||||
|
powerLevel += putStat(woodcutting, playerName, skills.get(SkillType.WOODCUTTING));
|
||||||
|
|
||||||
|
putStat(powerLevels, playerName, powerLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
SkillComparator c = new SkillComparator();
|
||||||
|
|
||||||
|
Collections.sort(mining, c);
|
||||||
|
Collections.sort(woodcutting, c);
|
||||||
|
Collections.sort(repair, c);
|
||||||
|
Collections.sort(unarmed, c);
|
||||||
|
Collections.sort(herbalism, c);
|
||||||
|
Collections.sort(excavation, c);
|
||||||
|
Collections.sort(archery, c);
|
||||||
|
Collections.sort(swords, c);
|
||||||
|
Collections.sort(axes, c);
|
||||||
|
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);
|
||||||
|
playerStatHash.put(SkillType.WOODCUTTING, woodcutting);
|
||||||
|
playerStatHash.put(SkillType.REPAIR, repair);
|
||||||
|
playerStatHash.put(SkillType.UNARMED, unarmed);
|
||||||
|
playerStatHash.put(SkillType.HERBALISM, herbalism);
|
||||||
|
playerStatHash.put(SkillType.EXCAVATION, excavation);
|
||||||
|
playerStatHash.put(SkillType.ARCHERY, archery);
|
||||||
|
playerStatHash.put(SkillType.SWORDS, swords);
|
||||||
|
playerStatHash.put(SkillType.AXES, axes);
|
||||||
|
playerStatHash.put(SkillType.ACROBATICS, acrobatics);
|
||||||
|
playerStatHash.put(SkillType.TAMING, taming);
|
||||||
|
playerStatHash.put(SkillType.FISHING, fishing);
|
||||||
|
playerStatHash.put(SkillType.ALCHEMY, alchemy);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int putStat(List<PlayerStat> statList, String playerName, int statValue) {
|
||||||
|
statList.add(new PlayerStat(playerName, statValue));
|
||||||
|
return statValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer getPlayerRank(String playerName, List<PlayerStat> statsList) {
|
||||||
|
if (statsList == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
int currentPos = 1;
|
||||||
|
|
||||||
|
for (PlayerStat stat : statsList) {
|
||||||
|
if (stat.name.equalsIgnoreCase(playerName)) {
|
||||||
|
return currentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentPos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class SkillComparator implements Comparator<PlayerStat> {
|
||||||
|
@Override
|
||||||
|
public int compare(PlayerStat o1, PlayerStat o2) {
|
||||||
|
return (o2.statVal - o1.statVal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.gmail.nossr50.datatypes.database;
|
|||||||
|
|
||||||
public enum DatabaseType {
|
public enum DatabaseType {
|
||||||
FLATFILE,
|
FLATFILE,
|
||||||
|
SERIALIZED,
|
||||||
SQL,
|
SQL,
|
||||||
CUSTOM;
|
CUSTOM;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public enum DatabaseUpdateType {
|
|||||||
MOB_HEALTHBARS,
|
MOB_HEALTHBARS,
|
||||||
PARTY_NAMES,
|
PARTY_NAMES,
|
||||||
KILL_ORPHANS,
|
KILL_ORPHANS,
|
||||||
DROPPED_SPOUT
|
DROPPED_SPOUT,
|
||||||
|
ALCHEMY
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ public enum FormulaType {
|
|||||||
return UNKNOWN;
|
return UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,12 +1,22 @@
|
|||||||
package com.gmail.nossr50.datatypes.party;
|
package com.gmail.nossr50.datatypes.party;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
public class Party {
|
public class Party {
|
||||||
private final LinkedHashSet<String> members = new LinkedHashSet<String>();
|
private final LinkedHashSet<String> members = new LinkedHashSet<String>();
|
||||||
@@ -15,6 +25,9 @@ public class Party {
|
|||||||
private String name;
|
private String name;
|
||||||
private String password;
|
private String password;
|
||||||
private boolean locked;
|
private boolean locked;
|
||||||
|
private Party ally;
|
||||||
|
private int level;
|
||||||
|
private float xp;
|
||||||
|
|
||||||
private ShareMode xpShareMode = ShareMode.NONE;
|
private ShareMode xpShareMode = ShareMode.NONE;
|
||||||
private ShareMode itemShareMode = ShareMode.NONE;
|
private ShareMode itemShareMode = ShareMode.NONE;
|
||||||
@@ -33,6 +46,7 @@ public class Party {
|
|||||||
this.leader = leader;
|
this.leader = leader;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.locked = true;
|
this.locked = true;
|
||||||
|
this.level = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Party(String leader, String name, String password) {
|
public Party(String leader, String name, String password) {
|
||||||
@@ -40,6 +54,7 @@ public class Party {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.locked = true;
|
this.locked = true;
|
||||||
|
this.level = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Party(String leader, String name, String password, boolean locked) {
|
public Party(String leader, String name, String password, boolean locked) {
|
||||||
@@ -47,6 +62,7 @@ public class Party {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.locked = locked;
|
this.locked = locked;
|
||||||
|
this.level = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinkedHashSet<String> getMembers() {
|
public LinkedHashSet<String> getMembers() {
|
||||||
@@ -83,6 +99,10 @@ public class Party {
|
|||||||
return locked;
|
return locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Party getAlly() {
|
||||||
|
return ally;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getItemShareCategories() {
|
public List<String> getItemShareCategories() {
|
||||||
List<String> shareCategories = new ArrayList<String>();
|
List<String> shareCategories = new ArrayList<String>();
|
||||||
|
|
||||||
@@ -111,6 +131,99 @@ public class Party {
|
|||||||
this.locked = locked;
|
this.locked = locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAlly(Party ally) {
|
||||||
|
this.ally = ally;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getXp() {
|
||||||
|
return xp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXp(float xp) {
|
||||||
|
this.xp = xp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addXp(float xp) {
|
||||||
|
setXp(getXp() + xp);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float levelUp() {
|
||||||
|
float xpRemoved = getXpToLevel();
|
||||||
|
|
||||||
|
setLevel(getLevel() + 1);
|
||||||
|
setXp(getXp() - xpRemoved);
|
||||||
|
|
||||||
|
return xpRemoved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getXpToLevel() {
|
||||||
|
FormulaType formulaType = ExperienceConfig.getInstance().getFormulaType();
|
||||||
|
return (mcMMO.getFormulaManager().getCachedXpToLevel(level, formulaType)) * (getOnlineMembers().size() + Config.getInstance().getPartyXpCurveMultiplier());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXpToLevelPercentage() {
|
||||||
|
DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||||
|
return percent.format( this.getXp() / getXpToLevel());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies an experience gain
|
||||||
|
*
|
||||||
|
* @param xp Experience amount to add
|
||||||
|
*/
|
||||||
|
public void applyXpGain(float xp) {
|
||||||
|
if (!EventUtils.handlePartyXpGainEvent(this, xp)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getXp() < getXpToLevel()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int levelsGained = 0;
|
||||||
|
float xpRemoved = 0;
|
||||||
|
|
||||||
|
while (getXp() >= getXpToLevel()) {
|
||||||
|
if (hasReachedLevelCap()) {
|
||||||
|
setXp(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
xpRemoved += levelUp();
|
||||||
|
levelsGained++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!EventUtils.handlePartyLevelChangeEvent(this, levelsGained, xpRemoved)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Config.getInstance().getPartyInformAllMembers()) {
|
||||||
|
Player leader = mcMMO.p.getServer().getPlayer(this.leader);
|
||||||
|
if (leader != null) {
|
||||||
|
leader.sendMessage(LocaleLoader.getString("Party.LevelUp", levelsGained, getLevel()));
|
||||||
|
|
||||||
|
if (Config.getInstance().getLevelUpSoundsEnabled()) {
|
||||||
|
leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.informPartyMembersLevelUp(this, levelsGained, getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasReachedLevelCap() {
|
||||||
|
return Config.getInstance().getPartyLevelCap() < getLevel() + 1;
|
||||||
|
}
|
||||||
|
|
||||||
public void setXpShareMode(ShareMode xpShareMode) {
|
public void setXpShareMode(ShareMode xpShareMode) {
|
||||||
this.xpShareMode = xpShareMode;
|
this.xpShareMode = xpShareMode;
|
||||||
}
|
}
|
||||||
@@ -176,6 +289,36 @@ public class Party {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String createMembersList(String playerName, List<Player> nearMembers) {
|
||||||
|
StringBuilder memberList = new StringBuilder();
|
||||||
|
|
||||||
|
for (String memberName : this.getMembers()) {
|
||||||
|
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
||||||
|
|
||||||
|
if (this.getLeader().equalsIgnoreCase(memberName)) {
|
||||||
|
memberList.append(ChatColor.GOLD);
|
||||||
|
|
||||||
|
if (member == null) {
|
||||||
|
memberName = memberName.substring(0, 1) + ChatColor.GRAY + ChatColor.ITALIC + "" + memberName.substring(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (member != null) {
|
||||||
|
memberList.append(ChatColor.WHITE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
memberList.append(ChatColor.GRAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nearMembers.contains(member) && !playerName.equalsIgnoreCase(memberName)) {
|
||||||
|
memberList.append(ChatColor.ITALIC).append("");
|
||||||
|
}
|
||||||
|
|
||||||
|
memberList.append(memberName).append(ChatColor.RESET).append(" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return memberList.toString();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.gmail.nossr50.datatypes.party;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
|
public enum PartyFeature {
|
||||||
|
CHAT,
|
||||||
|
TELEPORT,
|
||||||
|
ALLIANCE,
|
||||||
|
ITEM_SHARE,
|
||||||
|
XP_SHARE;
|
||||||
|
|
||||||
|
public String getLocaleString() {
|
||||||
|
return LocaleLoader.getString("Party.Feature." + StringUtils.getPrettyPartyFeatureString(this).replace(" ", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFeatureLockedLocaleString() {
|
||||||
|
return LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Party.Feature.Locked." + StringUtils.getPrettyPartyFeatureString(this).replace(" ", ""), Config.getInstance().getPartyFeatureUnlockLevel(this)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasPermission(Player player) {
|
||||||
|
PartySubcommandType partySubCommandType;
|
||||||
|
switch (this) {
|
||||||
|
case CHAT:
|
||||||
|
partySubCommandType = PartySubcommandType.CHAT;
|
||||||
|
break;
|
||||||
|
case TELEPORT:
|
||||||
|
partySubCommandType = PartySubcommandType.TELEPORT;
|
||||||
|
break;
|
||||||
|
case ALLIANCE:
|
||||||
|
partySubCommandType = PartySubcommandType.ALLIANCE;
|
||||||
|
break;
|
||||||
|
case ITEM_SHARE:
|
||||||
|
partySubCommandType = PartySubcommandType.ITEMSHARE;
|
||||||
|
break;
|
||||||
|
case XP_SHARE:
|
||||||
|
partySubCommandType = PartySubcommandType.XPSHARE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return Permissions.partySubcommand(player, partySubCommandType);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,4 +22,4 @@ public enum ShareMode {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.bukkit.Server;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -30,6 +31,7 @@ import com.gmail.nossr50.runnables.skills.AbilityDisableTask;
|
|||||||
import com.gmail.nossr50.runnables.skills.ToolLowerTask;
|
import com.gmail.nossr50.runnables.skills.ToolLowerTask;
|
||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
||||||
|
import com.gmail.nossr50.skills.alchemy.AlchemyManager;
|
||||||
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
||||||
import com.gmail.nossr50.skills.axes.AxesManager;
|
import com.gmail.nossr50.skills.axes.AxesManager;
|
||||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
@@ -45,7 +47,6 @@ import com.gmail.nossr50.skills.unarmed.UnarmedManager;
|
|||||||
import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager;
|
import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager;
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.ModUtils;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||||
@@ -62,6 +63,7 @@ public class McMMOPlayer {
|
|||||||
|
|
||||||
private Party party;
|
private Party party;
|
||||||
private Party invite;
|
private Party invite;
|
||||||
|
private Party allianceInvite;
|
||||||
private int itemShareModifier;
|
private int itemShareModifier;
|
||||||
|
|
||||||
private PartyTeleportRecord ptpRecord;
|
private PartyTeleportRecord ptpRecord;
|
||||||
@@ -87,11 +89,13 @@ public class McMMOPlayer {
|
|||||||
private Location teleportCommence;
|
private Location teleportCommence;
|
||||||
|
|
||||||
private boolean isUsingUnarmed;
|
private boolean isUsingUnarmed;
|
||||||
|
private final FixedMetadataValue playerMetadata;
|
||||||
|
|
||||||
public McMMOPlayer(Player player) {
|
public McMMOPlayer(Player player) {
|
||||||
String playerName = player.getName();
|
String playerName = player.getName();
|
||||||
|
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
playerMetadata = new FixedMetadataValue(mcMMO.p, playerName);
|
||||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, true);
|
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, true);
|
||||||
party = PartyManager.getPlayerParty(playerName);
|
party = PartyManager.getPlayerParty(playerName);
|
||||||
ptpRecord = new PartyTeleportRecord();
|
ptpRecord = new PartyTeleportRecord();
|
||||||
@@ -189,6 +193,10 @@ public class McMMOPlayer {
|
|||||||
return (AcrobaticsManager) skillManagers.get(SkillType.ACROBATICS);
|
return (AcrobaticsManager) skillManagers.get(SkillType.ACROBATICS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AlchemyManager getAlchemyManager() {
|
||||||
|
return (AlchemyManager) skillManagers.get(SkillType.ALCHEMY);
|
||||||
|
}
|
||||||
|
|
||||||
public ArcheryManager getArcheryManager() {
|
public ArcheryManager getArcheryManager() {
|
||||||
return (ArcheryManager) skillManagers.get(SkillType.ARCHERY);
|
return (ArcheryManager) skillManagers.get(SkillType.ARCHERY);
|
||||||
}
|
}
|
||||||
@@ -505,6 +513,14 @@ public class McMMOPlayer {
|
|||||||
*/
|
*/
|
||||||
public void beginUnsharedXpGain(SkillType skill, float xp) {
|
public void beginUnsharedXpGain(SkillType skill, float xp) {
|
||||||
applyXpGain(skill, modifyXpGain(skill, xp));
|
applyXpGain(skill, modifyXpGain(skill, xp));
|
||||||
|
|
||||||
|
if (party == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Config.getInstance().getPartyXpNearMembersNeeded() || !PartyManager.getNearMembers(this).isEmpty()) {
|
||||||
|
party.applyXpGain(modifyXpGain(skill, xp));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -626,6 +642,22 @@ public class McMMOPlayer {
|
|||||||
return ptpRecord;
|
return ptpRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPartyAllianceInvite(Party allianceInvite) {
|
||||||
|
this.allianceInvite = allianceInvite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Party getPartyAllianceInvite() {
|
||||||
|
return allianceInvite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasPartyAllianceInvite() {
|
||||||
|
return (allianceInvite != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removePartyAllianceInvite() {
|
||||||
|
allianceInvite = null;
|
||||||
|
}
|
||||||
|
|
||||||
public int getItemShareModifier() {
|
public int getItemShareModifier() {
|
||||||
if (itemShareModifier < 10) {
|
if (itemShareModifier < 10) {
|
||||||
setItemShareModifier(10);
|
setItemShareModifier(10);
|
||||||
@@ -692,12 +724,12 @@ public class McMMOPlayer {
|
|||||||
switch (mode) {
|
switch (mode) {
|
||||||
case ADMIN:
|
case ADMIN:
|
||||||
adminChatMode = !adminChatMode;
|
adminChatMode = !adminChatMode;
|
||||||
partyChatMode = adminChatMode ? false : partyChatMode;
|
partyChatMode = !adminChatMode && partyChatMode;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PARTY:
|
case PARTY:
|
||||||
partyChatMode = !partyChatMode;
|
partyChatMode = !partyChatMode;
|
||||||
adminChatMode = partyChatMode ? false : adminChatMode;
|
adminChatMode = !partyChatMode && adminChatMode;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -724,7 +756,7 @@ public class McMMOPlayer {
|
|||||||
xp = (float) (xp / skillType.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier());
|
xp = (float) (xp / skillType.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier());
|
||||||
|
|
||||||
if (Config.getInstance().getToolModsEnabled()) {
|
if (Config.getInstance().getToolModsEnabled()) {
|
||||||
CustomTool tool = ModUtils.getToolFromItemStack(player.getItemInHand());
|
CustomTool tool = mcMMO.getModManager().getTool(player.getItemInHand());
|
||||||
|
|
||||||
if (tool != null) {
|
if (tool != null) {
|
||||||
xp *= tool.getXpMultiplier();
|
xp *= tool.getXpMultiplier();
|
||||||
@@ -810,7 +842,7 @@ public class McMMOPlayer {
|
|||||||
|
|
||||||
ItemStack inHand = player.getItemInHand();
|
ItemStack inHand = player.getItemInHand();
|
||||||
|
|
||||||
if (ModUtils.isCustomTool(inHand) && !ModUtils.getToolFromItemStack(inHand).isAbilityEnabled()) {
|
if (mcMMO.getModManager().isCustomTool(inHand) && !mcMMO.getModManager().getTool(inHand).isAbilityEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -913,4 +945,8 @@ public class McMMOPlayer {
|
|||||||
public void resetCooldowns() {
|
public void resetCooldowns() {
|
||||||
profile.resetCooldowns();
|
profile.resetCooldowns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FixedMetadataValue getPlayerMetadata() {
|
||||||
|
return playerMetadata;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
|
|||||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
|
||||||
public class PlayerProfile {
|
public class PlayerProfile {
|
||||||
private final String playerName;
|
private final String playerName;
|
||||||
private boolean loaded;
|
private boolean loaded;
|
||||||
@@ -32,7 +34,7 @@ public class PlayerProfile {
|
|||||||
|
|
||||||
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
|
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
|
||||||
|
|
||||||
for (AbilityType abilityType : AbilityType.NORMAL_ABILITIES) {
|
for (AbilityType abilityType : AbilityType.values()) {
|
||||||
abilityDATS.put(abilityType, 0);
|
abilityDATS.put(abilityType, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +65,7 @@ public class PlayerProfile {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changed = !mcMMO.getDatabaseManager().saveUser(this);
|
changed = !mcMMO.getDatabaseManager().saveUser(new PlayerProfile(playerName, ImmutableMap.copyOf(skills), ImmutableMap.copyOf(skillsXp), ImmutableMap.copyOf(abilityDATS), mobHealthbarType));
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
mcMMO.p.getLogger().warning("PlayerProfile for " + playerName + " failed to save");
|
mcMMO.p.getLogger().warning("PlayerProfile for " + playerName + " failed to save");
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.gmail.nossr50.datatypes.player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class UserData implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private UUID playerID;
|
||||||
|
private String name;
|
||||||
|
private long lastPlayed;
|
||||||
|
private HashMap<SkillType, Integer> skillLevels = new HashMap<SkillType, Integer>();
|
||||||
|
private HashMap<SkillType, Float> skillXp = new HashMap<SkillType, Float>();
|
||||||
|
private HashMap<AbilityType, Integer> abilityData = new HashMap<AbilityType, Integer>();
|
||||||
|
private MobHealthbarType mobHealthbarType;
|
||||||
|
|
||||||
|
public UserData(McMMOPlayer mcMMOPlayer) {
|
||||||
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
|
playerID = player.getUniqueId();
|
||||||
|
name = player.getName();
|
||||||
|
lastPlayed = player.getLastPlayed();
|
||||||
|
|
||||||
|
for (SkillType skill : SkillType.values()) {
|
||||||
|
skillLevels.put(skill, mcMMOPlayer.getSkillLevel(skill));
|
||||||
|
skillXp.put(skill, mcMMOPlayer.getSkillXpLevelRaw(skill));
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerProfile profile = mcMMOPlayer.getProfile();
|
||||||
|
|
||||||
|
for (AbilityType ability : AbilityType.values()) {
|
||||||
|
abilityData.put(ability, (int) profile.getAbilityDATS(ability));
|
||||||
|
}
|
||||||
|
|
||||||
|
mobHealthbarType = profile.getMobHealthbarType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserData(PlayerProfile profile) {
|
||||||
|
name = profile.getPlayerName();
|
||||||
|
|
||||||
|
Player player = mcMMO.p.getServer().getPlayerExact(name);
|
||||||
|
|
||||||
|
if (player == null) {
|
||||||
|
playerID = UUID.fromString(name);
|
||||||
|
lastPlayed = 0L;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
playerID = player.getUniqueId();
|
||||||
|
lastPlayed = player.getLastPlayed();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SkillType skill : SkillType.values()) {
|
||||||
|
skillLevels.put(skill, profile.getSkillLevel(skill));
|
||||||
|
skillXp.put(skill, profile.getSkillXpLevelRaw(skill));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (AbilityType ability : AbilityType.values()) {
|
||||||
|
abilityData.put(ability, (int) profile.getAbilityDATS(ability));
|
||||||
|
}
|
||||||
|
|
||||||
|
mobHealthbarType = profile.getMobHealthbarType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getLastPlayed() {
|
||||||
|
return lastPlayed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastPlayed(long lastPlayed) {
|
||||||
|
this.lastPlayed = lastPlayed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<SkillType, Integer> getSkillLevels() {
|
||||||
|
return skillLevels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<SkillType, Float> getSkillXp() {
|
||||||
|
return skillXp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<AbilityType, Integer> getAbilityData() {
|
||||||
|
return abilityData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MobHealthbarType getMobHealthbarType() {
|
||||||
|
return mobHealthbarType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +1,15 @@
|
|||||||
package com.gmail.nossr50.datatypes.skills;
|
package com.gmail.nossr50.datatypes.skills;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.BlockUtils;
|
import com.gmail.nossr50.util.BlockUtils;
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
|
|
||||||
public enum AbilityType {
|
public enum AbilityType {
|
||||||
BERSERK(
|
BERSERK(
|
||||||
"Unarmed.Skills.Berserk.On",
|
"Unarmed.Skills.Berserk.On",
|
||||||
@@ -75,16 +69,7 @@ public enum AbilityType {
|
|||||||
"Mining.Blast.Other.On",
|
"Mining.Blast.Other.On",
|
||||||
"Mining.Blast.Refresh",
|
"Mining.Blast.Refresh",
|
||||||
null),
|
null),
|
||||||
|
;
|
||||||
/**
|
|
||||||
* No cooldown - always active
|
|
||||||
*/
|
|
||||||
LEAF_BLOWER,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Not a first-class Ability - part of Berserk
|
|
||||||
*/
|
|
||||||
BLOCK_CRACKER;
|
|
||||||
|
|
||||||
private String abilityOn;
|
private String abilityOn;
|
||||||
private String abilityOff;
|
private String abilityOff;
|
||||||
@@ -92,20 +77,6 @@ public enum AbilityType {
|
|||||||
private String abilityRefresh;
|
private String abilityRefresh;
|
||||||
private String abilityPlayerOff;
|
private String abilityPlayerOff;
|
||||||
|
|
||||||
/**
|
|
||||||
* Those abilities that have a cooldown saved to the database.
|
|
||||||
*/
|
|
||||||
public static final List<AbilityType> NORMAL_ABILITIES = ImmutableList.of(BERSERK, BLAST_MINING, GIGA_DRILL_BREAKER, GREEN_TERRA, SERRATED_STRIKES, SKULL_SPLITTER, SUPER_BREAKER, TREE_FELLER);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Those abilities that do not have a cooldown saved to the database.
|
|
||||||
*/
|
|
||||||
public static final List<AbilityType> NON_NORMAL_ABILITIES = ImmutableList.of(BLOCK_CRACKER, LEAF_BLOWER);
|
|
||||||
|
|
||||||
private AbilityType() {
|
|
||||||
this(null, null, null, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AbilityType(String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff) {
|
private AbilityType(String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff) {
|
||||||
this.abilityOn = abilityOn;
|
this.abilityOn = abilityOn;
|
||||||
this.abilityOff = abilityOff;
|
this.abilityOff = abilityOff;
|
||||||
@@ -181,18 +152,12 @@ public enum AbilityType {
|
|||||||
case BLAST_MINING:
|
case BLAST_MINING:
|
||||||
return Permissions.remoteDetonation(player);
|
return Permissions.remoteDetonation(player);
|
||||||
|
|
||||||
case BLOCK_CRACKER:
|
|
||||||
return Permissions.blockCracker(player);
|
|
||||||
|
|
||||||
case GIGA_DRILL_BREAKER:
|
case GIGA_DRILL_BREAKER:
|
||||||
return Permissions.gigaDrillBreaker(player);
|
return Permissions.gigaDrillBreaker(player);
|
||||||
|
|
||||||
case GREEN_TERRA:
|
case GREEN_TERRA:
|
||||||
return Permissions.greenTerra(player);
|
return Permissions.greenTerra(player);
|
||||||
|
|
||||||
case LEAF_BLOWER:
|
|
||||||
return Permissions.leafBlower(player);
|
|
||||||
|
|
||||||
case SERRATED_STRIKES:
|
case SERRATED_STRIKES:
|
||||||
return Permissions.serratedStrikes(player);
|
return Permissions.serratedStrikes(player);
|
||||||
|
|
||||||
@@ -221,18 +186,12 @@ public enum AbilityType {
|
|||||||
case BERSERK:
|
case BERSERK:
|
||||||
return (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW);
|
return (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW);
|
||||||
|
|
||||||
case BLOCK_CRACKER:
|
|
||||||
return BlockUtils.affectedByBlockCracker(blockState);
|
|
||||||
|
|
||||||
case GIGA_DRILL_BREAKER:
|
case GIGA_DRILL_BREAKER:
|
||||||
return BlockUtils.affectedByGigaDrillBreaker(blockState);
|
return BlockUtils.affectedByGigaDrillBreaker(blockState);
|
||||||
|
|
||||||
case GREEN_TERRA:
|
case GREEN_TERRA:
|
||||||
return BlockUtils.canMakeMossy(blockState);
|
return BlockUtils.canMakeMossy(blockState);
|
||||||
|
|
||||||
case LEAF_BLOWER:
|
|
||||||
return BlockUtils.isLeaves(blockState);
|
|
||||||
|
|
||||||
case SUPER_BREAKER:
|
case SUPER_BREAKER:
|
||||||
return BlockUtils.affectedBySuperBreaker(blockState);
|
return BlockUtils.affectedBySuperBreaker(blockState);
|
||||||
|
|
||||||
@@ -243,23 +202,4 @@ public enum AbilityType {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check to see if ability should be triggered.
|
|
||||||
*
|
|
||||||
* @param player The player using the ability
|
|
||||||
* @param block The block modified by the ability
|
|
||||||
* @return true if the ability should activate, false otherwise
|
|
||||||
*/
|
|
||||||
public boolean triggerCheck(Player player, Block block) {
|
|
||||||
switch (this) {
|
|
||||||
case BERSERK:
|
|
||||||
case BLOCK_CRACKER:
|
|
||||||
case LEAF_BLOWER:
|
|
||||||
return blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.gmail.nossr50.datatypes.skills;
|
||||||
|
|
||||||
|
public enum SecondaryAbility {
|
||||||
|
/* ACROBATICS */
|
||||||
|
DODGE,
|
||||||
|
GRACEFUL_ROLL,
|
||||||
|
ROLL,
|
||||||
|
|
||||||
|
/* ALCHEMY */
|
||||||
|
CATALYSIS,
|
||||||
|
CONCOCTIONS,
|
||||||
|
|
||||||
|
/* ARCHERY */
|
||||||
|
DAZE,
|
||||||
|
RETRIEVE,
|
||||||
|
SKILL_SHOT,
|
||||||
|
|
||||||
|
/* Axes */
|
||||||
|
ARMOR_IMPACT,
|
||||||
|
AXE_MASTERY,
|
||||||
|
CRITICAL_HIT,
|
||||||
|
GREATER_IMPACT,
|
||||||
|
|
||||||
|
/* Excavation */
|
||||||
|
EXCAVATION_TREASURE_HUNTER,
|
||||||
|
|
||||||
|
/* Fishing */
|
||||||
|
FISHERMANS_DIET,
|
||||||
|
FISHING_TREASURE_HUNTER,
|
||||||
|
ICE_FISHING,
|
||||||
|
MAGIC_HUNTER,
|
||||||
|
MASTER_ANGLER,
|
||||||
|
SHAKE,
|
||||||
|
|
||||||
|
/* Herbalism */
|
||||||
|
FARMERS_DIET,
|
||||||
|
GREEN_THUMB_PLANT,
|
||||||
|
GREEN_THUMB_BLOCK,
|
||||||
|
HERBALISM_DOUBLE_DROPS,
|
||||||
|
HYLIAN_LUCK,
|
||||||
|
SHROOM_THUMB,
|
||||||
|
|
||||||
|
/* Mining */
|
||||||
|
MINING_DOUBLE_DROPS,
|
||||||
|
|
||||||
|
/* Repair */
|
||||||
|
ARCANE_FORGING,
|
||||||
|
REPAIR_MASTERY,
|
||||||
|
SALVAGE,
|
||||||
|
SUPER_REPAIR,
|
||||||
|
|
||||||
|
/* Smelting */
|
||||||
|
FLUX_MINING,
|
||||||
|
FUEL_EFFICIENCY,
|
||||||
|
SECOND_SMELT,
|
||||||
|
|
||||||
|
/* Swords */
|
||||||
|
BLEED,
|
||||||
|
COUNTER,
|
||||||
|
|
||||||
|
/* Taming */
|
||||||
|
BEAST_LORE,
|
||||||
|
CALL_OF_THE_WILD,
|
||||||
|
ENVIROMENTALLY_AWARE,
|
||||||
|
FAST_FOOD,
|
||||||
|
GORE,
|
||||||
|
HOLY_HOUND,
|
||||||
|
SHARPENED_CLAWS,
|
||||||
|
SHOCK_PROOF,
|
||||||
|
THICK_FUR,
|
||||||
|
|
||||||
|
/* Unarmed */
|
||||||
|
BLOCK_CRACKER,
|
||||||
|
DEFLECT,
|
||||||
|
DISARM,
|
||||||
|
IRON_ARM,
|
||||||
|
IRON_GRIP,
|
||||||
|
|
||||||
|
/* Woodcutting */
|
||||||
|
LEAF_BLOWER,
|
||||||
|
WOODCUTTING_DOUBLE_DROPS;
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
||||||
|
import com.gmail.nossr50.skills.alchemy.AlchemyManager;
|
||||||
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
||||||
import com.gmail.nossr50.skills.axes.AxesManager;
|
import com.gmail.nossr50.skills.axes.AxesManager;
|
||||||
import com.gmail.nossr50.skills.excavation.ExcavationManager;
|
import com.gmail.nossr50.skills.excavation.ExcavationManager;
|
||||||
@@ -34,24 +35,26 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
public enum SkillType {
|
public enum SkillType {
|
||||||
ACROBATICS(AcrobaticsManager.class, Color.WHITE),
|
ACROBATICS(AcrobaticsManager.class, Color.WHITE, ImmutableList.of(SecondaryAbility.DODGE, SecondaryAbility.GRACEFUL_ROLL, SecondaryAbility.ROLL)),
|
||||||
ARCHERY(ArcheryManager.class, Color.MAROON),
|
ALCHEMY(AlchemyManager.class, Color.FUCHSIA, ImmutableList.of(SecondaryAbility.CATALYSIS, SecondaryAbility.CONCOCTIONS)),
|
||||||
AXES(AxesManager.class, Color.AQUA, AbilityType.SKULL_SPLITTER, ToolType.AXE),
|
ARCHERY(ArcheryManager.class, Color.MAROON, ImmutableList.of(SecondaryAbility.DAZE, SecondaryAbility.RETRIEVE, SecondaryAbility.SKILL_SHOT)),
|
||||||
EXCAVATION(ExcavationManager.class, Color.fromRGB(139, 69, 19), AbilityType.GIGA_DRILL_BREAKER, ToolType.SHOVEL),
|
AXES(AxesManager.class, Color.AQUA, AbilityType.SKULL_SPLITTER, ToolType.AXE, ImmutableList.of(SecondaryAbility.ARMOR_IMPACT, SecondaryAbility.AXE_MASTERY, SecondaryAbility.CRITICAL_HIT, SecondaryAbility.GREATER_IMPACT)),
|
||||||
FISHING(FishingManager.class, Color.NAVY),
|
EXCAVATION(ExcavationManager.class, Color.fromRGB(139, 69, 19), AbilityType.GIGA_DRILL_BREAKER, ToolType.SHOVEL, ImmutableList.of(SecondaryAbility.EXCAVATION_TREASURE_HUNTER)),
|
||||||
HERBALISM(HerbalismManager.class, Color.GREEN, AbilityType.GREEN_TERRA, ToolType.HOE),
|
FISHING(FishingManager.class, Color.NAVY, ImmutableList.of(SecondaryAbility.FISHERMANS_DIET, SecondaryAbility.FISHING_TREASURE_HUNTER, SecondaryAbility.ICE_FISHING, SecondaryAbility.MAGIC_HUNTER, SecondaryAbility.MASTER_ANGLER, SecondaryAbility.SHAKE)),
|
||||||
MINING(MiningManager.class, Color.GRAY, AbilityType.SUPER_BREAKER, ToolType.PICKAXE),
|
HERBALISM(HerbalismManager.class, Color.GREEN, AbilityType.GREEN_TERRA, ToolType.HOE, ImmutableList.of(SecondaryAbility.FARMERS_DIET, SecondaryAbility.GREEN_THUMB_PLANT, SecondaryAbility.GREEN_THUMB_BLOCK, SecondaryAbility.HERBALISM_DOUBLE_DROPS, SecondaryAbility.HYLIAN_LUCK, SecondaryAbility.SHROOM_THUMB)),
|
||||||
REPAIR(RepairManager.class, Color.SILVER),
|
MINING(MiningManager.class, Color.GRAY, AbilityType.SUPER_BREAKER, ToolType.PICKAXE, ImmutableList.of(SecondaryAbility.MINING_DOUBLE_DROPS)),
|
||||||
SMELTING(SmeltingManager.class, Color.YELLOW),
|
REPAIR(RepairManager.class, Color.SILVER, ImmutableList.of(SecondaryAbility.ARCANE_FORGING, SecondaryAbility.REPAIR_MASTERY, SecondaryAbility.SALVAGE, SecondaryAbility.SUPER_REPAIR)),
|
||||||
SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), AbilityType.SERRATED_STRIKES, ToolType.SWORD),
|
SMELTING(SmeltingManager.class, Color.YELLOW, ImmutableList.of(SecondaryAbility.FLUX_MINING, SecondaryAbility.FUEL_EFFICIENCY, SecondaryAbility.SECOND_SMELT)),
|
||||||
TAMING(TamingManager.class, Color.PURPLE),
|
SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), AbilityType.SERRATED_STRIKES, ToolType.SWORD, ImmutableList.of(SecondaryAbility.BLEED, SecondaryAbility.COUNTER)),
|
||||||
UNARMED(UnarmedManager.class, Color.BLACK, AbilityType.BERSERK, ToolType.FISTS),
|
TAMING(TamingManager.class, Color.PURPLE, ImmutableList.of(SecondaryAbility.BEAST_LORE, SecondaryAbility.CALL_OF_THE_WILD, SecondaryAbility.ENVIROMENTALLY_AWARE, SecondaryAbility.FAST_FOOD, SecondaryAbility.GORE, SecondaryAbility.HOLY_HOUND, SecondaryAbility.SHARPENED_CLAWS, SecondaryAbility.SHOCK_PROOF, SecondaryAbility.THICK_FUR)),
|
||||||
WOODCUTTING(WoodcuttingManager.class, Color.OLIVE, AbilityType.TREE_FELLER, ToolType.AXE);
|
UNARMED(UnarmedManager.class, Color.BLACK, AbilityType.BERSERK, ToolType.FISTS, ImmutableList.of(SecondaryAbility.BLOCK_CRACKER, SecondaryAbility.DEFLECT, SecondaryAbility.DISARM, SecondaryAbility.IRON_ARM, SecondaryAbility.IRON_GRIP)),
|
||||||
|
WOODCUTTING(WoodcuttingManager.class, Color.OLIVE, AbilityType.TREE_FELLER, ToolType.AXE, ImmutableList.of(SecondaryAbility.LEAF_BLOWER, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS));
|
||||||
|
|
||||||
private Class<? extends SkillManager> managerClass;
|
private Class<? extends SkillManager> managerClass;
|
||||||
private Color runescapeColor;
|
private Color runescapeColor;
|
||||||
private AbilityType ability;
|
private AbilityType ability;
|
||||||
private ToolType tool;
|
private ToolType tool;
|
||||||
|
private List<SecondaryAbility> secondaryAbilities;
|
||||||
|
|
||||||
public static final List<String> SKILL_NAMES;
|
public static final List<String> SKILL_NAMES;
|
||||||
|
|
||||||
@@ -60,7 +63,7 @@ public enum SkillType {
|
|||||||
|
|
||||||
public static final List<SkillType> COMBAT_SKILLS = ImmutableList.of(ARCHERY, AXES, SWORDS, TAMING, UNARMED);
|
public static final List<SkillType> COMBAT_SKILLS = ImmutableList.of(ARCHERY, AXES, SWORDS, TAMING, UNARMED);
|
||||||
public static final List<SkillType> GATHERING_SKILLS = ImmutableList.of(EXCAVATION, FISHING, HERBALISM, MINING, WOODCUTTING);
|
public static final List<SkillType> GATHERING_SKILLS = ImmutableList.of(EXCAVATION, FISHING, HERBALISM, MINING, WOODCUTTING);
|
||||||
public static final List<SkillType> MISC_SKILLS = ImmutableList.of(ACROBATICS, REPAIR, SMELTING);
|
public static final List<SkillType> MISC_SKILLS = ImmutableList.of(ACROBATICS, ALCHEMY, REPAIR, SMELTING);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
List<SkillType> childSkills = new ArrayList<SkillType>();
|
List<SkillType> childSkills = new ArrayList<SkillType>();
|
||||||
@@ -85,18 +88,16 @@ public enum SkillType {
|
|||||||
NON_CHILD_SKILLS = ImmutableList.copyOf(nonChildSkills);
|
NON_CHILD_SKILLS = ImmutableList.copyOf(nonChildSkills);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor) {
|
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, List<SecondaryAbility> secondaryAbilities) {
|
||||||
this.managerClass = managerClass;
|
this(managerClass, runescapeColor, null, null, secondaryAbilities);
|
||||||
this.runescapeColor = runescapeColor;
|
|
||||||
ability = null;
|
|
||||||
tool = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, AbilityType ability, ToolType tool) {
|
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, AbilityType ability, ToolType tool, List<SecondaryAbility> secondaryAbilities) {
|
||||||
this.managerClass = managerClass;
|
this.managerClass = managerClass;
|
||||||
this.runescapeColor = runescapeColor;
|
this.runescapeColor = runescapeColor;
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
this.tool = tool;
|
this.tool = tool;
|
||||||
|
this.secondaryAbilities = secondaryAbilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends SkillManager> getManagerClass() {
|
public Class<? extends SkillManager> getManagerClass() {
|
||||||
@@ -148,6 +149,10 @@ public enum SkillType {
|
|||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SecondaryAbility> getSkillAbilities() {
|
||||||
|
return secondaryAbilities;
|
||||||
|
}
|
||||||
|
|
||||||
public double getXpModifier() {
|
public double getXpModifier() {
|
||||||
return ExperienceConfig.getInstance().getFormulaSkillModifier(this);
|
return ExperienceConfig.getInstance().getFormulaSkillModifier(this);
|
||||||
}
|
}
|
||||||
@@ -185,6 +190,15 @@ public enum SkillType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SkillType bySecondaryAbility(SecondaryAbility skillAbility) {
|
||||||
|
for (SkillType type : values()) {
|
||||||
|
if (type.getSkillAbilities().contains(skillAbility)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static SkillType byAbility(AbilityType ability) {
|
public static SkillType byAbility(AbilityType ability) {
|
||||||
for (SkillType type : values()) {
|
for (SkillType type : values()) {
|
||||||
if (type.getAbility() == ability) {
|
if (type.getAbility() == ability) {
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
package com.gmail.nossr50.datatypes.skills.alchemy;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
|
||||||
|
public class AlchemyPotion {
|
||||||
|
private short dataValue;
|
||||||
|
private String name;
|
||||||
|
private List<String> lore;
|
||||||
|
private List<PotionEffect> effects;
|
||||||
|
private Map<ItemStack, Short> children;
|
||||||
|
|
||||||
|
public AlchemyPotion(short dataValue, String name, List<String> lore, List<PotionEffect> effects, Map<ItemStack, Short> children) {
|
||||||
|
this.dataValue = dataValue;
|
||||||
|
this.lore = lore;
|
||||||
|
this.name = name;
|
||||||
|
this.effects = effects;
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return "AlchemyPotion{" + dataValue + ", " + name + ", Effects[" + effects.size() + "], Children[" + children.size() + "]}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack toItemStack(int amount) {
|
||||||
|
ItemStack potion = new ItemStack(Material.POTION, amount, this.getDataValue());
|
||||||
|
PotionMeta meta = (PotionMeta) potion.getItemMeta();
|
||||||
|
|
||||||
|
if (this.getName() != null) {
|
||||||
|
meta.setDisplayName(this.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.getLore() != null && !this.getLore().isEmpty()) {
|
||||||
|
meta.setLore(this.getLore());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.getEffects().isEmpty()) {
|
||||||
|
for (PotionEffect effect : this.getEffects()) {
|
||||||
|
meta.addCustomEffect(effect, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
potion.setItemMeta(meta);
|
||||||
|
return potion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public short getDataValue() {
|
||||||
|
return dataValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataValue(short data_value) {
|
||||||
|
this.dataValue = data_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getLore() {
|
||||||
|
return lore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLore(List<String> lore) {
|
||||||
|
this.lore = lore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PotionEffect> getEffects() {
|
||||||
|
return effects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEffects(List<PotionEffect> effects) {
|
||||||
|
this.effects = effects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ItemStack, Short> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(Map<ItemStack, Short> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Short getChildDataValue(ItemStack ingredient) {
|
||||||
|
if (!children.isEmpty()) {
|
||||||
|
for (Entry<ItemStack, Short> child : children.entrySet()) {
|
||||||
|
if (ingredient.isSimilar(child.getKey())) {
|
||||||
|
return child.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,4 +17,4 @@ public enum Rarity {
|
|||||||
return COMMON;
|
return COMMON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.gmail.nossr50.events.party;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
|
|
||||||
|
public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancellable {
|
||||||
|
private String oldAlly;
|
||||||
|
private String newAlly;
|
||||||
|
private EventReason reason;
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
|
public McMMOPartyAllianceChangeEvent(Player player, String oldAlly, String newAlly, EventReason reason) {
|
||||||
|
super(player);
|
||||||
|
|
||||||
|
if (newAlly != null) {
|
||||||
|
newAlly = newAlly.replace(":", ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.oldAlly = oldAlly;
|
||||||
|
this.newAlly = newAlly;
|
||||||
|
this.reason = reason;
|
||||||
|
this.cancelled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The party being left, or null if the player was not in a party
|
||||||
|
*/
|
||||||
|
public String getOldAlly() {
|
||||||
|
return oldAlly;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The party being joined, or null if the player is not joining a new party
|
||||||
|
*/
|
||||||
|
public String getNewAlly() {
|
||||||
|
return newAlly;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The reason for the event being fired
|
||||||
|
*/
|
||||||
|
public EventReason getReason() {
|
||||||
|
return reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of reasons why the event may have been fired
|
||||||
|
*/
|
||||||
|
public enum EventReason {
|
||||||
|
/**
|
||||||
|
* Formed an alliance for the first time.
|
||||||
|
*/
|
||||||
|
FORMED_ALLIANCE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Left a party and did not join a new one.
|
||||||
|
*/
|
||||||
|
DISBAND_ALLIANCE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any reason that doesn't fit elsewhere.
|
||||||
|
*/
|
||||||
|
CUSTOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Following are required for Cancellable **/
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancelled) {
|
||||||
|
this.cancelled = cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Rest of file is required boilerplate for custom events **/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.gmail.nossr50.events.party;
|
||||||
|
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
|
||||||
|
public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
||||||
|
private Party party;
|
||||||
|
private int levelsChanged;
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
|
public McMMOPartyLevelUpEvent(Party party, int levelsChanged) {
|
||||||
|
this.party = party;
|
||||||
|
this.levelsChanged = levelsChanged;
|
||||||
|
this.cancelled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Party getParty() {
|
||||||
|
return party;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevelsChanged() {
|
||||||
|
return levelsChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevelsChanged(int levelsChanged) {
|
||||||
|
this.levelsChanged = levelsChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Following are required for Cancellable **/
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancelled) {
|
||||||
|
this.cancelled = cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Rest of file is required boilerplate for custom events **/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user