mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 01:42:32 +01:00
Compare commits
276 Commits
dev-comman
...
dev-alchem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f4096cf1d | ||
|
|
28a846e0cb | ||
|
|
0185a30ec9 | ||
|
|
38e1947302 | ||
|
|
4fb4d6fc0c | ||
|
|
6d719988bf | ||
|
|
b1c1f0e21e | ||
|
|
3f34cc7365 | ||
|
|
3c6c2837bd | ||
|
|
4bcef76fd8 | ||
|
|
2fd5d7aa81 | ||
|
|
5080c68dce | ||
|
|
3403aef37d | ||
|
|
53a34c12d2 | ||
|
|
59417d6721 | ||
|
|
93d63dbca5 | ||
|
|
4643cf1070 | ||
|
|
91bf54019e | ||
|
|
ead716ef0d | ||
|
|
8fec1af257 | ||
|
|
99248caba3 | ||
|
|
af64bdf742 | ||
|
|
66a4925371 | ||
|
|
8eb6acd60f | ||
|
|
ce6892f2e6 | ||
|
|
c14a4e9305 | ||
|
|
5825eb1696 | ||
|
|
bfebbd0095 | ||
|
|
b204507a82 | ||
|
|
9f53426511 | ||
|
|
03c2282c3f | ||
|
|
20092d55fd | ||
|
|
69a2a5cfff | ||
|
|
618cfad100 | ||
|
|
56e625a9df | ||
|
|
79a1ef5d3e | ||
|
|
10dd7619bf | ||
|
|
f9dfec5bd0 | ||
|
|
a9488bc18b | ||
|
|
f0ee708710 | ||
|
|
3390a31cc6 | ||
|
|
0b4b272223 | ||
|
|
8d200ea653 | ||
|
|
eb359c5595 | ||
|
|
e1b8088c17 | ||
|
|
70a1eea231 | ||
|
|
c744974192 | ||
|
|
faa11a87a9 | ||
|
|
91da5c4ab1 | ||
|
|
da5e770e06 | ||
|
|
09557e378b | ||
|
|
72d26fed0f | ||
|
|
225de799e8 | ||
|
|
334c44760f | ||
|
|
ac7fc1020d | ||
|
|
461871327b | ||
|
|
60ddd799de | ||
|
|
80571fbe8f | ||
|
|
d407f85704 | ||
|
|
458dc7db42 | ||
|
|
beab794c0e | ||
|
|
8256f5461c | ||
|
|
0fe3ad7432 | ||
|
|
04e5dda127 | ||
|
|
f65adea2f9 | ||
|
|
cdfb0da5c9 | ||
|
|
cfa3d34dff | ||
|
|
01b7d4f742 | ||
|
|
9a359bf42c | ||
|
|
ebdf11300b | ||
|
|
e1a8f02bce | ||
|
|
862d38b587 | ||
|
|
2415767c06 | ||
|
|
aa59348a94 | ||
|
|
9c925d3327 | ||
|
|
30f7521a3a | ||
|
|
7b3869e385 | ||
|
|
0e641f7c5b | ||
|
|
733d16cf35 | ||
|
|
833bc1b251 | ||
|
|
840f3d9382 | ||
|
|
34d6d867f2 | ||
|
|
e56d5a0454 | ||
|
|
53fdf750f4 | ||
|
|
f096e915cf | ||
|
|
ce59488e8e | ||
|
|
47db522cc1 | ||
|
|
a2cac82cba | ||
|
|
2e74333eb7 | ||
|
|
0056be2d5f | ||
|
|
1d7e034d5e | ||
|
|
8deac175d1 | ||
|
|
d0b766a2d3 | ||
|
|
65692f2a83 | ||
|
|
d0b0786284 | ||
|
|
87ac1002de | ||
|
|
c51fde7f1f | ||
|
|
0a6735110f | ||
|
|
8a284c50a2 | ||
|
|
09431ef27c | ||
|
|
9f9de86d21 | ||
|
|
d9c04a09ba | ||
|
|
04a02cfdc8 | ||
|
|
b3a6c32ef6 | ||
|
|
254f3b5ac9 | ||
|
|
7f9ada14c8 | ||
|
|
f79a4741cc | ||
|
|
f3fd48d0c0 | ||
|
|
fbee3318bd | ||
|
|
813f807876 | ||
|
|
0060a86b20 | ||
|
|
15743c5f46 | ||
|
|
4b9d472f10 | ||
|
|
988006f913 | ||
|
|
2f05c472ce | ||
|
|
5c836cdaaf | ||
|
|
9e39c3495d | ||
|
|
b653aa57b7 | ||
|
|
2ffdd340af | ||
|
|
d63c3fc6d0 | ||
|
|
4486261413 | ||
|
|
a2e32179bb | ||
|
|
72b106e71f | ||
|
|
679f1ed629 | ||
|
|
734815c58d | ||
|
|
abfedf381d | ||
|
|
8e040ae8d9 | ||
|
|
0c9836eb03 | ||
|
|
62b13a9a84 | ||
|
|
c48ccae484 | ||
|
|
6264bfa15f | ||
|
|
b50ba9c02e | ||
|
|
b3474c04c7 | ||
|
|
a1c1271d21 | ||
|
|
79155887b0 | ||
|
|
4178604833 | ||
|
|
d1fcd6958f | ||
|
|
f39623c279 | ||
|
|
520f5cb116 | ||
|
|
43e2c813d1 | ||
|
|
c6ea32f0b0 | ||
|
|
976c3b8494 | ||
|
|
f3db90b6a9 | ||
|
|
82509fb476 | ||
|
|
c27d79cf25 | ||
|
|
de912c1e07 | ||
|
|
2159aa91ff | ||
|
|
748dba41dc | ||
|
|
9349416326 | ||
|
|
3b794c897d | ||
|
|
b460f7a564 | ||
|
|
383b048fef | ||
|
|
243a3bfbf6 | ||
|
|
c108a475e3 | ||
|
|
6b653fa606 | ||
|
|
818962e668 | ||
|
|
c729297615 | ||
|
|
e6e90954a9 | ||
|
|
4e86f60fd2 | ||
|
|
27ff545d46 | ||
|
|
7c891e9ba8 | ||
|
|
6143003516 | ||
|
|
8f83e328b0 | ||
|
|
9afa8efd7d | ||
|
|
393d9ca74e | ||
|
|
97c95c1c49 | ||
|
|
491df2cc82 | ||
|
|
b4a6ecc58c | ||
|
|
103bf593f3 | ||
|
|
0332c0f5e0 | ||
|
|
a004d6976d | ||
|
|
730f786d5b | ||
|
|
8993c71577 | ||
|
|
cc524bb2ab | ||
|
|
2e94eecda0 | ||
|
|
2466270b22 | ||
|
|
54a514edfa | ||
|
|
1336aeaef0 | ||
|
|
3c078100e8 | ||
|
|
13a623ea1f | ||
|
|
05b21eae5f | ||
|
|
e0358d42d6 | ||
|
|
26174d88f4 | ||
|
|
c12d4319ac | ||
|
|
a87bd14342 | ||
|
|
d5990eee71 | ||
|
|
f94343f13b | ||
|
|
ea4c424e0f | ||
|
|
f99e5e015d | ||
|
|
56b57da077 | ||
|
|
4b402d9837 | ||
|
|
6c2b1f555f | ||
|
|
cdcda03e92 | ||
|
|
65aa05a660 | ||
|
|
7c7aa994a5 | ||
|
|
2aec4a69ea | ||
|
|
06c9ea7068 | ||
|
|
c88583c1c0 | ||
|
|
d2b6838453 | ||
|
|
c9f1f8f662 | ||
|
|
7a08343304 | ||
|
|
3b1bb3e08a | ||
|
|
07cafd4866 | ||
|
|
48821a710f | ||
|
|
30a1b333b9 | ||
|
|
696bf71962 | ||
|
|
2d577e92f1 | ||
|
|
86b92b5b30 | ||
|
|
24c1dec046 | ||
|
|
6c478a26c4 | ||
|
|
2d3da6daf8 | ||
|
|
de3b2b8024 | ||
|
|
02a064ffc6 | ||
|
|
cb5303ce4d | ||
|
|
c0dee19cb0 | ||
|
|
870987bba7 | ||
|
|
5d63a4b910 | ||
|
|
3236ee5ec9 | ||
|
|
12ed2ac07b | ||
|
|
729f3b1df9 | ||
|
|
ee1be3599c | ||
|
|
12a6aca8cd | ||
|
|
2b81b8daeb | ||
|
|
5edbdec151 | ||
|
|
eaa38c11b8 | ||
|
|
e904e34556 | ||
|
|
445f805bb8 | ||
|
|
df77b9d0ed | ||
|
|
29f2525b58 | ||
|
|
5a68c7a335 | ||
|
|
69ef7f40d8 | ||
|
|
d1d6b80676 | ||
|
|
dfe83ff497 | ||
|
|
e5acf6d936 | ||
|
|
bca0ca6766 | ||
|
|
f17b5faaf6 | ||
|
|
f20fa571f1 | ||
|
|
b90d1c31c7 | ||
|
|
cf56ca35eb | ||
|
|
c31f5b5782 | ||
|
|
af98c8eb59 | ||
|
|
3a10b2d83c | ||
|
|
32e7c48fd8 | ||
|
|
af578870c7 | ||
|
|
cd470d5497 | ||
|
|
a9c5e2a04f | ||
|
|
0196fd8447 | ||
|
|
b1458840e7 | ||
|
|
1fea786669 | ||
|
|
6f9a57751e | ||
|
|
2e1c585005 | ||
|
|
811626e67b | ||
|
|
cdfd81a67a | ||
|
|
408b8b2107 | ||
|
|
6d5f3a52f4 | ||
|
|
2cdf08de9f | ||
|
|
71141a0f8d | ||
|
|
bded936af5 | ||
|
|
caaac232d7 | ||
|
|
a9d51dad34 | ||
|
|
88296da0af | ||
|
|
de3c4f8fd7 | ||
|
|
1785bab504 | ||
|
|
41da32cd1b | ||
|
|
93d586592e | ||
|
|
d6c6c75157 | ||
|
|
4889769522 | ||
|
|
6c70de6a58 | ||
|
|
fd9154e009 | ||
|
|
97b9214d6e | ||
|
|
a8d1376533 | ||
|
|
3be443c63c | ||
|
|
cc2c9eb21d | ||
|
|
9b3ae5c729 | ||
|
|
ccb7fc5886 | ||
|
|
60d69e3cc4 |
@@ -7,9 +7,92 @@ Key:
|
||||
! Change
|
||||
- Removal
|
||||
|
||||
Version 1.4.08-dev
|
||||
Version 1.5.01-dev
|
||||
+ Added new child skill; Salvage
|
||||
+ Added new feature to Herbalism. Instantly-regrown crops are protected from being broken for 1 second
|
||||
+ Added option to config.yml to show the /mcstats scoreboard automatically after logging in
|
||||
+ Added option to config.yml for Alchemy. Skills.Alchemy.Prevent_Hopper_Transfer_Bottles
|
||||
+ Added support for `MATERIAL|data` format in treasures.yml
|
||||
+ Added API to experience events to get XP gain reason
|
||||
+ Added API to check if an entity is bleeding
|
||||
= Fixed bug where the Updater was running on the main thread.
|
||||
= Fixed bug when players would use /ptp without being in a party
|
||||
= Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent
|
||||
= Fixed bug where dodge would check the wrong player skill level
|
||||
= Fixed bug which causes /party teleport to stop working
|
||||
= Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
|
||||
! Changed player data saving. Save tasks are now asynchronous
|
||||
! Vanished players no longer get hit by AoE effects
|
||||
! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
|
||||
! Changed Alchemy XP distribution. XP is granted based on the stage of the potion.
|
||||
- Removed salvage ability from Repair, salvage has it's own (child) skill now
|
||||
|
||||
Version 1.5.00
|
||||
+ Added Podzol & Red Sand to Excavation
|
||||
+ Added Hardened Clay, Stained Clay, and Packed Ice to Mining blocks
|
||||
+ Added Acacia and Dark Oak to Woodcutting blocks
|
||||
+ Added Salmon, Clownfish, and Pufferfish to Fishing XP
|
||||
+ Added new flowers and grasses to Herbalism XP
|
||||
+ Added option to config.yml which allows players to always catch fish, even when a treasure is found
|
||||
+ Added option to config.yml to override vanilla Minecraft treasures
|
||||
! Fishing XP now depends on the type of fish.
|
||||
! Woodcutting XP in experience.yml and Woodcutting double drops in config.yml now use the tree species names. Oak is now Generic, and Spruce is now Redwood.
|
||||
! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly.
|
||||
- Removed deprecated permission nodes
|
||||
- Removed "Treasure found!" message
|
||||
|
||||
Version 1.4.08
|
||||
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
||||
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
||||
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||
+ Added config options to disable various sound effects
|
||||
+ Smelting now works with custom ores - add smelting XP value to blocks.yml, or it will default to 1/10th of normal XP.
|
||||
+ Added automatic cleanup of backups folder.
|
||||
+ Added bypass permission for finding Fishing traps
|
||||
+ Added level threshold settings to hardcore modes. When a players skill level is below this threshold, they will not lose any stats
|
||||
+ Added party alliances, two parties can now team up. Allies share party chat and cannot harm each other.
|
||||
+ Added new experience bonus perk 'mcmmo.perks.xp.10percentboost.<skillname>' multiplies incoming XP by 1.1
|
||||
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
||||
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
||||
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
||||
+ Added config options to configure the items used in "Call of the Wild"
|
||||
+ Added config option to configure the database command cooldown
|
||||
= Fixed bug where healthbars wouldn't display if skills were disabled
|
||||
= Fixed bug with "Call of the Wild" entities despawning
|
||||
= Fixed bug with updating (very) old user data.
|
||||
= Fixed bug with checking maximum durability of mod items.
|
||||
= Fixed exploit involving Call of The Wild.
|
||||
= Fixed bug where LeafBlower permissions were ignored
|
||||
= Fixed bug with toggle commands not properly displaying the success message.
|
||||
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||
= Fixed bug with Salvage not reading the config value for the anvil material.
|
||||
= Fixed exploit where you could receive smelting XP for improper items
|
||||
= Fixed bug where the Unbreaking enchantment was ignored when using "Super Breaker" or "Giga Drill Breaker"
|
||||
= Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
||||
= Fixed bug where cooldown donor perks were reducing more than expected
|
||||
= Fixed bug where disabling hardcore mode for specific skills didn't work
|
||||
= Fixed bug which caused the backup cleanup to delete old backups while it should have kept those
|
||||
= Fixed bug where party chat broke if the display name contained special characters
|
||||
= Fixed bug where `/addlevels all` and `/skillreset all` didn't work
|
||||
= Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
|
||||
= Fixed bug where some horses summoned with "Call of the Wild" were unable to jump
|
||||
= Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command
|
||||
= Fixed bug where Hylian Luck was broken
|
||||
= Fixed bug where Snow would never drop treasures
|
||||
= Fixed issues with commands giving away vanished players.
|
||||
= Fixed bug where the Repair lucky perk would increase the Arcane Forging downgrade chance, instead of decreasing it
|
||||
! Changed party system. Parties now have XP and Levels. Party features such as party teleport and party chat have to be unlocked before they can be used by the party members
|
||||
! Changed appearance of party member list. Gold = party leader, White = online, Gray = offline, Italic = not nearby
|
||||
! Updated localization files
|
||||
! Changed the appearance of /mcmmo commands
|
||||
! Changed AxesCritical to CriticalHit in config file
|
||||
! Changed several secondary ability permissions(deprecated versions still exist)
|
||||
! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
|
||||
! Changed config validation for UnlockLevels, they can now also be 0
|
||||
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
||||
! Changed default amount of XP gained from mining Quartz Ore. From 250 to 100 XP.
|
||||
! Changed Acrobatics config setting, Skills.Acrobatics.Prevent_XP_After_Teleport is now Skills.Acrobatics.XP_After_Teleport_Cooldown
|
||||
- Removed /stats alias for /mcstats
|
||||
|
||||
Version 1.4.07
|
||||
+ Added XP boost to Acrobatics when wearing Boots of Feather Falling
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Our latest development builds are available ~~[here](http://ci.mcmmo.info)~~. Unfortunately, the mcMMO site is down; a temporary dev build location is hosted [here](http://ci.ecocitycraft.com/job/mcMMO/).
|
||||
|
||||
### Brief Description
|
||||
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds thirteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds fourteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||
|
||||
## About the Team
|
||||
|
||||
@@ -32,9 +32,14 @@ mcMMO is currently developed by a team of individuals from all over the world.
|
||||
[]
|
||||
(https://github.com/riking)
|
||||
|
||||
### Special thanks
|
||||
[]
|
||||
(https://github.com/EasyMFnE)
|
||||
Added the Alchemy skill
|
||||
|
||||
## Compiling
|
||||
|
||||
mcMMO uses Maven 3 to manage dependancies, packaging, and shading of necessary classes; Maven 3 is required to compile mcMMO.
|
||||
mcMMO uses Maven 3 to manage dependencies, packaging, and shading of necessary classes; Maven 3 is required to compile mcMMO.
|
||||
|
||||
The typical command used to build mcMMO is: `mvn clean package install`
|
||||
|
||||
|
||||
439
extras/mods/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
|
||||
14
pom.xml
14
pom.xml
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>1.4.08-dev1</version>
|
||||
<version>1.5.01-SNAPSHOT</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<issueManagement>
|
||||
@@ -108,6 +108,10 @@
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>md_5-releases</id>
|
||||
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>Plugin MetricsExtension</id>
|
||||
<url>http://repo.turt2live.com</url>
|
||||
@@ -135,9 +139,13 @@
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>mcmmo-repo</id>
|
||||
<url>file:///var/lib/jenkins/repo</url>
|
||||
<id>md_5-releases</id>
|
||||
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>md_5-snapshots</id>
|
||||
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.gmail.nossr50.api;
|
||||
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public final class AbilityAPI {
|
||||
@@ -50,34 +52,38 @@ public final class AbilityAPI {
|
||||
}
|
||||
|
||||
public static void resetCooldowns(Player player) {
|
||||
UserManager.getPlayer(player).getProfile().resetCooldowns();
|
||||
UserManager.getPlayer(player).resetCooldowns();
|
||||
}
|
||||
|
||||
public static void setBerserkCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.BERSERK, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.BERSERK, cooldown);
|
||||
}
|
||||
|
||||
public static void setGigaDrillBreakerCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.GIGA_DRILL_BREAKER, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.GIGA_DRILL_BREAKER, cooldown);
|
||||
}
|
||||
|
||||
public static void setGreenTerraCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.GREEN_TERRA, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.GREEN_TERRA, cooldown);
|
||||
}
|
||||
|
||||
public static void setSerratedStrikesCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SERRATED_STRIKES, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.SERRATED_STRIKES, cooldown);
|
||||
}
|
||||
|
||||
public static void setSkullSplitterCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SKULL_SPLITTER, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.SKULL_SPLITTER, cooldown);
|
||||
}
|
||||
|
||||
public static void setSuperBreakerCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SUPER_BREAKER, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.SUPER_BREAKER, cooldown);
|
||||
}
|
||||
|
||||
public static void setTreeFellerCooldown(Player player, long cooldown) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.TREE_FELLER, cooldown);
|
||||
UserManager.getPlayer(player).setAbilityDATS(AbilityType.TREE_FELLER, cooldown);
|
||||
}
|
||||
|
||||
public static boolean isBleeding(LivingEntity entity) {
|
||||
return BleedTimerTask.isBleeding(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public final class ChatAPI {
|
||||
* @return true if the player is using party chat, false otherwise
|
||||
*/
|
||||
public static boolean isUsingPartyChat(Player player) {
|
||||
return UserManager.getPlayer(player).getPartyChatMode();
|
||||
return UserManager.getPlayer(player).isChatEnabled(ChatMode.PARTY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ public final class ChatAPI {
|
||||
* @return true if the player is using party chat, false otherwise
|
||||
*/
|
||||
public static boolean isUsingPartyChat(String playerName) {
|
||||
return UserManager.getPlayer(playerName).getPartyChatMode();
|
||||
return UserManager.getPlayer(playerName).isChatEnabled(ChatMode.PARTY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ public final class ChatAPI {
|
||||
* @return true if the player is using admin chat, false otherwise
|
||||
*/
|
||||
public static boolean isUsingAdminChat(Player player) {
|
||||
return UserManager.getPlayer(player).getAdminChatMode();
|
||||
return UserManager.getPlayer(player).isChatEnabled(ChatMode.ADMIN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ public final class ChatAPI {
|
||||
* @return true if the player is using admin chat, false otherwise
|
||||
*/
|
||||
public static boolean isUsingAdminChat(String playerName) {
|
||||
return UserManager.getPlayer(playerName).getAdminChatMode();
|
||||
return UserManager.getPlayer(playerName).isChatEnabled(ChatMode.ADMIN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,7 +115,7 @@ public final class ChatAPI {
|
||||
* @param player The player to toggle party chat on.
|
||||
*/
|
||||
public static void togglePartyChat(Player player) {
|
||||
UserManager.getPlayer(player).togglePartyChat();
|
||||
UserManager.getPlayer(player).toggleChat(ChatMode.PARTY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +124,7 @@ public final class ChatAPI {
|
||||
* @param playerName The name of the player to toggle party chat on.
|
||||
*/
|
||||
public static void togglePartyChat(String playerName) {
|
||||
UserManager.getPlayer(playerName).togglePartyChat();
|
||||
UserManager.getPlayer(playerName).toggleChat(ChatMode.PARTY);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +133,7 @@ public final class ChatAPI {
|
||||
* @param player The player to toggle admin chat on.
|
||||
*/
|
||||
public static void toggleAdminChat(Player player) {
|
||||
UserManager.getPlayer(player).toggleAdminChat();
|
||||
UserManager.getPlayer(player).toggleChat(ChatMode.ADMIN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ public final class ChatAPI {
|
||||
* @param playerName The name of the player to toggle party chat on.
|
||||
*/
|
||||
public static void toggleAdminChat(String playerName) {
|
||||
UserManager.getPlayer(playerName).toggleAdminChat();
|
||||
UserManager.getPlayer(playerName).toggleChat(ChatMode.ADMIN);
|
||||
}
|
||||
|
||||
private static ChatManager getPartyChatManager(Plugin plugin, String party) {
|
||||
|
||||
@@ -7,10 +7,12 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
||||
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -43,9 +45,7 @@ public final class ExperienceAPI {
|
||||
public static boolean isNonChildSkill(String skillType) {
|
||||
SkillType skill = SkillType.getSkill(skillType);
|
||||
|
||||
if (skill == null) return false;
|
||||
|
||||
return !skill.isChildSkill();
|
||||
return skill != null && !skill.isChildSkill();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -64,8 +64,26 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addRawXP(Player player, String skillType, float XP) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP);
|
||||
addRawXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds raw XP to the player.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addRawXP(Player player, String skillType, float XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -100,8 +118,26 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addMultipliedXP(Player player, String skillType, int XP) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||
addMultipliedXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate only.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addMultipliedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,10 +167,28 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addModifiedXP(Player player, String skillType, int XP) {
|
||||
addModifiedXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate and skill modifier.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addModifiedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
SkillType skill = getSkillType(skillType);
|
||||
|
||||
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,8 +221,27 @@ public final class ExperienceAPI {
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addXP(Player player, String skillType, int XP) {
|
||||
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP);
|
||||
addXP(player, skillType, XP, "UNKNOWN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, calculates for XP Rate, skill modifiers, perks, child skills,
|
||||
* and party sharing.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to add XP to
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
* @param xpGainReason The reason to gain XP
|
||||
*
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||
*/
|
||||
public static void addXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,7 +257,7 @@ public final class ExperienceAPI {
|
||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||
*/
|
||||
public static int getXP(Player player, String skillType) {
|
||||
return UserManager.getPlayer(player).getProfile().getSkillXpLevel(getNonChildSkillType(skillType));
|
||||
return UserManager.getPlayer(player).getSkillXpLevel(getNonChildSkillType(skillType));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,7 +290,7 @@ public final class ExperienceAPI {
|
||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||
*/
|
||||
public static float getXPRaw(Player player, String skillType) {
|
||||
return UserManager.getPlayer(player).getProfile().getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||
return UserManager.getPlayer(player).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -250,7 +323,7 @@ public final class ExperienceAPI {
|
||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||
*/
|
||||
public static int getXPToNextLevel(Player player, String skillType) {
|
||||
return UserManager.getPlayer(player).getProfile().getXpToLevel(getNonChildSkillType(skillType));
|
||||
return UserManager.getPlayer(player).getXpToLevel(getNonChildSkillType(skillType));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -323,7 +396,7 @@ public final class ExperienceAPI {
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
public static void addLevel(Player player, String skillType, int levels) {
|
||||
UserManager.getPlayer(player).getProfile().addLevels(getSkillType(skillType), levels);
|
||||
UserManager.getPlayer(player).addLevels(getSkillType(skillType), levels);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,12 +422,12 @@ public final class ExperienceAPI {
|
||||
profile.addLevels(parentSkill, (levels / parentSkills.size()));
|
||||
}
|
||||
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
profile.addLevels(skill, levels);
|
||||
profile.save();
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,7 +442,7 @@ public final class ExperienceAPI {
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
public static int getLevel(Player player, String skillType) {
|
||||
return UserManager.getPlayer(player).getProfile().getSkillLevel(getSkillType(skillType));
|
||||
return UserManager.getPlayer(player).getSkillLevel(getSkillType(skillType));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,7 +565,7 @@ public final class ExperienceAPI {
|
||||
* @throws InvalidSkillException if the given skill is not valid
|
||||
*/
|
||||
public static void setLevel(Player player, String skillType, int skillLevel) {
|
||||
UserManager.getPlayer(player).getProfile().modifySkill(getSkillType(skillType), skillLevel);
|
||||
UserManager.getPlayer(player).modifySkill(getSkillType(skillType), skillLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -524,7 +597,7 @@ public final class ExperienceAPI {
|
||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||
*/
|
||||
public static void setXP(Player player, String skillType, int newValue) {
|
||||
UserManager.getPlayer(player).getProfile().setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||
UserManager.getPlayer(player).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -557,7 +630,7 @@ public final class ExperienceAPI {
|
||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||
*/
|
||||
public static void removeXP(Player player, String skillType, int xp) {
|
||||
UserManager.getPlayer(player).getProfile().removeXp(getNonChildSkillType(skillType), xp);
|
||||
UserManager.getPlayer(player).removeXp(getNonChildSkillType(skillType), xp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -582,19 +655,8 @@ public final class ExperienceAPI {
|
||||
private static void addOfflineXP(String playerName, SkillType skill, int XP) {
|
||||
PlayerProfile profile = getOfflineProfile(playerName);
|
||||
|
||||
if (skill.isChildSkill()) {
|
||||
Set<SkillType> parentSkills = FamilyTree.getParents(skill);
|
||||
|
||||
for (SkillType parentSkill : parentSkills) {
|
||||
profile.setSkillXpLevel(parentSkill, profile.getSkillLevel(parentSkill) + (XP / parentSkills.size()));
|
||||
}
|
||||
|
||||
profile.save();
|
||||
return;
|
||||
}
|
||||
|
||||
profile.setSkillXpLevel(skill, profile.getSkillXpLevel(skill) + XP);
|
||||
profile.save();
|
||||
profile.addXp(skill, XP);
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
|
||||
private static PlayerProfile getOfflineProfile(String playerName) {
|
||||
@@ -626,4 +688,14 @@ public final class ExperienceAPI {
|
||||
|
||||
return skill;
|
||||
}
|
||||
|
||||
private static XPGainReason getXPGainReason(String reason) throws InvalidXPGainReasonException {
|
||||
XPGainReason xpGainReason = XPGainReason.getXPGainReason(reason);
|
||||
|
||||
if (xpGainReason == null) {
|
||||
throw new InvalidXPGainReasonException();
|
||||
}
|
||||
|
||||
return xpGainReason;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,4 +174,17 @@ public final class PartyAPI {
|
||||
public static List<Player> getOnlineMembers(Player player) {
|
||||
return PartyManager.getOnlineMembers(player);
|
||||
}
|
||||
|
||||
public static boolean hasAlly(String partyName) {
|
||||
return getAllyName(partyName) != null;
|
||||
}
|
||||
|
||||
public static String getAllyName(String partyName) {
|
||||
Party ally = PartyManager.getParty(partyName).getAlly();
|
||||
if (ally != null) {
|
||||
return ally.getName();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.gmail.nossr50.api.exceptions;
|
||||
|
||||
public class InvalidXPGainReasonException extends RuntimeException {
|
||||
private static final long serialVersionUID = 4427052841957931157L;
|
||||
|
||||
public InvalidXPGainReasonException() {
|
||||
super("That is not a valid XPGainReason.");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.gmail.nossr50.chat;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -7,6 +10,7 @@ import org.bukkit.plugin.Plugin;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
|
||||
public class PartyChatManager extends ChatManager {
|
||||
private Party party;
|
||||
@@ -27,13 +31,20 @@ public class PartyChatManager extends ChatManager {
|
||||
@Override
|
||||
protected void sendMessage() {
|
||||
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||
message = message.replaceFirst(displayName, ChatColor.GOLD + displayName + ChatColor.RESET);
|
||||
message = message.replaceFirst(Pattern.quote(displayName), ChatColor.GOLD + Matcher.quoteReplacement(displayName) + ChatColor.RESET);
|
||||
}
|
||||
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,13 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -32,7 +29,7 @@ public class KrakenCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
UserManager.getPlayer((Player) sender).getFishingManager().unleashTheKraken();
|
||||
UserManager.getPlayer(sender.getName()).getFishingManager().unleashTheKraken();
|
||||
return true;
|
||||
|
||||
case 1:
|
||||
@@ -41,7 +38,7 @@ public class KrakenCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||
@@ -60,7 +57,7 @@ public class KrakenCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
@@ -17,13 +18,13 @@ public class McabilityCommand extends ToggleCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyCommandAction() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Ability." + (mcMMOPlayer.getAbilityUse() ? "Off" : "On")));
|
||||
protected void applyCommandAction(McMMOPlayer mcMMOPlayer) {
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.Ability." + (mcMMOPlayer.getAbilityUse() ? "Off" : "On")));
|
||||
mcMMOPlayer.toggleAbilityUse();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendSuccessMessage(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Ability.Toggle"));
|
||||
protected void sendSuccessMessage(CommandSender sender, String playerName) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Ability.Toggle", playerName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.gmail.nossr50.commands.database;
|
||||
package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -11,6 +11,7 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.database.ConvertDatabaseCommand;
|
||||
import com.gmail.nossr50.commands.experience.ConvertExperienceCommand;
|
||||
import com.gmail.nossr50.database.DatabaseManagerFactory;
|
||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||
@@ -23,23 +24,17 @@ public class McconvertCommand implements TabExecutor {
|
||||
private static final List<String> DATABASE_TYPES;
|
||||
private static final List<String> SUBCOMMANDS = ImmutableList.of("database", "experience");
|
||||
|
||||
private CommandExecutor databaseConvertCommand = new ConvertDatabaseCommand();
|
||||
private CommandExecutor databaseConvertCommand = new ConvertDatabaseCommand();
|
||||
private CommandExecutor experienceConvertCommand = new ConvertExperienceCommand();
|
||||
|
||||
static {
|
||||
ArrayList<String> formulaTypes = new ArrayList<String>();
|
||||
ArrayList<String> databaseTypes = new ArrayList<String>();
|
||||
|
||||
for (FormulaType type : FormulaType.values()) {
|
||||
formulaTypes.add(type.toString());
|
||||
}
|
||||
|
||||
Collections.sort(formulaTypes);
|
||||
FORMULA_TYPES = ImmutableList.copyOf(formulaTypes);
|
||||
}
|
||||
|
||||
static {
|
||||
ArrayList<String> databaseTypes = new ArrayList<String>();
|
||||
|
||||
for (DatabaseType type : DatabaseType.values()) {
|
||||
databaseTypes.add(type.toString());
|
||||
}
|
||||
@@ -51,8 +46,12 @@ public class McconvertCommand implements TabExecutor {
|
||||
databaseTypes.add(DatabaseManagerFactory.getCustomDatabaseManagerClass().getName());
|
||||
}
|
||||
|
||||
Collections.sort(formulaTypes);
|
||||
Collections.sort(databaseTypes);
|
||||
|
||||
FORMULA_TYPES = ImmutableList.copyOf(formulaTypes);
|
||||
DATABASE_TYPES = ImmutableList.copyOf(databaseTypes);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2,6 +2,7 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
@@ -17,13 +18,13 @@ public class McgodCommand extends ToggleCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyCommandAction() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.GodMode." + (mcMMOPlayer.getGodMode() ? "Disabled" : "Enabled")));
|
||||
protected void applyCommandAction(McMMOPlayer mcMMOPlayer) {
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.GodMode." + (mcMMOPlayer.getGodMode() ? "Disabled" : "Enabled")));
|
||||
mcMMOPlayer.toggleGodMode();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendSuccessMessage(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.GodMode.Success"));
|
||||
protected void sendSuccessMessage(CommandSender sender, String playerName) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.GodMode.Toggle", playerName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.HolidayManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class McmmoCommand implements CommandExecutor {
|
||||
@@ -31,8 +30,11 @@ public class McmmoCommand implements CommandExecutor {
|
||||
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||
HolidayManager.anniversaryCheck(sender);
|
||||
if (Permissions.showversion(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||
}
|
||||
|
||||
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
||||
return true;
|
||||
|
||||
case 1:
|
||||
@@ -43,9 +45,9 @@ public class McmmoCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
|
||||
displayPartyCommands(sender);
|
||||
displayGeneralCommands(sender);
|
||||
displayOtherCommands(sender);
|
||||
|
||||
displayPartyCommands(sender);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -54,55 +56,57 @@ public class McmmoCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyCommands(CommandSender sender) {
|
||||
if (Permissions.party(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||
sender.sendMessage(" /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
||||
sender.sendMessage(" /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
||||
sender.sendMessage(" /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||
private void displayGeneralCommands(CommandSender sender) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||
|
||||
if (Permissions.partyChat(sender)) {
|
||||
sender.sendMessage(" /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||
}
|
||||
if (Permissions.inspect(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||
}
|
||||
|
||||
sender.sendMessage(" /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||
sender.sendMessage(" /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||
|
||||
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
||||
sender.sendMessage(" /party teleport " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||
}
|
||||
if (Permissions.mcability(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||
}
|
||||
}
|
||||
|
||||
private void displayOtherCommands(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
|
||||
sender.sendMessage(" /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||
sender.sendMessage(" /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||
|
||||
if (Permissions.skillreset(sender)) {
|
||||
sender.sendMessage(" /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||
}
|
||||
|
||||
if (Permissions.mcability(sender)) {
|
||||
sender.sendMessage(" /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||
}
|
||||
|
||||
if (Permissions.adminChat(sender)) {
|
||||
sender.sendMessage(" /adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||
}
|
||||
|
||||
if (Permissions.inspect(sender)) {
|
||||
sender.sendMessage(" /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||
}
|
||||
|
||||
if (Permissions.mmoedit(sender)) {
|
||||
sender.sendMessage(" /mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||
}
|
||||
|
||||
if (Permissions.adminChat(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||
}
|
||||
|
||||
if (Permissions.mcgod(sender)) {
|
||||
sender.sendMessage(" /mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||
}
|
||||
}
|
||||
|
||||
sender.sendMessage(" /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||
private void displayPartyCommands(CommandSender sender) {
|
||||
if (Permissions.party(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||
|
||||
if (Permissions.partyChat(sender)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||
|
||||
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
||||
sender.sendMessage(ChatColor.DARK_AQUA + " /party teleport <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
@@ -17,17 +18,17 @@ public class McrefreshCommand extends ToggleCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyCommandAction() {
|
||||
protected void applyCommandAction(McMMOPlayer mcMMOPlayer) {
|
||||
mcMMOPlayer.setRecentlyHurt(0);
|
||||
mcMMOPlayer.getProfile().resetCooldowns();
|
||||
mcMMOPlayer.resetCooldowns();
|
||||
mcMMOPlayer.resetToolPrepMode();
|
||||
mcMMOPlayer.resetAbilityMode();
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Refresh"));
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Ability.Generic.Refresh"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendSuccessMessage(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mcrefresh.Success", player.getName()));
|
||||
protected void sendSuccessMessage(CommandSender sender, String playerName) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mcrefresh.Success", playerName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
@@ -11,6 +12,7 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class McscoreboardCommand implements TabExecutor {
|
||||
|
||||
@@ -11,10 +11,10 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class MobhealthCommand implements TabExecutor {
|
||||
@@ -39,11 +39,9 @@ public class MobhealthCommand implements TabExecutor {
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
PlayerProfile playerProfile = UserManager.getPlayer((Player) sender).getProfile();
|
||||
|
||||
try {
|
||||
MobHealthbarType type = MobHealthbarType.valueOf(args[0].toUpperCase().trim());
|
||||
playerProfile.setMobHealthbarType(type);
|
||||
UserManager.getPlayer((Player) sender).getProfile().setMobHealthbarType(type);
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Healthbars.Changed." + type.name()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,25 +2,19 @@ package com.gmail.nossr50.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public abstract class ToggleCommand implements TabExecutor {
|
||||
protected McMMOPlayer mcMMOPlayer;
|
||||
protected Player player;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
@@ -34,10 +28,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
applyCommandAction();
|
||||
applyCommandAction(UserManager.getPlayer(sender.getName()));
|
||||
return true;
|
||||
|
||||
case 1:
|
||||
@@ -46,21 +37,19 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = mcMMOPlayer.getPlayer();
|
||||
|
||||
if (CommandUtils.isOffline(sender, player)) {
|
||||
if (CommandUtils.isOffline(sender, mcMMOPlayer.getPlayer())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
applyCommandAction();
|
||||
sendSuccessMessage(sender);
|
||||
applyCommandAction(mcMMOPlayer);
|
||||
sendSuccessMessage(sender, playerName);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -72,7 +61,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
@@ -81,6 +70,6 @@ public abstract class ToggleCommand implements TabExecutor {
|
||||
|
||||
protected abstract boolean hasOtherPermission(CommandSender sender);
|
||||
protected abstract boolean hasSelfPermission(CommandSender sender);
|
||||
protected abstract void applyCommandAction();
|
||||
protected abstract void sendSuccessMessage(CommandSender sender);
|
||||
protected abstract void applyCommandAction(McMMOPlayer mcMMOPlayer);
|
||||
protected abstract void sendSuccessMessage(CommandSender sender, String playerName);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,7 @@ import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class XprateCommand implements TabExecutor {
|
||||
private double originalRate;
|
||||
|
||||
public XprateCommand() {
|
||||
originalRate = ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier();
|
||||
}
|
||||
private final double ORIGINAL_XP_RATE = ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier();
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@@ -42,7 +38,7 @@ public class XprateCommand implements TabExecutor {
|
||||
mcMMO.p.toggleXpEventEnabled();
|
||||
}
|
||||
|
||||
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(originalRate);
|
||||
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(ORIGINAL_XP_RATE);
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
|
||||
@@ -12,7 +12,9 @@ import org.bukkit.util.StringUtil;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.chat.ChatManager;
|
||||
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
@@ -21,9 +23,8 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public abstract class ChatCommand implements TabExecutor {
|
||||
protected ChatMode chatMode;
|
||||
private ChatMode chatMode;
|
||||
protected ChatManager chatManager;
|
||||
private McMMOPlayer mcMMOPlayer;
|
||||
|
||||
public ChatCommand(ChatMode chatMode) {
|
||||
this.chatMode = chatMode;
|
||||
@@ -32,19 +33,21 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
McMMOPlayer mcMMOPlayer;
|
||||
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||
mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
|
||||
if (chatMode.isEnabled(mcMMOPlayer)) {
|
||||
disableChatMode(sender);
|
||||
if (mcMMOPlayer.isChatEnabled(chatMode)) {
|
||||
disableChatMode(mcMMOPlayer, sender);
|
||||
}
|
||||
else {
|
||||
enableChatMode(sender);
|
||||
enableChatMode(mcMMOPlayer, sender);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -55,9 +58,7 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||
|
||||
enableChatMode(sender);
|
||||
enableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -66,9 +67,7 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||
|
||||
disableChatMode(sender);
|
||||
disableChatMode(UserManager.getPlayer(sender.getName()), sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -108,23 +107,28 @@ public abstract class ChatCommand implements TabExecutor {
|
||||
|
||||
protected abstract void handleChatSending(CommandSender sender, String[] args);
|
||||
|
||||
private void enableChatMode(CommandSender sender) {
|
||||
private void enableChatMode(McMMOPlayer mcMMOPlayer, CommandSender sender) {
|
||||
if (chatMode == ChatMode.PARTY && mcMMOPlayer.getParty() == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return;
|
||||
}
|
||||
|
||||
chatMode.enable(mcMMOPlayer);
|
||||
if (chatMode == ChatMode.PARTY && (mcMMOPlayer.getParty().getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT))) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOPlayer.enableChat(chatMode);
|
||||
sender.sendMessage(chatMode.getEnabledMessage());
|
||||
}
|
||||
|
||||
private void disableChatMode(CommandSender sender) {
|
||||
private void disableChatMode(McMMOPlayer mcMMOPlayer, CommandSender sender) {
|
||||
if (chatMode == ChatMode.PARTY && mcMMOPlayer.getParty() == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return;
|
||||
}
|
||||
|
||||
chatMode.disable(mcMMOPlayer);
|
||||
mcMMOPlayer.disableChat(chatMode);
|
||||
sender.sendMessage(chatMode.getDisabledMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.chat.PartyChatManager;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -28,6 +30,11 @@ public class PartyChatCommand extends ChatCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.CHAT)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
message = buildChatMessage(args, 0);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.database;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -11,7 +10,6 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -22,9 +20,9 @@ public class McremoveCommand implements TabExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
|
||||
if (UserManager.getPlayer(playerName, true) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||
if (UserManager.getOfflinePlayer(playerName) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +44,7 @@ public class McremoveCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -15,19 +15,21 @@ import com.google.common.collect.ImmutableList;
|
||||
public class MmoshowdbCommand implements TabExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (args.length != 0) {
|
||||
return false;
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
Class<?> clazz = DatabaseManagerFactory.getCustomDatabaseManagerClass();
|
||||
|
||||
if (clazz != null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", clazz.getName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", (Config.getInstance().getUseMySQL() ? "sql" : "flatfile")));
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Class<?> clazz = DatabaseManagerFactory.getCustomDatabaseManagerClass();
|
||||
|
||||
if (clazz != null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", clazz.getName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", (Config.getInstance().getUseMySQL() ? "sql" : "flatfile")));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -19,24 +22,25 @@ public class AddlevelsCommand extends ExperienceCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleCommand(SkillType skill) {
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||
profile.addLevels(skill, value);
|
||||
|
||||
if (player == null) {
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true);
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageAll() {
|
||||
protected void handlePlayerMessageAll(Player player, int value) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", value));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageSkill() {
|
||||
protected void handlePlayerMessageSkill(Player player, int value, SkillType skill) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", value, skill.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class AddxpCommand extends ExperienceCommand {
|
||||
@Override
|
||||
@@ -18,22 +22,23 @@ public class AddxpCommand extends ExperienceCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleCommand(SkillType skill) {
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
if (player != null) {
|
||||
mcMMOPlayer.applyXpGain(skill, value);
|
||||
UserManager.getPlayer(player).applyXpGain(skill, value, XPGainReason.COMMAND);
|
||||
}
|
||||
else {
|
||||
profile.addExperience(skill, value);
|
||||
profile.addXp(skill, value);
|
||||
profile.scheduleAsyncSave();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageAll() {
|
||||
protected void handlePlayerMessageAll(Player player, int value) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", value));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageSkill() {
|
||||
protected void handlePlayerMessageSkill(Player player, int value, SkillType skill) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", value, skill.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -15,23 +14,16 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public abstract class ExperienceCommand implements TabExecutor {
|
||||
protected McMMOPlayer mcMMOPlayer;
|
||||
protected Player player;
|
||||
protected PlayerProfile profile;
|
||||
|
||||
protected boolean allSkills;
|
||||
protected SkillType skill;
|
||||
protected int value;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
SkillType skill;
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
@@ -47,12 +39,13 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
profile = mcMMOPlayer.getProfile();
|
||||
skill = SkillType.getSkill(args[0]);
|
||||
|
||||
editValues();
|
||||
cleanUp();
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill, Integer.parseInt(args[1]));
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
@@ -65,28 +58,32 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
skill = SkillType.getSkill(args[1]);
|
||||
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
|
||||
int value = Integer.parseInt(args[2]);
|
||||
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
|
||||
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
editValues();
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
editValues(null, profile, skill, value);
|
||||
}
|
||||
else {
|
||||
profile = mcMMOPlayer.getProfile();
|
||||
player = mcMMOPlayer.getPlayer();
|
||||
editValues();
|
||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill, value);
|
||||
}
|
||||
|
||||
handleSenderMessage(sender, playerName);
|
||||
cleanUp();
|
||||
handleSenderMessage(sender, playerName, skill);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -98,7 +95,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||
@@ -109,42 +106,16 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
|
||||
protected abstract boolean permissionsCheckSelf(CommandSender sender);
|
||||
protected abstract boolean permissionsCheckOthers(CommandSender sender);
|
||||
protected abstract void handleCommand(SkillType skill);
|
||||
protected abstract void handlePlayerMessageAll();
|
||||
protected abstract void handlePlayerMessageSkill();
|
||||
protected abstract void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value);
|
||||
protected abstract void handlePlayerMessageAll(Player player, int value);
|
||||
protected abstract void handlePlayerMessageSkill(Player player, int value, SkillType skill);
|
||||
|
||||
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
||||
if (isInvalidInteger(sender, value) || isInvalidSkill(sender, skillName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(CommandUtils.isInvalidInteger(sender, value) || (!skillName.equalsIgnoreCase("all") && CommandUtils.isInvalidSkill(sender, skillName)));
|
||||
}
|
||||
|
||||
private boolean isInvalidInteger(CommandSender sender, String value) {
|
||||
if (CommandUtils.isInvalidInteger(sender, value)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.value = Integer.parseInt(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isInvalidSkill(CommandSender sender, String skillName) {
|
||||
if (skillName.equalsIgnoreCase("all")) {
|
||||
allSkills = true;
|
||||
return false;
|
||||
}
|
||||
else if (CommandUtils.isInvalidSkill(sender, skillName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
skill = SkillType.getSkill(skillName);
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void handleSenderMessage(CommandSender sender, String playerName) {
|
||||
if (allSkills) {
|
||||
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
||||
if (skill == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||
}
|
||||
else {
|
||||
@@ -152,27 +123,22 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
protected void editValues() {
|
||||
if (allSkills) {
|
||||
for (SkillType skillType : SkillType.values()) {
|
||||
handleCommand(skillType);
|
||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
handleCommand(player, profile, skillType, value);
|
||||
}
|
||||
|
||||
if (player != null) {
|
||||
handlePlayerMessageAll();
|
||||
handlePlayerMessageAll(player, value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
handleCommand(skill);
|
||||
handleCommand(player, profile, skill, value);
|
||||
|
||||
if (player != null) {
|
||||
handlePlayerMessageSkill();
|
||||
handlePlayerMessageSkill(player, value, skill);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanUp() {
|
||||
allSkills = false;
|
||||
player = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -19,26 +22,31 @@ public class MmoeditCommand extends ExperienceCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleCommand(SkillType skill) {
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
int skillLevel = profile.getSkillLevel(skill);
|
||||
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||
|
||||
profile.modifySkill(skill, value);
|
||||
|
||||
if (player == null || value == skillLevel) {
|
||||
if (player == null) {
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel);
|
||||
if (value == skillLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageAll() {
|
||||
protected void handlePlayerMessageAll(Player player, int value) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", value));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageSkill() {
|
||||
protected void handlePlayerMessageSkill(Player player, int value, SkillType skill) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", skill.getName(), value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,83 +1,88 @@
|
||||
package com.gmail.nossr50.commands.experience;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class SkillresetCommand extends ExperienceCommand {
|
||||
private CommandSender sender;
|
||||
private Command command;
|
||||
private int argsLength;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
/**
|
||||
* This class mirrors the structure of ExperienceCommand, except the
|
||||
* value/quantity argument is removed.
|
||||
*/
|
||||
public class SkillresetCommand implements TabExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
this.command = command;
|
||||
this.sender = sender;
|
||||
argsLength = args.length;
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Permissions.skillreset(sender)) {
|
||||
if (!permissionsCheckSelf(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isInvalidSkill(sender, args[0])) {
|
||||
if (!validateArguments(sender, args[0])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
profile = mcMMOPlayer.getProfile();
|
||||
|
||||
editValues();
|
||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0]));
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
if (!Permissions.skillresetOthers(sender)) {
|
||||
if (!permissionsCheckOthers(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isInvalidSkill(sender, args[1])) {
|
||||
if (!validateArguments(sender, args[1])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
SkillType skill;
|
||||
if (args[1].equalsIgnoreCase("all")) {
|
||||
skill = null;
|
||||
}
|
||||
else {
|
||||
skill = SkillType.getSkill(args[1]);
|
||||
}
|
||||
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
|
||||
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
editValues();
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
editValues(null, profile, skill);
|
||||
}
|
||||
else {
|
||||
profile = mcMMOPlayer.getProfile();
|
||||
player = mcMMOPlayer.getPlayer();
|
||||
|
||||
editValues();
|
||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill);
|
||||
}
|
||||
|
||||
handleSenderMessage(sender, playerName);
|
||||
handleSenderMessage(sender, playerName, skill);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -86,41 +91,77 @@ public class SkillresetCommand extends ExperienceCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleCommand(SkillType skill) {
|
||||
if (argsLength == 1 && !Permissions.skillreset(sender, skill) || (argsLength == 2 && !Permissions.skillresetOthers(sender, skill))) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return;
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill) {
|
||||
int levelsRemoved = profile.getSkillLevel(skill);
|
||||
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||
|
||||
profile.modifySkill(skill, 0);
|
||||
|
||||
if (player == null) {
|
||||
profile.scheduleAsyncSave();
|
||||
return;
|
||||
}
|
||||
|
||||
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false);
|
||||
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false, XPGainReason.COMMAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageAll() {
|
||||
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"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handlePlayerMessageSkill() {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.gmail.nossr50.commands.hardcore;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
@@ -8,18 +10,18 @@ import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class HardcoreCommand extends HardcoreModeCommand {
|
||||
@Override
|
||||
protected boolean checkTogglePermissions() {
|
||||
protected boolean checkTogglePermissions(CommandSender sender) {
|
||||
return Permissions.hardcoreToggle(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkModifyPermissions() {
|
||||
protected boolean checkModifyPermissions(CommandSender sender) {
|
||||
return Permissions.hardcoreModify(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkEnabled(String skill) {
|
||||
if (skill.equalsIgnoreCase("ALL")) {
|
||||
protected boolean checkEnabled(SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.values()) {
|
||||
if (!skillType.getHardcoreStatLossEnabled()) {
|
||||
return false;
|
||||
@@ -29,35 +31,35 @@ public class HardcoreCommand extends HardcoreModeCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
return SkillType.getSkill(skill).getHardcoreStatLossEnabled();
|
||||
return skill.getHardcoreStatLossEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void enable(String skill) {
|
||||
toggle(true);
|
||||
protected void enable(SkillType skill) {
|
||||
toggle(true, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disable(String skill) {
|
||||
toggle(false);
|
||||
protected void disable(SkillType skill) {
|
||||
toggle(false, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void modify() {
|
||||
Config.getInstance().setHardcoreDeathStatPenaltyPercentage(newPercent);
|
||||
sender.sendMessage(LocaleLoader.getString("Hardcore.DeathStatLoss.PercentageChanged", percent.format(newPercent / 100D)));
|
||||
protected void modify(CommandSender sender, double newPercentage) {
|
||||
Config.getInstance().setHardcoreDeathStatPenaltyPercentage(newPercentage);
|
||||
sender.sendMessage(LocaleLoader.getString("Hardcore.DeathStatLoss.PercentageChanged", percent.format(newPercentage / 100.0D)));
|
||||
}
|
||||
|
||||
private void toggle(boolean enable) {
|
||||
if (skill.equalsIgnoreCase("ALL")) {
|
||||
private void toggle(boolean enable, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
skillType.setHardcoreStatLossEnabled(enable);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SkillType.getSkill(skill).setHardcoreStatLossEnabled(enable);
|
||||
skill.setHardcoreStatLossEnabled(enable);
|
||||
}
|
||||
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.DeathStatLoss.Name"), skill));
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.DeathStatLoss.Name"), (skill == null ? "all skills" : skill.getName())));
|
||||
}
|
||||
}
|
||||
@@ -17,31 +17,22 @@ import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
protected CommandSender sender;
|
||||
protected double newPercent;
|
||||
protected DecimalFormat percent;
|
||||
protected String skill;
|
||||
|
||||
public HardcoreModeCommand() {
|
||||
percent = new DecimalFormat("##0.00%");
|
||||
}
|
||||
protected final DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
this.sender = sender;
|
||||
|
||||
if (!checkTogglePermissions()) {
|
||||
if (!checkTogglePermissions(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (checkEnabled("ALL")) {
|
||||
disable("ALL");
|
||||
if (checkEnabled(null)) {
|
||||
disable(null);
|
||||
}
|
||||
else {
|
||||
enable("ALL");
|
||||
enable(null);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -53,7 +44,7 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
enable("ALL");
|
||||
enable(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -63,11 +54,11 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
disable("ALL");
|
||||
disable(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isInvalidPercentage(sender, args[0])) {
|
||||
if (CommandUtils.isInvalidDouble(sender, args[0])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,16 +67,20 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
modify();
|
||||
modify(sender, Double.parseDouble(args[0]));
|
||||
return true;
|
||||
|
||||
|
||||
case 2:
|
||||
if (!args[0].equalsIgnoreCase("ALL") && CommandUtils.isChildSkill(sender, SkillType.getSkill(args[0]))) {
|
||||
if (CommandUtils.isInvalidSkill(sender, args[0])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
skill = args[0];
|
||||
SkillType skill = SkillType.getSkill(args[0]);
|
||||
|
||||
if (!CommandUtils.isChildSkill(sender, skill)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||
if (!Permissions.hardcoreToggle(sender)) {
|
||||
@@ -103,7 +98,7 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
disable(skill);
|
||||
enable(skill);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -128,19 +123,10 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract boolean checkTogglePermissions();
|
||||
protected abstract boolean checkModifyPermissions();
|
||||
protected abstract boolean checkEnabled(String skill);
|
||||
protected abstract void enable(String skill);
|
||||
protected abstract void disable(String skill);
|
||||
protected abstract void modify();
|
||||
|
||||
private boolean isInvalidPercentage(CommandSender sender, String value) {
|
||||
if (CommandUtils.isInvalidDouble(sender, value)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
newPercent = Double.parseDouble(value);
|
||||
return false;
|
||||
}
|
||||
protected abstract boolean checkTogglePermissions(CommandSender sender);
|
||||
protected abstract boolean checkModifyPermissions(CommandSender sender);
|
||||
protected abstract boolean checkEnabled(SkillType skill);
|
||||
protected abstract void enable(SkillType skill);
|
||||
protected abstract void disable(SkillType skill);
|
||||
protected abstract void modify(CommandSender sender, double newPercentage);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.gmail.nossr50.commands.hardcore;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
@@ -8,18 +10,18 @@ import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class VampirismCommand extends HardcoreModeCommand {
|
||||
@Override
|
||||
protected boolean checkTogglePermissions() {
|
||||
protected boolean checkTogglePermissions(CommandSender sender) {
|
||||
return Permissions.vampirismToggle(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkModifyPermissions() {
|
||||
protected boolean checkModifyPermissions(CommandSender sender) {
|
||||
return Permissions.vampirismModify(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkEnabled(String skill) {
|
||||
if (skill.equalsIgnoreCase("ALL")) {
|
||||
protected boolean checkEnabled(SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.values()) {
|
||||
if (!skillType.getHardcoreVampirismEnabled()) {
|
||||
return false;
|
||||
@@ -29,35 +31,35 @@ public class VampirismCommand extends HardcoreModeCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
return SkillType.getSkill(skill).getHardcoreVampirismEnabled();
|
||||
return skill.getHardcoreVampirismEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void enable(String skill) {
|
||||
toggle(true);
|
||||
protected void enable(SkillType skill) {
|
||||
toggle(true, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disable(String skill) {
|
||||
toggle(false);
|
||||
protected void disable(SkillType skill) {
|
||||
toggle(false, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void modify() {
|
||||
Config.getInstance().setHardcoreVampirismStatLeechPercentage(newPercent);
|
||||
sender.sendMessage(LocaleLoader.getString("Hardcore.Vampirism.PercentageChanged", percent.format(newPercent / 100D)));
|
||||
protected void modify(CommandSender sender, double newPercentage) {
|
||||
Config.getInstance().setHardcoreVampirismStatLeechPercentage(newPercentage);
|
||||
sender.sendMessage(LocaleLoader.getString("Hardcore.Vampirism.PercentageChanged", percent.format(newPercentage / 100.0D)));
|
||||
}
|
||||
|
||||
private void toggle(boolean enable) {
|
||||
if (skill.equalsIgnoreCase("ALL")) {
|
||||
private void toggle(boolean enable, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||
skillType.setHardcoreVampirismEnabled(enable);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SkillType.getSkill(skill).setHardcoreVampirismEnabled(enable);
|
||||
skill.setHardcoreVampirismEnabled(enable);
|
||||
}
|
||||
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.Vampirism.Name"), skill));
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.Vampirism.Name"), (skill == null ? "all skills" : skill)));
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||
@@ -17,7 +17,7 @@ public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
|
||||
if (!playerParty.getMembers().contains(targetName)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||
|
||||
@@ -10,24 +10,22 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyChangePasswordCommand implements CommandExecutor {
|
||||
private Party playerParty;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
unprotectParty(sender);
|
||||
unprotectParty(party, sender);
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
if (args[1].equalsIgnoreCase("clear") || args[1].equalsIgnoreCase("reset")) {
|
||||
unprotectParty(sender);
|
||||
unprotectParty(party, sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
protectParty(sender, args[1]);
|
||||
protectParty(party, sender, args[1]);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -37,15 +35,15 @@ public class PartyChangePasswordCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void unprotectParty(CommandSender sender) {
|
||||
playerParty.setLocked(true);
|
||||
playerParty.setPassword(null);
|
||||
private void unprotectParty(Party party, CommandSender sender) {
|
||||
party.setLocked(true);
|
||||
party.setPassword(null);
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Password.Removed"));
|
||||
}
|
||||
|
||||
private void protectParty(CommandSender sender, String password) {
|
||||
playerParty.setLocked(true);
|
||||
playerParty.setPassword(password);
|
||||
private void protectParty(Party party, CommandSender sender, String password) {
|
||||
party.setLocked(true);
|
||||
party.setPassword(password);
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Password.Set", password));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@@ -12,9 +12,10 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||
import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand;
|
||||
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -24,11 +25,8 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class PartyCommand implements TabExecutor {
|
||||
private McMMOPlayer mcMMOPlayer;
|
||||
private Player player;
|
||||
|
||||
private static final List<String> PARTY_SUBCOMMANDS;
|
||||
private static final List<String> EXPSHARE_COMPLETIONS = ImmutableList.of("none", "equal");
|
||||
private static final List<String> XPSHARE_COMPLETIONS = ImmutableList.of("none", "equal");
|
||||
private static final List<String> ITEMSHARE_COMPLETIONS = ImmutableList.of("none", "equal", "random", "loot", "mining", "herbalism", "woodcutting", "misc");
|
||||
|
||||
static {
|
||||
@@ -46,7 +44,7 @@ public class PartyCommand implements TabExecutor {
|
||||
private CommandExecutor partyAcceptCommand = new PartyAcceptCommand();
|
||||
private CommandExecutor partyCreateCommand = new PartyCreateCommand();
|
||||
private CommandExecutor partyQuitCommand = new PartyQuitCommand();
|
||||
private CommandExecutor partyExpShareCommand = new PartyExpShareCommand();
|
||||
private CommandExecutor partyXpShareCommand = new PartyXpShareCommand();
|
||||
private CommandExecutor partyItemShareCommand = new PartyItemShareCommand();
|
||||
private CommandExecutor partyInviteCommand = new PartyInviteCommand();
|
||||
private CommandExecutor partyKickCommand = new PartyKickCommand();
|
||||
@@ -57,8 +55,9 @@ public class PartyCommand implements TabExecutor {
|
||||
private CommandExecutor partyRenameCommand = new PartyRenameCommand();
|
||||
private CommandExecutor partyInfoCommand = new PartyInfoCommand();
|
||||
private CommandExecutor partyHelpCommand = new PartyHelpCommand();
|
||||
private CommandExecutor partyTeleportCommand = mcMMO.p.getCommand("ptp").getExecutor();
|
||||
private CommandExecutor partyTeleportCommand = new PtpCommand();
|
||||
private CommandExecutor partyChatCommand = new PartyChatCommand();
|
||||
private CommandExecutor partyAllianceCommand = new PartyAllianceCommand();
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@@ -71,13 +70,13 @@ public class PartyCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (args.length < 1) {
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return printUsage();
|
||||
return printUsage(player);
|
||||
}
|
||||
|
||||
return partyInfoCommand.onCommand(sender, command, label, args);
|
||||
@@ -86,7 +85,7 @@ public class PartyCommand implements TabExecutor {
|
||||
PartySubcommandType subcommand = PartySubcommandType.getSubcommand(args[0]);
|
||||
|
||||
if (subcommand == null) {
|
||||
return printUsage();
|
||||
return printUsage(player);
|
||||
}
|
||||
|
||||
// Can't use this for lock/unlock since they're handled by the same command
|
||||
@@ -111,7 +110,7 @@ public class PartyCommand implements TabExecutor {
|
||||
// Party member commands
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return printUsage();
|
||||
return printUsage(player);
|
||||
}
|
||||
|
||||
switch (subcommand) {
|
||||
@@ -136,8 +135,8 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
switch (subcommand) {
|
||||
case EXPSHARE:
|
||||
return partyExpShareCommand.onCommand(sender, command, label, args);
|
||||
case XPSHARE:
|
||||
return partyXpShareCommand.onCommand(sender, command, label, args);
|
||||
case ITEMSHARE:
|
||||
return partyItemShareCommand.onCommand(sender, command, label, args);
|
||||
case KICK:
|
||||
@@ -153,6 +152,8 @@ public class PartyCommand implements TabExecutor {
|
||||
return partyChangePasswordCommand.onCommand(sender, command, label, args);
|
||||
case RENAME:
|
||||
return partyRenameCommand.onCommand(sender, command, label, args);
|
||||
case ALLIANCE:
|
||||
return partyAllianceCommand.onCommand(sender, command, label, args);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -177,10 +178,10 @@ public class PartyCommand implements TabExecutor {
|
||||
case INVITE:
|
||||
case KICK:
|
||||
case OWNER:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case EXPSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], EXPSHARE_COMPLETIONS, new ArrayList<String>(EXPSHARE_COMPLETIONS.size()));
|
||||
case XPSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
||||
case ITEMSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], ITEMSHARE_COMPLETIONS, new ArrayList<String>(ITEMSHARE_COMPLETIONS.size()));
|
||||
case LOCK:
|
||||
@@ -192,7 +193,10 @@ public class PartyCommand implements TabExecutor {
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
playerNames = UserManager.getPlayerNames();
|
||||
Player player = (Player) sender;
|
||||
Party party = UserManager.getPlayer(player).getParty();
|
||||
|
||||
playerNames = party.getOnlinePlayerNames(player);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
@@ -211,7 +215,7 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean printUsage() {
|
||||
private boolean printUsage(Player player) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.Help.0", "/party join"));
|
||||
player.sendMessage(LocaleLoader.getString("Party.Help.1", "/party create"));
|
||||
player.sendMessage(LocaleLoader.getString("Party.Help.2", "/party ?"));
|
||||
@@ -219,13 +223,7 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
private String[] extractArgs(String[] args) {
|
||||
String[] newArgs = new String[args.length - 1];
|
||||
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
newArgs[i - 1] = args[i];
|
||||
}
|
||||
|
||||
return newArgs;
|
||||
return Arrays.copyOfRange(args, 1, args.length);
|
||||
}
|
||||
|
||||
private boolean isItemShareCategory(String category) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class PartyHelpCommand implements CommandExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.7", "/party leader"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.8", "/party disband"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.9", "/party itemshare"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.10", "/party expshare"));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Help.10", "/party xpshare"));
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@@ -16,55 +19,74 @@ import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyInfoCommand implements CommandExecutor {
|
||||
private McMMOPlayer mcMMOPlayer;
|
||||
private Player player;
|
||||
private Party playerParty;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
case 1:
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
playerParty = mcMMOPlayer.getParty();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
displayPartyHeader();
|
||||
displayShareModeInfo();
|
||||
displayMemberInfo();
|
||||
displayPartyHeader(player, party);
|
||||
displayShareModeInfo(player, party);
|
||||
displayPartyFeatures(player, party);
|
||||
displayMemberInfo(player, mcMMOPlayer, party);
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "info"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private String createMembersList() {
|
||||
StringBuilder memberList = new StringBuilder();
|
||||
private void displayPartyHeader(Player player, Party party) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||
|
||||
for (String memberName : playerParty.getMembers()) {
|
||||
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
||||
StringBuilder status = new StringBuilder();
|
||||
status.append(LocaleLoader.getString("Commands.Party.Status", party.getName(), LocaleLoader.getString("Party.Status." + (party.isLocked() ? "Locked" : "Unlocked")), party.getLevel()));
|
||||
|
||||
if (playerParty.getLeader().equalsIgnoreCase(memberName)) {
|
||||
memberList.append(ChatColor.GOLD);
|
||||
}
|
||||
else if (member != null) {
|
||||
memberList.append(ChatColor.WHITE);
|
||||
}
|
||||
else {
|
||||
memberList.append(ChatColor.GRAY);
|
||||
}
|
||||
|
||||
memberList.append(memberName).append(" ");
|
||||
if (!party.hasReachedLevelCap()) {
|
||||
status.append(" (").append(party.getXpToLevelPercentage()).append(")");
|
||||
}
|
||||
|
||||
return memberList.toString();
|
||||
player.sendMessage(status.toString());
|
||||
}
|
||||
|
||||
private void displayShareModeInfo() {
|
||||
boolean xpShareEnabled = Config.getInstance().getExpShareEnabled();
|
||||
boolean itemShareEnabled = Config.getInstance().getItemShareEnabled();
|
||||
boolean itemSharingActive = (playerParty.getItemShareMode() != ShareMode.NONE);
|
||||
private void displayPartyFeatures(Player player, Party party) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Features.Header"));
|
||||
|
||||
List<String> unlockedPartyFeatures = new ArrayList<String>();
|
||||
List<String> lockedPartyFeatures = new ArrayList<String>();
|
||||
|
||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||
if (!partyFeature.hasPermission(player)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isUnlockedFeature(party, partyFeature)) {
|
||||
unlockedPartyFeatures.add(partyFeature.getLocaleString());
|
||||
}
|
||||
else {
|
||||
lockedPartyFeatures.add(partyFeature.getFeatureLockedLocaleString());
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.UnlockedFeatures", unlockedPartyFeatures.isEmpty() ? "None" : unlockedPartyFeatures));
|
||||
|
||||
for (String message : lockedPartyFeatures) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isUnlockedFeature(Party party, PartyFeature partyFeature) {
|
||||
return party.getLevel() >= Config.getInstance().getPartyFeatureUnlockLevel(partyFeature);
|
||||
}
|
||||
|
||||
private void displayShareModeInfo(Player player, Party party) {
|
||||
boolean xpShareEnabled = isUnlockedFeature(party, PartyFeature.XP_SHARE);
|
||||
boolean itemShareEnabled = isUnlockedFeature(party, PartyFeature.ITEM_SHARE);
|
||||
boolean itemSharingActive = (party.getItemShareMode() != ShareMode.NONE);
|
||||
|
||||
if (!xpShareEnabled && !itemShareEnabled) {
|
||||
return;
|
||||
@@ -75,11 +97,11 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
String separator = "";
|
||||
|
||||
if (xpShareEnabled) {
|
||||
expShareInfo = LocaleLoader.getString("Commands.Party.ExpShare", playerParty.getXpShareMode().toString());
|
||||
expShareInfo = LocaleLoader.getString("Commands.Party.ExpShare", party.getXpShareMode().toString());
|
||||
}
|
||||
|
||||
if (itemShareEnabled) {
|
||||
itemShareInfo = LocaleLoader.getString("Commands.Party.ItemShare", playerParty.getItemShareMode().toString());
|
||||
itemShareInfo = LocaleLoader.getString("Commands.Party.ItemShare", party.getItemShareMode().toString());
|
||||
}
|
||||
|
||||
if (xpShareEnabled && itemShareEnabled) {
|
||||
@@ -87,28 +109,18 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.ShareMode") + expShareInfo + separator + itemShareInfo);
|
||||
|
||||
if (itemSharingActive) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.ItemShareCategories", playerParty.getItemShareCategories()));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.ItemShareCategories", party.getItemShareCategories()));
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyHeader() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||
|
||||
if (playerParty.isLocked()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", playerParty.getName(), LocaleLoader.getString("Party.Status.Locked")));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", playerParty.getName(), LocaleLoader.getString("Party.Status.Unlocked")));
|
||||
}
|
||||
}
|
||||
|
||||
private void displayMemberInfo() {
|
||||
int membersNear = PartyManager.getNearMembers(mcMMOPlayer).size();
|
||||
int membersOnline = playerParty.getOnlineMembers().size() - 1;
|
||||
private void displayMemberInfo(Player player, McMMOPlayer mcMMOPlayer, Party party) {
|
||||
List<Player> nearMembers = PartyManager.getNearMembers(mcMMOPlayer);
|
||||
int membersOnline = party.getOnlineMembers().size() - 1;
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", membersNear, membersOnline));
|
||||
player.sendMessage(createMembersList());
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", nearMembers.size(), membersOnline));
|
||||
player.sendMessage(party.createMembersList(player.getName(), nearMembers));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -18,8 +17,8 @@ public class PartyInviteCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@@ -15,18 +16,17 @@ import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyItemShareCommand implements CommandExecutor {
|
||||
private Party playerParty;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!Config.getInstance().getItemShareEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.ItemShare.Disabled"));
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ITEM_SHARE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.4"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
||||
|
||||
if (mode == null) {
|
||||
@@ -34,12 +34,11 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
handleChangingShareMode(mode);
|
||||
handleChangingShareMode(party, mode);
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
boolean toggle = false;
|
||||
boolean toggle;
|
||||
|
||||
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||
toggle = true;
|
||||
@@ -53,7 +52,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
try {
|
||||
handleToggleItemShareCategory(ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
||||
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||
@@ -68,22 +67,22 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleChangingShareMode(ShareMode mode) {
|
||||
playerParty.setItemShareMode(mode);
|
||||
private void handleChangingShareMode(Party party, ShareMode mode) {
|
||||
party.setItemShareMode(mode);
|
||||
|
||||
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Item"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||
|
||||
for (Player member : playerParty.getOnlineMembers()) {
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
member.sendMessage(changeModeMessage);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleToggleItemShareCategory(ItemShareType type, boolean toggle) {
|
||||
playerParty.setSharingDrops(type, toggle);
|
||||
private void handleToggleItemShareCategory(Party party, ItemShareType type, boolean toggle) {
|
||||
party.setSharingDrops(type, toggle);
|
||||
|
||||
String toggleMessage = LocaleLoader.getString("Commands.Party.ToggleShareCategory", StringUtils.getCapitalized(type.toString()), toggle ? "enabled" : "disabled");
|
||||
|
||||
for (Player member : playerParty.getOnlineMembers()) {
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
member.sendMessage(toggleMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,30 +9,37 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyJoinCommand implements CommandExecutor {
|
||||
private McMMOPlayer mcMMOTarget;
|
||||
private Player target;
|
||||
private Party targetParty;
|
||||
|
||||
private McMMOPlayer mcMMOPlayer;
|
||||
private Player player;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
case 3:
|
||||
// Verify target exists and is in a different party than the player
|
||||
if (!canJoinParty(sender, args[1])) {
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||
player = mcMMOPlayer.getPlayer();
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
|
||||
if (!mcMMOTarget.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
Party targetParty = mcMMOTarget.getParty();
|
||||
|
||||
if (player.equals(target) || (mcMMOPlayer.inParty() && mcMMOPlayer.getParty().equals(targetParty))) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Join.Self"));
|
||||
return true;
|
||||
}
|
||||
|
||||
String password = getPassword(args);
|
||||
|
||||
@@ -65,31 +72,4 @@ public class PartyJoinCommand implements CommandExecutor {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean canJoinParty(CommandSender sender, String targetName) {
|
||||
targetName = Misc.getMatchedPlayerName(targetName);
|
||||
mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
target = mcMMOTarget.getPlayer();
|
||||
|
||||
if (!mcMMOTarget.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
|
||||
return false;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
targetParty = mcMMOTarget.getParty();
|
||||
|
||||
if (player.equals(target) || (mcMMOPlayer.inParty() && mcMMOPlayer.getParty().equals(targetParty))) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Join.Self"));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyKickCommand implements CommandExecutor {
|
||||
@@ -19,13 +20,15 @@ public class PartyKickCommand implements CommandExecutor {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||
|
||||
if (!playerParty.getMembers().contains(target.getName())) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
||||
if (!playerParty.getMembers().contains(targetName)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
|
||||
|
||||
if (target.isOnline()) {
|
||||
Player onlineTarget = target.getPlayer();
|
||||
String partyName = playerParty.getName();
|
||||
|
||||
@@ -12,19 +12,15 @@ import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyLockCommand implements CommandExecutor {
|
||||
private Party playerParty;
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (args[0].equalsIgnoreCase("lock")) {
|
||||
lockParty(sender, command.getPermissionMessage());
|
||||
togglePartyLock(sender, true);
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("unlock")) {
|
||||
unlockParty(sender, command.getPermissionMessage());
|
||||
togglePartyLock(sender, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -36,10 +32,10 @@ public class PartyLockCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||
lockParty(sender, command.getPermissionMessage());
|
||||
togglePartyLock(sender, true);
|
||||
}
|
||||
else if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||
unlockParty(sender, command.getPermissionMessage());
|
||||
togglePartyLock(sender, false);
|
||||
}
|
||||
else {
|
||||
sendUsageStrings(sender);
|
||||
@@ -53,44 +49,25 @@ public class PartyLockCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle locking a party.
|
||||
*/
|
||||
private void lockParty(CommandSender sender, String permissionMessage) {
|
||||
if (!Permissions.partySubcommand(sender, PartySubcommandType.LOCK)) {
|
||||
sender.sendMessage(permissionMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerParty.isLocked()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.IsLocked"));
|
||||
return;
|
||||
}
|
||||
|
||||
playerParty.setLocked(true);
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Locked"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle unlocking a party.
|
||||
*/
|
||||
private void unlockParty(CommandSender sender, String permissionMessage) {
|
||||
if (!Permissions.partySubcommand(sender, PartySubcommandType.UNLOCK)) {
|
||||
sender.sendMessage(permissionMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!playerParty.isLocked()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.IsntLocked"));
|
||||
return;
|
||||
}
|
||||
|
||||
playerParty.setLocked(false);
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Unlocked"));
|
||||
}
|
||||
|
||||
private void sendUsageStrings(CommandSender sender) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "unlock"));
|
||||
}
|
||||
|
||||
private void togglePartyLock(CommandSender sender, boolean lock) {
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (!Permissions.partySubcommand(sender, lock ? PartySubcommandType.LOCK : PartySubcommandType.UNLOCK)) {
|
||||
sender.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (lock ? party.isLocked() : !party.isLocked()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party." + (lock ? "IsLocked" : "IsntLocked")));
|
||||
return;
|
||||
}
|
||||
|
||||
party.setLocked(lock);
|
||||
sender.sendMessage(LocaleLoader.getString("Party." + (lock ? "Locked" : "Unlocked")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public enum PartySubcommandType {
|
||||
HELP,
|
||||
INFO,
|
||||
QUIT,
|
||||
EXPSHARE,
|
||||
XPSHARE,
|
||||
ITEMSHARE,
|
||||
INVITE,
|
||||
KICK,
|
||||
@@ -18,7 +18,8 @@ public enum PartySubcommandType {
|
||||
PASSWORD,
|
||||
RENAME,
|
||||
TELEPORT,
|
||||
CHAT;
|
||||
CHAT,
|
||||
ALLIANCE;
|
||||
|
||||
public static PartySubcommandType getSubcommand(String commandName) {
|
||||
for (PartySubcommandType command : values()) {
|
||||
@@ -37,11 +38,14 @@ public enum PartySubcommandType {
|
||||
return OWNER;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
||||
return EXPSHARE;
|
||||
return XPSHARE;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
||||
return ITEMSHARE;
|
||||
}
|
||||
else if (commandName.equalsIgnoreCase("ally")) {
|
||||
return ALLIANCE;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -7,50 +7,49 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyExpShareCommand implements CommandExecutor {
|
||||
private Party playerParty;
|
||||
|
||||
public class PartyXpShareCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!Config.getInstance().getExpShareEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.ExpShare.Disabled"));
|
||||
Party party = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.XP_SHARE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.5"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||
|
||||
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
||||
handleChangingShareMode(ShareMode.NONE);
|
||||
handleChangingShareMode(party, ShareMode.NONE);
|
||||
}
|
||||
else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even") || CommandUtils.shouldEnableToggle(args[1])) {
|
||||
handleChangingShareMode(ShareMode.EQUAL);
|
||||
handleChangingShareMode(party, ShareMode.EQUAL);
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void handleChangingShareMode(ShareMode mode) {
|
||||
playerParty.setXpShareMode(mode);
|
||||
private void handleChangingShareMode(Party party, ShareMode mode) {
|
||||
party.setXpShareMode(mode);
|
||||
|
||||
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Xp"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||
|
||||
for (Player member : playerParty.getOnlineMembers()) {
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
member.sendMessage(changeModeMessage);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceAcceptCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.hasPartyAllianceInvite()) {
|
||||
sender.sendMessage(LocaleLoader.getString("mcMMO.NoInvites"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mcMMOPlayer.getParty().getAlly() != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
|
||||
return true;
|
||||
}
|
||||
|
||||
PartyManager.acceptAllianceInvite(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "alliance", "accept"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class PartyAllianceCommand implements TabExecutor {
|
||||
private Player player;
|
||||
private Party playerParty;
|
||||
private Party targetParty;
|
||||
|
||||
public static final List<String> ALLIANCE_SUBCOMMANDS = ImmutableList.of("invite", "accept", "disband");
|
||||
|
||||
private CommandExecutor partyAllianceInviteCommand = new PartyAllianceInviteCommand();
|
||||
private CommandExecutor partyAllianceAcceptCommand = new PartyAllianceAcceptCommand();
|
||||
private CommandExecutor partyAllianceDisbandCommand = new PartyAllianceDisbandCommand();
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
playerParty = mcMMOPlayer.getParty();
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (playerParty.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ALLIANCE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.3"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (playerParty.getAlly() == null) {
|
||||
printUsage();
|
||||
return true;
|
||||
}
|
||||
|
||||
targetParty = playerParty.getAlly();
|
||||
|
||||
displayPartyHeader();
|
||||
displayMemberInfo(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
if (playerParty.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.ALLIANCE)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.3"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("invite")) {
|
||||
return partyAllianceInviteCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("accept")) {
|
||||
return partyAllianceAcceptCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (args[1].equalsIgnoreCase("disband")) {
|
||||
return partyAllianceDisbandCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
if (playerParty.getAlly() == null) {
|
||||
printUsage();
|
||||
return true;
|
||||
}
|
||||
|
||||
targetParty = playerParty.getAlly();
|
||||
|
||||
displayPartyHeader();
|
||||
displayMemberInfo(mcMMOPlayer);
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean printUsage() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Help.0"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Help.1"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender commandSender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(commandSender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
return matches;
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
private void displayPartyHeader() {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Ally", playerParty.getName(), targetParty.getName()));
|
||||
}
|
||||
|
||||
private void displayMemberInfo(McMMOPlayer mcMMOPlayer) {
|
||||
List<Player> nearMembers = PartyManager.getNearMembers(mcMMOPlayer);
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Members.Header"));
|
||||
player.sendMessage(playerParty.createMembersList(player.getName(), nearMembers));
|
||||
player.sendMessage(ChatColor.DARK_GRAY + "----------------------------");
|
||||
player.sendMessage(targetParty.createMembersList(player.getName(), nearMembers));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceDisbandCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
if (party.getAlly() == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.None"));
|
||||
return true;
|
||||
}
|
||||
|
||||
PartyManager.disbandAlliance(player, party, party.getAlly());
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "alliance", "disband"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gmail.nossr50.commands.party.alliance;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class PartyAllianceInviteCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 3:
|
||||
String targetName = CommandUtils.getMatchedPlayerName(args[2]);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
String playerName = player.getName();
|
||||
|
||||
if (player.equals(target)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Invite.Self"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.inParty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (PartyManager.inSameParty(player, target)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Player.InSameParty", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.getParty().getLeader().equalsIgnoreCase(targetName)) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
|
||||
return true;
|
||||
}
|
||||
|
||||
Party playerParty = mcMMOPlayer.getParty();
|
||||
|
||||
if (playerParty.getAlly() != null) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOTarget.setPartyAllianceInvite(playerParty);
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
|
||||
target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.0", playerParty.getName(), playerName));
|
||||
target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.1"));
|
||||
return true;
|
||||
|
||||
default:
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "alliance", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,8 @@ package com.gmail.nossr50.commands.party.teleport;
|
||||
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.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -18,17 +17,16 @@ public class PtpAcceptAnyCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
PartyTeleportRecord ptpRecord = UserManager.getPlayer(sender.getName()).getPartyTeleportRecord();
|
||||
|
||||
if (mcMMOPlayer.getPtpConfirmRequired()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Disabled"));
|
||||
if (ptpRecord.isConfirmRequired()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Disabled"));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Enabled"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Enabled"));
|
||||
}
|
||||
|
||||
mcMMOPlayer.togglePtpConfirmRequired();
|
||||
ptpRecord.toggleConfirmRequired();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class PtpAcceptCommand implements CommandExecutor {
|
||||
@Override
|
||||
@@ -22,21 +22,21 @@ public class PtpAcceptCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
PartyTeleportRecord ptpRecord = UserManager.getPlayer(player).getPartyTeleportRecord();
|
||||
|
||||
if (!mcMMOPlayer.hasPtpRequest()) {
|
||||
if (!ptpRecord.hasRequest()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.NoRequests"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((mcMMOPlayer.getPtpTimeout() + Config.getInstance().getPTPCommandTimeout()) * Misc.TIME_CONVERSION_FACTOR < System.currentTimeMillis()) {
|
||||
mcMMOPlayer.removePtpRequest();
|
||||
if (SkillUtils.cooldownExpired(ptpRecord.getTimeout(), Config.getInstance().getPTPCommandTimeout())) {
|
||||
ptpRecord.removeRequest();
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired"));
|
||||
return true;
|
||||
}
|
||||
|
||||
Player target = mcMMOPlayer.getPtpRequest();
|
||||
mcMMOPlayer.removePtpRequest();
|
||||
Player target = ptpRecord.getRequestor();
|
||||
ptpRecord.removeRequest();
|
||||
|
||||
if (!PtpCommand.canTeleport(sender, player, target.getName())) {
|
||||
return true;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.teleport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@@ -13,6 +12,9 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
@@ -27,9 +29,6 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class PtpCommand implements TabExecutor {
|
||||
private static Player target;
|
||||
private static McMMOPlayer mcMMOTarget;
|
||||
|
||||
public static final List<String> TELEPORT_SUBCOMMANDS = ImmutableList.of("toggle", "accept", "acceptany", "acceptall");
|
||||
|
||||
private CommandExecutor ptpToggleCommand = new PtpToggleCommand();
|
||||
@@ -42,6 +41,21 @@ public class PtpCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||
return true;
|
||||
}
|
||||
|
||||
Party party = mcMMOPlayer.getParty();
|
||||
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.TELEPORT)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.Feature.Disabled.2"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
if (args[0].equalsIgnoreCase("toggle")) {
|
||||
@@ -52,9 +66,6 @@ public class PtpCommand implements TabExecutor {
|
||||
return ptpAcceptAnyCommand.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
||||
int hurtCooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
||||
|
||||
@@ -77,7 +88,7 @@ public class PtpCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
|
||||
long ptpLastUse = mcMMOPlayer.getPtpLastUse();
|
||||
long ptpLastUse = mcMMOPlayer.getPartyTeleportRecord().getLastUse();
|
||||
|
||||
if (ptpCooldown > 0) {
|
||||
int timeRemaining = SkillUtils.calculateTimeLeft(ptpLastUse * Misc.TIME_CONVERSION_FACTOR, ptpCooldown, player);
|
||||
@@ -88,7 +99,7 @@ public class PtpCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
sendTeleportRequest(sender, player, Misc.getMatchedPlayerName(args[0]));
|
||||
sendTeleportRequest(sender, player, CommandUtils.getMatchedPlayerName(args[0]));
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -103,7 +114,14 @@ public class PtpCommand implements TabExecutor {
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
List<String> playerNames = mcMMOPlayer.getParty().getOnlinePlayerNames(player);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
@@ -118,13 +136,18 @@ public class PtpCommand implements TabExecutor {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.getPtpConfirmRequired()) {
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
|
||||
PartyTeleportRecord ptpRecord = mcMMOTarget.getPartyTeleportRecord();
|
||||
|
||||
if (!ptpRecord.isConfirmRequired()) {
|
||||
handleTeleportWarmup(player, target);
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOTarget.setPtpRequest(player);
|
||||
mcMMOTarget.actualizePtpTimeout();
|
||||
ptpRecord.setRequestor(player);
|
||||
ptpRecord.actualizeTimeout();
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
|
||||
|
||||
@@ -133,13 +156,13 @@ public class PtpCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
||||
mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||
|
||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
target = mcMMOTarget.getPlayer();
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
|
||||
if (player.equals(target)) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.Teleport.Self"));
|
||||
@@ -151,7 +174,7 @@ public class PtpCommand implements TabExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mcMMOTarget.getPtpEnabled()) {
|
||||
if (!mcMMOTarget.getPartyTeleportRecord().isEnabled()) {
|
||||
player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", targetName));
|
||||
return false;
|
||||
}
|
||||
@@ -166,7 +189,7 @@ public class PtpCommand implements TabExecutor {
|
||||
|
||||
protected static void handleTeleportWarmup(Player teleportingPlayer, Player targetPlayer) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(teleportingPlayer);
|
||||
mcMMOTarget = UserManager.getPlayer(targetPlayer);
|
||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetPlayer);
|
||||
|
||||
long warmup = Config.getInstance().getPTPCommandWarmup();
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@ package com.gmail.nossr50.commands.party.teleport;
|
||||
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.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -18,17 +17,16 @@ public class PtpToggleCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
PartyTeleportRecord ptpRecord = UserManager.getPlayer(sender.getName()).getPartyTeleportRecord();
|
||||
|
||||
if (mcMMOPlayer.getPtpEnabled()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.Disabled"));
|
||||
if (ptpRecord.isEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Disabled"));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.ptp.Enabled"));
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Enabled"));
|
||||
}
|
||||
|
||||
mcMMOPlayer.togglePtpUse();
|
||||
ptpRecord.toggleEnabled();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -16,7 +15,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@@ -29,8 +27,8 @@ public class InspectCommand implements TabExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
@@ -105,7 +103,7 @@ public class InspectCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class MccooldownCommand implements TabExecutor {
|
||||
@@ -40,7 +41,7 @@ public class MccooldownCommand implements TabExecutor {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||
|
||||
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
if (!ability.getPermissions(player)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -15,10 +14,10 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class McrankCommand implements TabExecutor {
|
||||
@@ -45,8 +44,8 @@ public class McrankCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||
|
||||
if (mcMMOPlayer != null) {
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
@@ -72,7 +71,7 @@ public class McrankCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
@@ -82,8 +81,9 @@ public class McrankCommand implements TabExecutor {
|
||||
private void display(CommandSender sender, String playerName) {
|
||||
if (sender instanceof Player) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||
|
||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||
return;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class McrankCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getRankUseBoard());
|
||||
boolean useChat = useBoard ? Config.getInstance().getRankUseChat() : true;
|
||||
boolean useChat = !useBoard || Config.getInstance().getRankUseChat();
|
||||
|
||||
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class MctopCommand implements TabExecutor {
|
||||
@@ -84,8 +84,9 @@ public class MctopCommand implements TabExecutor {
|
||||
|
||||
if (sender instanceof Player) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||
|
||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +99,7 @@ public class MctopCommand implements TabExecutor {
|
||||
|
||||
private void display(int page, SkillType skill, CommandSender sender) {
|
||||
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getTopUseBoard());
|
||||
boolean useChat = useBoard ? Config.getInstance().getTopUseChat() : true;
|
||||
boolean useChat = !useBoard || Config.getInstance().getTopUseChat();
|
||||
|
||||
new MctopCommandAsyncTask(page, skill, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.acrobatics.Acrobatics;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class AcrobaticsCommand extends SkillCommand {
|
||||
@@ -22,75 +27,71 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// DODGE
|
||||
if (canDodge) {
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(Acrobatics.dodgeMaxBonusLevel, Acrobatics.dodgeMaxChance);
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DODGE, isLucky);
|
||||
dodgeChance = dodgeStrings[0];
|
||||
dodgeChanceLucky = dodgeStrings[1];
|
||||
}
|
||||
|
||||
// ROLL
|
||||
if (canRoll) {
|
||||
String[] rollStrings = calculateAbilityDisplayValues(Acrobatics.rollMaxBonusLevel, Acrobatics.rollMaxChance);
|
||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.ROLL, isLucky);
|
||||
rollChance = rollStrings[0];
|
||||
rollChanceLucky = rollStrings[1];
|
||||
}
|
||||
|
||||
// GRACEFUL ROLL
|
||||
if (canGracefulRoll) {
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollMaxChance);
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GRACEFUL_ROLL, isLucky);
|
||||
gracefulRollChance = gracefulRollStrings[0];
|
||||
gracefulRollChanceLucky = gracefulRollStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canDodge = Permissions.dodge(player);
|
||||
canRoll = Permissions.roll(player);
|
||||
canGracefulRoll = Permissions.gracefulRoll(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canDodge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DODGE);
|
||||
canRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ROLL);
|
||||
canGracefulRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GRACEFUL_ROLL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canDodge || canGracefulRoll || canRoll;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canRoll) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.0"), LocaleLoader.getString("Acrobatics.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.0"), LocaleLoader.getString("Acrobatics.Effect.1")));
|
||||
}
|
||||
|
||||
if (canGracefulRoll) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.2"), LocaleLoader.getString("Acrobatics.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.2"), LocaleLoader.getString("Acrobatics.Effect.3")));
|
||||
}
|
||||
|
||||
if (canDodge) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.4"), LocaleLoader.getString("Acrobatics.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.4"), LocaleLoader.getString("Acrobatics.Effect.5")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canDodge || canGracefulRoll || canRoll;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canRoll) {
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", rollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", rollChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Acrobatics.Roll.Chance", rollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", rollChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canGracefulRoll) {
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", gracefulRollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", gracefulRollChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Acrobatics.Roll.GraceChance", gracefulRollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", gracefulRollChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canDodge) {
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", dodgeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dodgeChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Acrobatics.DodgeChance", dodgeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dodgeChanceLucky) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.alchemy.Alchemy.Tier;
|
||||
import com.gmail.nossr50.skills.alchemy.AlchemyManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class AlchemyCommand extends SkillCommand {
|
||||
private String brewSpeed;
|
||||
private String brewSpeedLucky;
|
||||
|
||||
private int tier;
|
||||
private int ingredientCount;
|
||||
private String ingredientList;
|
||||
|
||||
private boolean canCatalysis;
|
||||
private boolean canConcoctions;
|
||||
|
||||
public AlchemyCommand() {
|
||||
super(SkillType.ALCHEMY);
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(Player player, boolean isLucky) {
|
||||
AlchemyManager alchemyManager = UserManager.getPlayer(player).getAlchemyManager();
|
||||
String[] displayValues = new String[2];
|
||||
|
||||
displayValues[0] = decimal.format(alchemyManager.calculateBrewSpeed(false)) + "x";
|
||||
displayValues[1] = isLucky ? decimal.format(alchemyManager.calculateBrewSpeed(true)) + "x" : null;
|
||||
|
||||
return displayValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// CATALYSIS
|
||||
if (canCatalysis) {
|
||||
String[] catalysisStrings = calculateAbilityDisplayValues(player, isLucky);
|
||||
brewSpeed = catalysisStrings[0];
|
||||
brewSpeedLucky = catalysisStrings[1];
|
||||
}
|
||||
|
||||
// CONCOCTIONS
|
||||
if (canConcoctions) {
|
||||
AlchemyManager alchemyManager = UserManager.getPlayer(player).getAlchemyManager();
|
||||
tier = alchemyManager.getTier();
|
||||
ingredientCount = alchemyManager.getIngredients().size();
|
||||
ingredientList = alchemyManager.getIngredientList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canCatalysis = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CATALYSIS);
|
||||
canConcoctions = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CONCOCTIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCatalysis) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Alchemy.Effect.0"), LocaleLoader.getString("Alchemy.Effect.1")));
|
||||
}
|
||||
|
||||
if (canConcoctions) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Alchemy.Effect.2"), LocaleLoader.getString("Alchemy.Effect.3")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCatalysis) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getCatalysisUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Alchemy.Ability.Locked.0", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
messages.add(LocaleLoader.getString("Alchemy.Catalysis.Speed", brewSpeed) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", brewSpeedLucky) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
if (canConcoctions) {
|
||||
messages.add(LocaleLoader.getString("Alchemy.Concoctions.Rank", tier, Tier.values().length));
|
||||
messages.add(LocaleLoader.getString("Alchemy.Concoctions.Ingredients", ingredientCount, ingredientList));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.HolidayManager.FakeSkillType;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class AprilCommand implements TabExecutor {
|
||||
private String skillName;
|
||||
|
||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (CommandUtils.noConsoleUsage(sender)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
skillName = StringUtils.getCapitalized(label);
|
||||
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
Player player = (Player) sender;
|
||||
FakeSkillType fakeSkillType = FakeSkillType.getByName(skillName);
|
||||
|
||||
float skillValue = Misc.getRandom().nextInt(99);
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.XPGain", getXPGainString(fakeSkillType)));
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, Misc.getRandom().nextInt(1000), 1000 + Misc.getRandom().nextInt(1000)));
|
||||
|
||||
|
||||
List<String> effectMessages = effectsDisplay(fakeSkillType);
|
||||
|
||||
if (!effectMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||
|
||||
for (String message : effectMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> statsMessages = statsDisplay(fakeSkillType);
|
||||
|
||||
if (!statsMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
|
||||
|
||||
for (String message : statsMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.formatString("[[DARK_AQUA]]Guide for {0} available - type /APRIL FOOLS ! :D", skillName));
|
||||
return true;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private String getXPGainString(FakeSkillType fakeSkillType) {
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
return "Get beaten up";
|
||||
case JUMPING:
|
||||
return "Kris Kross will make ya Jump Jump";
|
||||
case THROWING:
|
||||
return "Chuck your items on the floor";
|
||||
case WRECKING:
|
||||
return "I'M GONNA WRECK IT!";
|
||||
case CRAFTING:
|
||||
return "Craft apple pies";
|
||||
case WALKING:
|
||||
return "Walk around the park";
|
||||
case SWIMMING:
|
||||
return "Like a fish on a bicycle";
|
||||
case FALLING:
|
||||
return "Faceplant the floor, headbutt the ground";
|
||||
case CLIMBING:
|
||||
return "Climb the highest mountain";
|
||||
case FLYING:
|
||||
return "I believe I can fly";
|
||||
case DIVING:
|
||||
return "Scuba club 4000";
|
||||
case PIGGY:
|
||||
return "OINK! OINK!";
|
||||
default:
|
||||
return "Sit and wait?";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
return ImmutableList.of("?");
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> effectsDisplay(FakeSkillType fakeSkillType) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Punching bag", "Absorb damage, like a bag of sand"));
|
||||
break;
|
||||
case JUMPING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Jump", "PRESS SPACE TO JUMP"));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Jump Twice", "PRESS SPACE TWICE TO JUMP TWICE"));
|
||||
break;
|
||||
case THROWING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Drop Item", "Randomly drop items, at random"));
|
||||
break;
|
||||
case WRECKING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Ralphinator", "Smash windows with your fists"));
|
||||
break;
|
||||
case CRAFTING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Crafting", "Chance of successful craft"));
|
||||
break;
|
||||
case WALKING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Walk", "Traveling gracefully by foot"));
|
||||
break;
|
||||
case SWIMMING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Swim", "Just keep swimming, swimming, swimming"));
|
||||
break;
|
||||
case FALLING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Skydiving", "Go jump of a cliff. No, seriously."));
|
||||
break;
|
||||
case CLIMBING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Rock Climber", "Use string to climb mountains faster"));
|
||||
break;
|
||||
case FLYING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Fly", "Throw yourself at the ground and miss"));
|
||||
break;
|
||||
case DIVING:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Hold Breath", "Press shift to hold your breath longer"));
|
||||
break;
|
||||
case PIGGY:
|
||||
messages.add(LocaleLoader.getString("Effects.Template", "Carrot Turbo", "Supercharge your pigs with carrots"));
|
||||
break;
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
private List<String> statsDisplay(FakeSkillType fakeSkillType) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
switch (fakeSkillType) {
|
||||
case MACHO:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Damage Taken: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(77))));
|
||||
break;
|
||||
case JUMPING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Double Jump Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case THROWING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Drop Item Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(87))));
|
||||
break;
|
||||
case WRECKING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Wrecking Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(14))));
|
||||
break;
|
||||
case CRAFTING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Crafting Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case WALKING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Walk Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case SWIMMING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Swim Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case FALLING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Skydiving Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(37))));
|
||||
break;
|
||||
case CLIMBING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Rock Climber Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case FLYING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Fly Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case DIVING:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Hold Breath Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||
break;
|
||||
case PIGGY:
|
||||
messages.add(LocaleLoader.formatString("[[RED]]Carrot Turbo Boost: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(80)) + 10));
|
||||
break;
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.archery.Archery;
|
||||
@@ -21,7 +27,7 @@ public class ArcheryCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// SKILL SHOT
|
||||
if (canSkillShot) {
|
||||
double bonus = (skillValue / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage;
|
||||
@@ -30,65 +36,61 @@ public class ArcheryCommand extends SkillCommand {
|
||||
|
||||
// DAZE
|
||||
if (canDaze) {
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(Archery.dazeMaxBonusLevel, Archery.dazeMaxBonus);
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DAZE, isLucky);
|
||||
dazeChance = dazeStrings[0];
|
||||
dazeChanceLucky = dazeStrings[1];
|
||||
}
|
||||
|
||||
// RETRIEVE
|
||||
if (canRetrieve) {
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(Archery.retrieveMaxBonusLevel, Archery.retrieveMaxChance);
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.RETRIEVE, isLucky);
|
||||
retrieveChance = retrieveStrings[0];
|
||||
retrieveChanceLucky = retrieveStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canSkillShot = Permissions.bonusDamage(player, skill);
|
||||
canDaze = Permissions.daze(player);
|
||||
canRetrieve = Permissions.arrowRetrieval(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkillShot = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SKILL_SHOT);
|
||||
canDaze = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DAZE);
|
||||
canRetrieve = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.RETRIEVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canSkillShot || canDaze || canRetrieve;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canSkillShot) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.0"), LocaleLoader.getString("Archery.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.0"), LocaleLoader.getString("Archery.Effect.1")));
|
||||
}
|
||||
|
||||
if (canDaze) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
|
||||
}
|
||||
|
||||
if (canRetrieve) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.4"), LocaleLoader.getString("Archery.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.4"), LocaleLoader.getString("Archery.Effect.5")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canSkillShot || canDaze || canRetrieve;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canSkillShot) {
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.SkillshotBonus", skillShotBonus));
|
||||
messages.add(LocaleLoader.getString("Archery.Combat.SkillshotBonus", skillShotBonus));
|
||||
}
|
||||
|
||||
if (canDaze) {
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", dazeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dazeChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Archery.Combat.DazeChance", dazeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dazeChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canRetrieve) {
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", retrieveChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", retrieveChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Archery.Combat.RetrieveChance", retrieveChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", retrieveChanceLucky) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.axes.Axes;
|
||||
@@ -8,14 +14,14 @@ import com.gmail.nossr50.util.Permissions;
|
||||
public class AxesCommand extends SkillCommand {
|
||||
private String critChance;
|
||||
private String critChanceLucky;
|
||||
private double bonusDamage;
|
||||
private double axeMasteryDamage;
|
||||
private double impactDamage;
|
||||
private String skullSplitterLength;
|
||||
private String skullSplitterLengthEndurance;
|
||||
|
||||
private boolean canSkullSplitter;
|
||||
private boolean canCritical;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canAxeMastery;
|
||||
private boolean canImpact;
|
||||
private boolean canGreaterImpact;
|
||||
|
||||
@@ -24,96 +30,92 @@ public class AxesCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
// IMPACT
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// ARMOR IMPACT
|
||||
if (canImpact) {
|
||||
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
||||
}
|
||||
|
||||
// SKULL SPLITTER
|
||||
if (canSkullSplitter) {
|
||||
String[] skullSplitterStrings = calculateLengthDisplayValues();
|
||||
String[] skullSplitterStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
skullSplitterLength = skullSplitterStrings[0];
|
||||
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
||||
}
|
||||
|
||||
// CRITICAL STRIKES
|
||||
// CRITICAL HIT
|
||||
if (canCritical) {
|
||||
String[] criticalStrikeStrings = calculateAbilityDisplayValues(Axes.criticalHitMaxBonusLevel, Axes.criticalHitMaxChance);
|
||||
critChance = criticalStrikeStrings[0];
|
||||
critChanceLucky = criticalStrikeStrings[1];
|
||||
String[] criticalHitStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.CRITICAL_HIT, isLucky);
|
||||
critChance = criticalHitStrings[0];
|
||||
critChanceLucky = criticalHitStrings[1];
|
||||
}
|
||||
|
||||
// AXE MASTERY
|
||||
if (canBonusDamage) {
|
||||
bonusDamage = Math.min(skillValue / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
||||
if (canAxeMastery) {
|
||||
axeMasteryDamage = Math.min(skillValue / (Axes.axeMasteryMaxBonusLevel / Axes.axeMasteryMaxBonus), Axes.axeMasteryMaxBonus);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkullSplitter = Permissions.skullSplitter(player);
|
||||
canCritical = Permissions.criticalStrikes(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canImpact = Permissions.armorImpact(player);
|
||||
canGreaterImpact = Permissions.greaterImpact(player);
|
||||
canCritical = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.CRITICAL_HIT);
|
||||
canAxeMastery = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.AXE_MASTERY);
|
||||
canImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARMOR_IMPACT);
|
||||
canGreaterImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GREATER_IMPACT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canSkullSplitter || canCritical || canBonusDamage || canImpact || canGreaterImpact;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canSkullSplitter) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.0"), LocaleLoader.getString("Axes.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.0"), LocaleLoader.getString("Axes.Effect.1")));
|
||||
}
|
||||
|
||||
if (canCritical) {
|
||||
player.sendMessage(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) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
|
||||
}
|
||||
|
||||
if (canImpact) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.6"), LocaleLoader.getString("Axes.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.6"), LocaleLoader.getString("Axes.Effect.7")));
|
||||
}
|
||||
|
||||
if (canGreaterImpact) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.8"), LocaleLoader.getString("Axes.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.8"), LocaleLoader.getString("Axes.Effect.9")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canSkullSplitter || canCritical || canBonusDamage || canImpact || canGreaterImpact;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canBonusDamage) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", axeMasteryDamage)));
|
||||
}
|
||||
|
||||
if (canImpact) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.2"), LocaleLoader.getString("Axes.Ability.Bonus.3", impactDamage)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.2"), LocaleLoader.getString("Axes.Ability.Bonus.3", impactDamage)));
|
||||
}
|
||||
|
||||
if (canGreaterImpact) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", Axes.greaterImpactBonusDamage)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", Axes.greaterImpactBonusDamage)));
|
||||
}
|
||||
|
||||
if (canCritical) {
|
||||
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", critChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", critChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Axes.Combat.CritChance", critChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", critChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canSkullSplitter) {
|
||||
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", skullSplitterLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", skullSplitterLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Axes.Combat.SS.Length", skullSplitterLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", skullSplitterLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@@ -16,48 +22,44 @@ public class ExcavationCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// GIGA DRILL BREAKER
|
||||
if (canGigaDrill) {
|
||||
String gigaDrillStrings[] = calculateLengthDisplayValues();
|
||||
String gigaDrillStrings[] = calculateLengthDisplayValues(player, skillValue);
|
||||
gigaDrillBreakerLength = gigaDrillStrings[0];
|
||||
gigaDrillBreakerLengthEndurance = gigaDrillStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
protected void permissionsCheck(Player player) {
|
||||
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.EXCAVATION_TREASURE_HUNTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canGigaDrill || canTreasureHunt;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canGigaDrill) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1")));
|
||||
}
|
||||
|
||||
if (canTreasureHunt) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canGigaDrill;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canGigaDrill) {
|
||||
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.fishing.Fishing;
|
||||
import com.gmail.nossr50.skills.fishing.Fishing.Tier;
|
||||
import com.gmail.nossr50.skills.fishing.FishingManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@@ -43,52 +48,56 @@ public class FishingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
boolean isStorming = player.getWorld().hasStorm();
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
|
||||
|
||||
// TREASURE HUNTER
|
||||
if (canTreasureHunt) {
|
||||
lootTier = mcMMOPlayer.getFishingManager().getLootTier();
|
||||
lootTier = fishingManager.getLootTier();
|
||||
|
||||
// Item drop rates
|
||||
trapTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.TRAP))[0];
|
||||
commonTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.COMMON))[0];
|
||||
uncommonTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.UNCOMMON))[0];
|
||||
rareTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RARE))[0];
|
||||
epicTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.EPIC))[0];
|
||||
legendaryTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.LEGENDARY))[0];
|
||||
recordTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RECORD))[0];
|
||||
trapTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.TRAP) / 100.0);
|
||||
commonTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.COMMON) / 100.0);
|
||||
uncommonTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.UNCOMMON) / 100.0);
|
||||
rareTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RARE) / 100.0);
|
||||
epicTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.EPIC) / 100.0);
|
||||
legendaryTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.LEGENDARY) / 100.0);
|
||||
recordTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RECORD) / 100.0);
|
||||
|
||||
// Magic hunter drop rates
|
||||
double commonEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.COMMON);
|
||||
double uncommonEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.UNCOMMON);
|
||||
double rareEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.RARE);
|
||||
double epicEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.EPIC);
|
||||
double legendaryEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.LEGENDARY);
|
||||
double totalEnchantChance = 0;
|
||||
|
||||
magicChance = calculateAbilityDisplayValues(commonEnchantment + uncommonEnchantment + rareEnchantment + epicEnchantment + legendaryEnchantment)[0];
|
||||
for (Rarity rarity : Rarity.values()) {
|
||||
if (rarity != Rarity.TRAP && rarity != Rarity.RECORD) {
|
||||
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
||||
}
|
||||
}
|
||||
|
||||
magicChance = percent.format(totalEnchantChance / 100.0);
|
||||
}
|
||||
|
||||
// SHAKE
|
||||
if (canShake) {
|
||||
String[] shakeStrings = calculateAbilityDisplayValues(UserManager.getPlayer(player).getFishingManager().getShakeProbability());
|
||||
String[] shakeStrings = calculateAbilityDisplayValues(UserManager.getPlayer(player).getFishingManager().getShakeProbability(), isLucky);
|
||||
shakeChance = shakeStrings[0];
|
||||
shakeChanceLucky = shakeStrings[1];
|
||||
}
|
||||
|
||||
// FISHERMAN'S DIET
|
||||
if (canFishermansDiet) {
|
||||
fishermansDietRank = calculateRank(Fishing.fishermansDietMaxLevel, Fishing.fishermansDietRankLevel1);
|
||||
fishermansDietRank = calculateRank(skillValue, Fishing.fishermansDietMaxLevel, Fishing.fishermansDietRankLevel1);
|
||||
}
|
||||
|
||||
// MASTER ANGLER
|
||||
if (canMasterAngler) {
|
||||
double rawBiteChance = 1.0 / (isStorming ? 300 : 500);
|
||||
Location location = (mcMMOPlayer.getHookLocation() != null) ? mcMMOPlayer.getHookLocation() : player.getLocation();
|
||||
double rawBiteChance = 1.0 / (player.getWorld().hasStorm() ? 300 : 500);
|
||||
Location location = fishingManager.getHookLocation();
|
||||
|
||||
Biome biome = location.getBlock().getBiome();
|
||||
if (location == null) {
|
||||
location = player.getLocation();
|
||||
}
|
||||
|
||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||
if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
|
||||
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||
}
|
||||
|
||||
@@ -96,78 +105,72 @@ public class FishingCommand extends SkillCommand {
|
||||
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBoatModifier();
|
||||
}
|
||||
|
||||
biteChance = calculateAbilityDisplayValues(rawBiteChance * 100.0)[0];
|
||||
biteChance = calculateAbilityDisplayValues(rawBiteChance * 100.0, isLucky)[0];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canTreasureHunt = Permissions.fishingTreasureHunter(player);
|
||||
canMagicHunt = Permissions.magicHunter(player);
|
||||
canShake = Permissions.shake(player);
|
||||
canFishermansDiet = Permissions.fishermansDiet(player);
|
||||
canMasterAngler = Permissions.masterAngler(player);
|
||||
canIceFish = Permissions.iceFishing(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHING_TREASURE_HUNTER);
|
||||
canMagicHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MAGIC_HUNTER);
|
||||
canShake = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHAKE);
|
||||
canFishermansDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FISHERMANS_DIET);
|
||||
canMasterAngler = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MASTER_ANGLER);
|
||||
canIceFish = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ICE_FISHING);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canTreasureHunt || canMagicHunt || canShake || canMasterAngler || canFishermansDiet || canIceFish;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canTreasureHunt) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.0"), LocaleLoader.getString("Fishing.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.0"), LocaleLoader.getString("Fishing.Effect.1")));
|
||||
}
|
||||
|
||||
if (canMagicHunt) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.2"), LocaleLoader.getString("Fishing.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.2"), LocaleLoader.getString("Fishing.Effect.3")));
|
||||
}
|
||||
|
||||
if (canIceFish) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.10"), LocaleLoader.getString("Fishing.Effect.11")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.10"), LocaleLoader.getString("Fishing.Effect.11")));
|
||||
}
|
||||
|
||||
if (canMasterAngler) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.8"), LocaleLoader.getString("Fishing.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.8"), LocaleLoader.getString("Fishing.Effect.9")));
|
||||
}
|
||||
|
||||
if (canShake) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.4"), LocaleLoader.getString("Fishing.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.4"), LocaleLoader.getString("Fishing.Effect.5")));
|
||||
}
|
||||
|
||||
if (canFishermansDiet) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.6"), LocaleLoader.getString("Fishing.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.6"), LocaleLoader.getString("Fishing.Effect.7")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canTreasureHunt || canMagicHunt || canShake || canMasterAngler || canFishermansDiet || canIceFish;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canTreasureHunt) {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.EIGHT.toNumerical()));
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.DropRate", trapTreasure, commonTreasure, uncommonTreasure, rareTreasure, epicTreasure, legendaryTreasure, recordTreasure));
|
||||
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));
|
||||
}
|
||||
|
||||
if (canMagicHunt) {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicRate", magicChance));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.TH.MagicRate", magicChance));
|
||||
}
|
||||
|
||||
if (canIceFish) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getIceFishingUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.1", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.1", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.IceFishing"));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.IceFishing"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,10 +178,10 @@ public class FishingCommand extends SkillCommand {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getMasterAnglerUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.2", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.2", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Chance", biteChance));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.Chance", biteChance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,15 +189,17 @@ public class FishingCommand extends SkillCommand {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getFishingTierLevel(Tier.ONE);
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", shakeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shakeChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.Shake", shakeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shakeChanceLucky) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
if (canFishermansDiet) {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.FD", fishermansDietRank));
|
||||
messages.add(LocaleLoader.getString("Fishing.Ability.FD", fishermansDietRank));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.herbalism.Herbalism;
|
||||
@@ -34,132 +39,128 @@ public class HerbalismCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// GREEN TERRA
|
||||
if (canGreenTerra) {
|
||||
String[] greenTerraStrings = calculateLengthDisplayValues();
|
||||
String[] greenTerraStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
greenTerraLength = greenTerraStrings[0];
|
||||
greenTerraLengthEndurance = greenTerraStrings[1];
|
||||
}
|
||||
|
||||
// FARMERS DIET
|
||||
if (canFarmersDiet) {
|
||||
farmersDietRank = calculateRank(Herbalism.farmersDietMaxLevel, Herbalism.farmersDietRankLevel1);
|
||||
farmersDietRank = calculateRank(skillValue, Herbalism.farmersDietMaxLevel, Herbalism.farmersDietRankLevel1);
|
||||
}
|
||||
|
||||
// GREEN THUMB
|
||||
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
||||
greenThumbStage = calculateRank(Herbalism.greenThumbStageMaxLevel, Herbalism.greenThumbStageChangeLevel);
|
||||
greenThumbStage = calculateRank(skillValue, Herbalism.greenThumbStageMaxLevel, Herbalism.greenThumbStageChangeLevel);
|
||||
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(Herbalism.greenThumbMaxLevel, Herbalism.greenThumbMaxChance);
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GREEN_THUMB_PLANT, isLucky);
|
||||
greenThumbChance = greenThumbStrings[0];
|
||||
greenThumbChanceLucky = greenThumbStrings[1];
|
||||
}
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(Herbalism.doubleDropsMaxLevel, Herbalism.doubleDropsMaxChance);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HERBALISM_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
|
||||
// HYLIAN LUCK
|
||||
if (hasHylianLuck) {
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(Herbalism.hylianLuckMaxLevel, Herbalism.hylianLuckMaxChance);
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.HYLIAN_LUCK, isLucky);
|
||||
hylianLuckChance = hylianLuckStrings[0];
|
||||
hylianLuckChanceLucky = hylianLuckStrings[1];
|
||||
}
|
||||
|
||||
// SHROOM THUMB
|
||||
if (canShroomThumb) {
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(Herbalism.shroomThumbMaxLevel, Herbalism.shroomThumbMaxChance);
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SHROOM_THUMB, isLucky);
|
||||
shroomThumbChance = shroomThumbStrings[0];
|
||||
shroomThumbChanceLucky = shroomThumbStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
hasHylianLuck = Permissions.hylianLuck(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HYLIAN_LUCK);
|
||||
canGreenTerra = Permissions.greenTerra(player);
|
||||
canGreenThumbPlants = Permissions.greenThumbPlant(player, Material.CROPS) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.NETHER_WARTS) || Permissions.greenThumbPlant(player, Material.COCOA);
|
||||
canGreenThumbBlocks = Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLE_WALL) || Permissions.greenThumbBlock(player, Material.SMOOTH_BRICK);
|
||||
canFarmersDiet = Permissions.farmersDiet(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.shroomThumb(player);
|
||||
canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FARMERS_DIET);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canGreenTerra || canDoubleDrop || canFarmersDiet || canGreenThumbBlocks || canGreenThumbPlants || canShroomThumb;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canGreenTerra) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.0"), LocaleLoader.getString("Herbalism.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.0"), LocaleLoader.getString("Herbalism.Effect.1")));
|
||||
}
|
||||
|
||||
if (canGreenThumbPlants) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.2"), LocaleLoader.getString("Herbalism.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.2"), LocaleLoader.getString("Herbalism.Effect.3")));
|
||||
}
|
||||
|
||||
if (canGreenThumbBlocks) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.4"), LocaleLoader.getString("Herbalism.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.4"), LocaleLoader.getString("Herbalism.Effect.5")));
|
||||
}
|
||||
|
||||
if (canFarmersDiet) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.6"), LocaleLoader.getString("Herbalism.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.6"), LocaleLoader.getString("Herbalism.Effect.7")));
|
||||
}
|
||||
|
||||
if (hasHylianLuck) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.10"), LocaleLoader.getString("Herbalism.Effect.11")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.10"), LocaleLoader.getString("Herbalism.Effect.11")));
|
||||
}
|
||||
|
||||
if (canShroomThumb) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.12"), LocaleLoader.getString("Herbalism.Effect.13")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.12"), LocaleLoader.getString("Herbalism.Effect.13")));
|
||||
}
|
||||
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.8"), LocaleLoader.getString("Herbalism.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.8"), LocaleLoader.getString("Herbalism.Effect.9")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canGreenTerra || canDoubleDrop || canFarmersDiet || canGreenThumbBlocks || canGreenThumbPlants || canShroomThumb;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canGreenTerra) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", greenTerraLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", greenTerraLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.GTe.Length", greenTerraLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", greenTerraLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", greenThumbChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", greenThumbChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", greenThumbChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", greenThumbChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canGreenThumbPlants) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Stage", greenThumbStage));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.GTh.Stage", greenThumbStage));
|
||||
}
|
||||
|
||||
if (canFarmersDiet) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.FD", farmersDietRank));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.FD", farmersDietRank));
|
||||
}
|
||||
|
||||
if (hasHylianLuck) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.HylianLuck", hylianLuckChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", hylianLuckChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.HylianLuck", hylianLuckChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", hylianLuckChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canShroomThumb) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.ShroomThumb.Chance", shroomThumbChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shroomThumbChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.ShroomThumb.Chance", shroomThumbChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shroomThumbChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
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.mining.BlastMining.Tier;
|
||||
import com.gmail.nossr50.skills.mining.Mining;
|
||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class MiningCommand extends SkillCommand {
|
||||
private String doubleDropChance;
|
||||
@@ -32,24 +38,24 @@ public class MiningCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// SUPER BREAKER
|
||||
if (canSuperBreaker) {
|
||||
String[] superBreakerStrings = calculateLengthDisplayValues();
|
||||
String[] superBreakerStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
superBreakerLength = superBreakerStrings[0];
|
||||
superBreakerLengthEndurance = superBreakerStrings[1];
|
||||
}
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(Mining.doubleDropsMaxLevel, Mining.doubleDropsMaxChance);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.MINING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
|
||||
// BLAST MINING
|
||||
if (canBlast || canDemoExpert || canBiggerBombs) {
|
||||
MiningManager miningManager = mcMMOPlayer.getMiningManager();
|
||||
MiningManager miningManager = UserManager.getPlayer(player).getMiningManager();
|
||||
|
||||
blastMiningRank = miningManager.getBlastMiningTier();
|
||||
bonusTNTDrops = miningManager.getDropMultiplier();
|
||||
@@ -61,67 +67,61 @@ public class MiningCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBiggerBombs = Permissions.biggerBombs(player);
|
||||
canBlast = Permissions.remoteDetonation(player);
|
||||
canDemoExpert = Permissions.demolitionsExpertise(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.MINING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canSuperBreaker = Permissions.superBreaker(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canBiggerBombs || canBlast || canDemoExpert || canDoubleDrop || canSuperBreaker;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canSuperBreaker) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.0"), LocaleLoader.getString("Mining.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.0"), LocaleLoader.getString("Mining.Effect.1")));
|
||||
}
|
||||
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.2"), LocaleLoader.getString("Mining.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.2"), LocaleLoader.getString("Mining.Effect.3")));
|
||||
}
|
||||
|
||||
if (canBlast) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.4"), LocaleLoader.getString("Mining.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.4"), LocaleLoader.getString("Mining.Effect.5")));
|
||||
}
|
||||
|
||||
if (canBiggerBombs) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.6"), LocaleLoader.getString("Mining.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.6"), LocaleLoader.getString("Mining.Effect.7")));
|
||||
}
|
||||
|
||||
if (canDemoExpert) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.8"), LocaleLoader.getString("Mining.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.8"), LocaleLoader.getString("Mining.Effect.9")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canBiggerBombs || canBlast || canDemoExpert || canDoubleDrop || canSuperBreaker;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canSuperBreaker) {
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
if (canBlast) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.ONE);
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(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 {
|
||||
player.sendMessage(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)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,10 +129,10 @@ public class MiningCommand extends SkillCommand {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.TWO);
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease));
|
||||
messages.add(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,11 +140,13 @@ public class MiningCommand extends SkillCommand {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.FOUR);
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease));
|
||||
messages.add(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease));
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
@@ -11,6 +17,7 @@ import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.repair.RepairManager;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class RepairCommand extends SkillCommand {
|
||||
private String repairMasteryBonus;
|
||||
@@ -20,7 +27,6 @@ public class RepairCommand extends SkillCommand {
|
||||
private boolean canSuperRepair;
|
||||
private boolean canMasterRepair;
|
||||
private boolean canArcaneForge;
|
||||
private boolean canSalvage;
|
||||
private boolean canRepairStone;
|
||||
private boolean canRepairIron;
|
||||
private boolean canRepairGold;
|
||||
@@ -40,7 +46,7 @@ public class RepairCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// We're using pickaxes here, not the best but it works
|
||||
Repairable diamondRepairable = mcMMO.getRepairableManager().getRepairable(Material.DIAMOND_PICKAXE);
|
||||
Repairable goldRepairable = mcMMO.getRepairableManager().getRepairable(Material.GOLD_PICKAXE);
|
||||
@@ -60,101 +66,94 @@ public class RepairCommand extends SkillCommand {
|
||||
|
||||
// SUPER REPAIR
|
||||
if (canSuperRepair) {
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(Repair.superRepairMaxBonusLevel, Repair.superRepairMaxChance);
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SUPER_REPAIR, isLucky);
|
||||
superRepairChance = superRepairStrings[0];
|
||||
superRepairChanceLucky = superRepairStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canSuperRepair = Permissions.superRepair(player);
|
||||
canMasterRepair = Permissions.repairMastery(player);
|
||||
canArcaneForge = Permissions.arcaneForging(player);
|
||||
canSalvage = Permissions.salvage(player);
|
||||
canRepairDiamond = Permissions.repairDiamond(player);
|
||||
canRepairGold = Permissions.repairGold(player);
|
||||
canRepairIron = Permissions.repairIron(player);
|
||||
canRepairStone = Permissions.repairStone(player);
|
||||
canRepairString = Permissions.repairString(player);
|
||||
canRepairLeather = Permissions.repairLeather(player);
|
||||
canRepairWood = Permissions.repairWood(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SUPER_REPAIR);
|
||||
canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.REPAIR_MASTERY);
|
||||
canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_FORGING);
|
||||
canRepairDiamond = Permissions.repairMaterialType(player, MaterialType.DIAMOND);
|
||||
canRepairGold = Permissions.repairMaterialType(player, MaterialType.GOLD);
|
||||
canRepairIron = Permissions.repairMaterialType(player, MaterialType.IRON);
|
||||
canRepairStone = Permissions.repairMaterialType(player, MaterialType.STONE);
|
||||
canRepairString = Permissions.repairMaterialType(player, MaterialType.STRING);
|
||||
canRepairLeather = Permissions.repairMaterialType(player, MaterialType.LEATHER);
|
||||
canRepairWood = Permissions.repairMaterialType(player, MaterialType.WOOD);
|
||||
arcaneBypass = Permissions.arcaneBypass(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canArcaneForge || canSalvage || canRepairDiamond || canRepairGold || canRepairIron || canMasterRepair || canRepairStone || canSuperRepair || canRepairString || canRepairWood || canRepairLeather;
|
||||
}
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1")));
|
||||
if (canRepairLeather || canRepairString || canRepairWood || canRepairStone || canRepairIron || canRepairGold || canRepairDiamond) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1")));
|
||||
}
|
||||
|
||||
if (canMasterRepair) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.2"), LocaleLoader.getString("Repair.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.2"), LocaleLoader.getString("Repair.Effect.3")));
|
||||
}
|
||||
|
||||
if (canSuperRepair) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.4"), LocaleLoader.getString("Repair.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.4"), LocaleLoader.getString("Repair.Effect.5")));
|
||||
}
|
||||
|
||||
/* Repair Level Requirements */
|
||||
|
||||
if (canRepairStone && stoneLevel > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.14", stoneLevel), LocaleLoader.getString("Repair.Effect.15")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.14", stoneLevel), LocaleLoader.getString("Repair.Effect.15")));
|
||||
}
|
||||
|
||||
if (canRepairIron && ironLevel > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.12", ironLevel), LocaleLoader.getString("Repair.Effect.13")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.12", ironLevel), LocaleLoader.getString("Repair.Effect.13")));
|
||||
}
|
||||
|
||||
if (canRepairGold && goldLevel > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.10", goldLevel), LocaleLoader.getString("Repair.Effect.11")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.10", goldLevel), LocaleLoader.getString("Repair.Effect.11")));
|
||||
}
|
||||
|
||||
if (canRepairDiamond && diamondLevel > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7")));
|
||||
}
|
||||
|
||||
if (canSalvage && Repair.salvageUnlockLevel > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.16", Repair.salvageUnlockLevel), LocaleLoader.getString("Repair.Effect.17")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7")));
|
||||
}
|
||||
|
||||
if (canArcaneForge) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.8"), LocaleLoader.getString("Repair.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.8"), LocaleLoader.getString("Repair.Effect.9")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canArcaneForge || canMasterRepair || canSuperRepair;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canMasterRepair) {
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.Mastery", repairMasteryBonus));
|
||||
messages.add(LocaleLoader.getString("Repair.Skills.Mastery", repairMasteryBonus));
|
||||
}
|
||||
|
||||
if (canSuperRepair) {
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", superRepairChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", superRepairChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Repair.Skills.Super.Chance", superRepairChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", superRepairChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canArcaneForge) {
|
||||
RepairManager repairManager = mcMMOPlayer.getRepairManager();
|
||||
RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
|
||||
|
||||
player.sendMessage(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) {
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));
|
||||
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));
|
||||
}
|
||||
|
||||
if (ArcaneForging.arcaneForgingDowngrades) {
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Downgrade", (arcaneBypass ? 0 : repairManager.getDowngradeEnchantChance())));
|
||||
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Downgrade", (arcaneBypass ? 0 : repairManager.getDowngradeEnchantChance())));
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.salvage.Salvage;
|
||||
import com.gmail.nossr50.skills.salvage.SalvageManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class SalvageCommand extends SkillCommand {
|
||||
private boolean canAdvancedSalvage;
|
||||
private boolean canArcaneSalvage;
|
||||
|
||||
public SalvageCommand() {
|
||||
super(SkillType.SALVAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canAdvancedSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ADVANCED_SALVAGE);
|
||||
canArcaneSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_SALVAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canAdvancedSalvage) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Salvage.Effect.0"), LocaleLoader.getString("Salvage.Effect.1")));
|
||||
}
|
||||
|
||||
if (canArcaneSalvage) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Salvage.Effect.2"), LocaleLoader.getString("Salvage.Effect.3")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
SalvageManager salvageManager = UserManager.getPlayer(player).getSalvageManager();
|
||||
|
||||
if (canAdvancedSalvage) {
|
||||
if (skillValue < Salvage.advancedSalvageUnlockLevel) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Salvage.Ability.Locked.0", Salvage.advancedSalvageUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Ability.Bonus.0"), LocaleLoader.getString("Salvage.Ability.Bonus.1", percent.format(salvageManager.getMaxSalvagePercentage()))));
|
||||
}
|
||||
}
|
||||
|
||||
if (canArcaneSalvage) {
|
||||
messages.add(LocaleLoader.getString("Salvage.Arcane.Rank", salvageManager.getArcaneSalvageRank(), Salvage.Tier.values().length));
|
||||
|
||||
if (Salvage.arcaneSalvageEnchantLoss) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Arcane.ExtractFull"), percent.format(salvageManager.getExtractFullEnchantChance() / 100)));
|
||||
}
|
||||
|
||||
if (Salvage.arcaneSalvageDowngrades) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Salvage.Arcane.ExtractPartial"), percent.format(salvageManager.getExtractPartialEnchantChance() / 100)));
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,11 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
import com.gmail.nossr50.util.Motd;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
@@ -28,15 +29,7 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
public abstract class SkillCommand implements TabExecutor {
|
||||
protected SkillType skill;
|
||||
protected String skillName;
|
||||
|
||||
protected Player player;
|
||||
protected PlayerProfile profile;
|
||||
protected McMMOPlayer mcMMOPlayer;
|
||||
|
||||
protected float skillValue;
|
||||
protected boolean isLucky;
|
||||
protected boolean hasEndurance;
|
||||
private String skillName;
|
||||
|
||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||
@@ -55,19 +48,17 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
profile = mcMMOPlayer.getProfile();
|
||||
Player player = (Player) sender;
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
skillValue = profile.getSkillLevel(skill);
|
||||
isLucky = Permissions.lucky(sender, skill);
|
||||
hasEndurance = (PerksUtils.handleActivationPerks(player, 0, 0) != 0);
|
||||
boolean isLucky = Permissions.lucky(player, skill);
|
||||
boolean hasEndurance = (PerksUtils.handleActivationPerks(player, 0, 0) != 0);
|
||||
float skillValue = mcMMOPlayer.getSkillLevel(skill);
|
||||
|
||||
permissionsCheck();
|
||||
dataCalculations();
|
||||
permissionsCheck(player);
|
||||
dataCalculations(player, skillValue, isLucky);
|
||||
|
||||
if (Config.getInstance().getSkillUseBoard()) {
|
||||
ScoreboardManager.enablePlayerSkillScoreboard(player, skill);
|
||||
@@ -76,7 +67,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
if (!skill.isChildSkill()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.XPGain", LocaleLoader.getString("Commands.XPGain." + StringUtils.getCapitalized(skill.toString()))));
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, profile.getSkillXpLevel(skill), profile.getXpToLevel(skill)));
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, mcMMOPlayer.getSkillXpLevel(skill), mcMMOPlayer.getXpToLevel(skill)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName + " " + LocaleLoader.getString("Skills.Child")));
|
||||
@@ -87,21 +78,33 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
Set<SkillType> parents = FamilyTree.getParents(skill);
|
||||
|
||||
for (SkillType parent : parents) {
|
||||
player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level", profile.getSkillLevel(parent), profile.getSkillXpLevel(parent), profile.getXpToLevel(parent)));
|
||||
player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level", mcMMOPlayer.getSkillLevel(parent), mcMMOPlayer.getSkillXpLevel(parent), mcMMOPlayer.getXpToLevel(parent)));
|
||||
}
|
||||
}
|
||||
|
||||
if (effectsHeaderPermissions()) {
|
||||
List<String> effectMessages = effectsDisplay();
|
||||
|
||||
if (!effectMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||
|
||||
if (isLucky) {
|
||||
player.sendMessage(Motd.PERK_PREFIX + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
||||
}
|
||||
|
||||
for (String message : effectMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
effectsDisplay();
|
||||
List<String> statsMessages = statsDisplay(player, skillValue, hasEndurance, isLucky);
|
||||
|
||||
if (statsHeaderPermissions()) {
|
||||
if (!statsMessages.isEmpty()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
|
||||
}
|
||||
|
||||
statsDisplay();
|
||||
for (String message : statsMessages) {
|
||||
player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Guides.Available", skillName, skillName.toLowerCase()));
|
||||
return true;
|
||||
@@ -121,11 +124,11 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
protected int calculateRank(int maxLevel, int rankChangeLevel) {
|
||||
protected int calculateRank(float skillValue, int maxLevel, int rankChangeLevel) {
|
||||
return Math.min((int) skillValue, maxLevel) / rankChangeLevel;
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(double chance) {
|
||||
protected String[] calculateAbilityDisplayValues(double chance, boolean isLucky) {
|
||||
String[] displayValues = new String[2];
|
||||
|
||||
displayValues[0] = percent.format(Math.min(chance, 100.0D) / 100.0D);
|
||||
@@ -134,11 +137,13 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
return displayValues;
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(int maxBonusLevel, double maxChance) {
|
||||
return calculateAbilityDisplayValues((maxChance / maxBonusLevel) * Math.min(skillValue, maxBonusLevel));
|
||||
protected String[] calculateAbilityDisplayValues(float skillValue, SecondaryAbility skillAbility, boolean isLucky) {
|
||||
int maxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(skillAbility);
|
||||
|
||||
return calculateAbilityDisplayValues((AdvancedConfig.getInstance().getMaxChance(skillAbility) / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), isLucky);
|
||||
}
|
||||
|
||||
protected String[] calculateLengthDisplayValues() {
|
||||
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||
int maxLength = skill.getAbility().getMaxLength();
|
||||
int length = 2 + (int) (skillValue / AdvancedConfig.getInstance().getAbilityLength());
|
||||
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
||||
@@ -150,22 +155,11 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
return new String[] { String.valueOf(length), String.valueOf(enduranceLength) };
|
||||
}
|
||||
|
||||
protected void luckyEffectsDisplay() {
|
||||
if (isLucky) {
|
||||
String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
|
||||
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.Lucky.Name"), LocaleLoader.getString("Perks.Lucky.Desc", skillName)));
|
||||
}
|
||||
}
|
||||
protected abstract void dataCalculations(Player player, float skillValue, boolean isLucky);
|
||||
|
||||
protected abstract void dataCalculations();
|
||||
protected abstract void permissionsCheck(Player player);
|
||||
|
||||
protected abstract void permissionsCheck();
|
||||
protected abstract List<String> effectsDisplay();
|
||||
|
||||
protected abstract boolean effectsHeaderPermissions();
|
||||
|
||||
protected abstract void effectsDisplay();
|
||||
|
||||
protected abstract boolean statsHeaderPermissions();
|
||||
|
||||
protected abstract void statsDisplay();
|
||||
protected abstract List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky);
|
||||
}
|
||||
|
||||
@@ -15,13 +15,11 @@ public class SkillGuideCommand implements CommandExecutor {
|
||||
private String header;
|
||||
private ArrayList<String> guide;
|
||||
|
||||
private String invalidPage;
|
||||
private String invalidPage = LocaleLoader.getString("Guides.Page.Invalid");
|
||||
|
||||
public SkillGuideCommand(SkillType skillType) {
|
||||
header = LocaleLoader.getString("Guides.Header", skillType.getName());
|
||||
guide = getGuide(skillType);
|
||||
|
||||
invalidPage = LocaleLoader.getString("Guides.Page.Invalid");
|
||||
public SkillGuideCommand(SkillType skill) {
|
||||
header = LocaleLoader.getString("Guides.Header", skill.getName());
|
||||
guide = getGuide(skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,8 +66,8 @@ public class SkillGuideCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayList<String> grabPageContents(int pagenum) {
|
||||
int pageIndexStart = 8 * (pagenum - 1); // Determine what string to start at
|
||||
private ArrayList<String> grabPageContents(int page) {
|
||||
int pageIndexStart = 8 * (page - 1); // Determine what string to start at
|
||||
ArrayList<String> allStrings = new ArrayList<String>();
|
||||
|
||||
allStrings.add(header);
|
||||
@@ -84,15 +82,15 @@ public class SkillGuideCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
allStrings.add("Page " + pagenum + " of " + getTotalPageNumber());
|
||||
allStrings.add("Page " + page + " of " + getTotalPageNumber());
|
||||
return allStrings;
|
||||
}
|
||||
|
||||
private ArrayList<String> getGuide(SkillType skillType) {
|
||||
private ArrayList<String> getGuide(SkillType skill) {
|
||||
ArrayList<String> guide = new ArrayList<String>();
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String[] section = LocaleLoader.getString("Guides." + StringUtils.getCapitalized(skillType.toString()) + ".Section." + i).split("\n");
|
||||
String[] section = LocaleLoader.getString("Guides." + StringUtils.getCapitalized(skill.toString()) + ".Section." + i).split("\n");
|
||||
|
||||
if (section[0].startsWith("!")) {
|
||||
break;
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
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.smelting.Smelting;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class SmeltingCommand extends SkillCommand {
|
||||
private String burnTimeModifier;
|
||||
@@ -24,7 +31,7 @@ public class SmeltingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// FUEL EFFICIENCY
|
||||
if (canFuelEfficiency) {
|
||||
burnTimeModifier = decimal.format(1 + ((skillValue / Smelting.burnModifierMaxLevel) * Smelting.burnTimeMultiplier));
|
||||
@@ -32,86 +39,82 @@ public class SmeltingCommand extends SkillCommand {
|
||||
|
||||
// SECOND SMELT
|
||||
if (canSecondSmelt) {
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(Smelting.secondSmeltMaxLevel, Smelting.secondSmeltMaxChance);
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.SECOND_SMELT, isLucky);
|
||||
secondSmeltChance = secondSmeltStrings[0];
|
||||
secondSmeltChanceLucky = secondSmeltStrings[1];
|
||||
}
|
||||
|
||||
// FLUX MINING
|
||||
if (canFluxMine) {
|
||||
String[] fluxMiningStrings = calculateAbilityDisplayValues(Smelting.fluxMiningChance);
|
||||
String[] fluxMiningStrings = calculateAbilityDisplayValues(Smelting.fluxMiningChance, isLucky);
|
||||
fluxMiningChance = fluxMiningStrings[0];
|
||||
fluxMiningChanceLucky = fluxMiningStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canFuelEfficiency = Permissions.fuelEfficiency(player);
|
||||
canSecondSmelt = Permissions.doubleDrops(player, skill);
|
||||
canFluxMine = Permissions.fluxMining(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canFuelEfficiency = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FUEL_EFFICIENCY);
|
||||
canSecondSmelt = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SECOND_SMELT);
|
||||
canFluxMine = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FLUX_MINING);
|
||||
canVanillaXPBoost = Permissions.vanillaXpBoost(player, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canFluxMine || canFuelEfficiency || canSecondSmelt || canVanillaXPBoost;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canFuelEfficiency) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.0"), LocaleLoader.getString("Smelting.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.0"), LocaleLoader.getString("Smelting.Effect.1")));
|
||||
}
|
||||
|
||||
if (canSecondSmelt) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.2"), LocaleLoader.getString("Smelting.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.2"), LocaleLoader.getString("Smelting.Effect.3")));
|
||||
}
|
||||
|
||||
if (canVanillaXPBoost) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.4"), LocaleLoader.getString("Smelting.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.4"), LocaleLoader.getString("Smelting.Effect.5")));
|
||||
}
|
||||
|
||||
if (canFluxMine) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.6"), LocaleLoader.getString("Smelting.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.6"), LocaleLoader.getString("Smelting.Effect.7")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canFluxMine || canFuelEfficiency || canSecondSmelt || canVanillaXPBoost;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canFuelEfficiency) {
|
||||
player.sendMessage(LocaleLoader.getString("Smelting.Ability.FuelEfficiency", burnTimeModifier));
|
||||
messages.add(LocaleLoader.getString("Smelting.Ability.FuelEfficiency", burnTimeModifier));
|
||||
}
|
||||
|
||||
if (canSecondSmelt) {
|
||||
player.sendMessage(LocaleLoader.getString("Smelting.Ability.SecondSmelt", secondSmeltChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", secondSmeltChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Smelting.Ability.SecondSmelt", secondSmeltChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", secondSmeltChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canVanillaXPBoost) {
|
||||
int unlockLevel = AdvancedConfig.getInstance().getSmeltingRankLevel(Tier.ONE);
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.0", unlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.0", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Smelting.Ability.VanillaXPBoost", mcMMOPlayer.getSmeltingManager().getVanillaXpMultiplier()));
|
||||
messages.add(LocaleLoader.getString("Smelting.Ability.VanillaXPBoost", UserManager.getPlayer(player).getSmeltingManager().getVanillaXpMultiplier()));
|
||||
}
|
||||
}
|
||||
|
||||
if (canFluxMine) {
|
||||
if (skillValue < Smelting.fluxMiningUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.1", Smelting.fluxMiningUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.1", Smelting.fluxMiningUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Smelting.Ability.FluxMining", fluxMiningChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", fluxMiningChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Smelting.Ability.FluxMining", fluxMiningChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", fluxMiningChanceLucky) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
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.swords.Swords;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class SwordsCommand extends SkillCommand {
|
||||
private String counterAttackChance;
|
||||
private String counterAttackChanceLucky;
|
||||
private String counterChance;
|
||||
private String counterChanceLucky;
|
||||
private int bleedLength;
|
||||
private String bleedChance;
|
||||
private String bleedChanceLucky;
|
||||
@@ -23,80 +30,76 @@ public class SwordsCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// SERRATED STRIKES
|
||||
if (canSerratedStrike) {
|
||||
String[] serratedStrikesStrings = calculateLengthDisplayValues();
|
||||
String[] serratedStrikesStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
serratedStrikesLength = serratedStrikesStrings[0];
|
||||
serratedStrikesLengthEndurance = serratedStrikesStrings[1];
|
||||
}
|
||||
|
||||
// BLEED
|
||||
if (canBleed) {
|
||||
bleedLength = (skillValue >= Swords.bleedMaxBonusLevel) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
bleedLength = (skillValue >= AdvancedConfig.getInstance().getMaxBonusLevel(SecondaryAbility.BLEED)) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(Swords.bleedMaxBonusLevel, Swords.bleedMaxChance);
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.BLEED, isLucky);
|
||||
bleedChance = bleedStrings[0];
|
||||
bleedChanceLucky = bleedStrings[1];
|
||||
}
|
||||
|
||||
// COUNTER ATTACK
|
||||
// COUNTER
|
||||
if (canCounter) {
|
||||
String[] counterAttackStrings = calculateAbilityDisplayValues(Swords.counterAttackMaxBonusLevel, Swords.counterAttackMaxChance);
|
||||
counterAttackChance = counterAttackStrings[0];
|
||||
counterAttackChanceLucky = counterAttackStrings[1];
|
||||
String[] counterStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.COUNTER, isLucky);
|
||||
counterChance = counterStrings[0];
|
||||
counterChanceLucky = counterStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canBleed = Permissions.bleed(player);
|
||||
canCounter = Permissions.counterAttack(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBleed = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BLEED);
|
||||
canCounter = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.COUNTER);
|
||||
canSerratedStrike = Permissions.serratedStrikes(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canBleed || canCounter || canSerratedStrike;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCounter) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.0"), LocaleLoader.getString("Swords.Effect.1", percent.format(1.0D / Swords.counterAttackModifier))));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.0"), LocaleLoader.getString("Swords.Effect.1", percent.format(1.0D / Swords.counterAttackModifier))));
|
||||
}
|
||||
|
||||
if (canSerratedStrike) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.2"), LocaleLoader.getString("Swords.Effect.3", percent.format(1.0D / Swords.serratedStrikesModifier))));
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.4"), LocaleLoader.getString("Swords.Effect.5", Swords.serratedStrikesBleedTicks)));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.2"), LocaleLoader.getString("Swords.Effect.3", percent.format(1.0D / Swords.serratedStrikesModifier))));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.4"), LocaleLoader.getString("Swords.Effect.5", Swords.serratedStrikesBleedTicks)));
|
||||
}
|
||||
|
||||
if (canBleed) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.6"), LocaleLoader.getString("Swords.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.6"), LocaleLoader.getString("Swords.Effect.7")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canBleed || canCounter || canSerratedStrike;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canCounter) {
|
||||
player.sendMessage(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) {
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", bleedLength));
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Note"));
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", bleedChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", bleedChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Bleed.Length", bleedLength));
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Bleed.Note"));
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Bleed.Chance", bleedChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", bleedChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canSerratedStrike) {
|
||||
player.sendMessage(LocaleLoader.getString("Swords.SS.Length", serratedStrikesLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", serratedStrikesLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Swords.SS.Length", serratedStrikesLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", serratedStrikesLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.taming.Taming;
|
||||
@@ -27,139 +32,135 @@ public class TamingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
if (canGore) {
|
||||
String[] goreStrings = calculateAbilityDisplayValues(Taming.goreMaxBonusLevel, Taming.goreMaxChance);
|
||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.GORE, isLucky);
|
||||
goreChance = goreStrings[0];
|
||||
goreChanceLucky = goreStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
canBeastLore = Permissions.beastLore(player);
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBeastLore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BEAST_LORE);
|
||||
canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT);
|
||||
canEnvironmentallyAware = Permissions.environmentallyAware(player);
|
||||
canFastFood = Permissions.fastFoodService(player);
|
||||
canGore = Permissions.gore(player);
|
||||
canSharpenedClaws = Permissions.sharpenedClaws(player);
|
||||
canShockProof = Permissions.shockProof(player);
|
||||
canThickFur = Permissions.thickFur(player);
|
||||
canHolyHound = Permissions.holyHound(player);
|
||||
canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ENVIROMENTALLY_AWARE);
|
||||
canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FAST_FOOD);
|
||||
canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GORE);
|
||||
canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHARPENED_CLAWS);
|
||||
canShockProof = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHOCK_PROOF);
|
||||
canThickFur = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.THICK_FUR);
|
||||
canHolyHound = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HOLY_HOUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canBeastLore || canCallWild || canEnvironmentallyAware || canFastFood || canGore || canSharpenedClaws || canShockProof || canThickFur || canHolyHound;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBeastLore) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.0"), LocaleLoader.getString("Taming.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.0"), LocaleLoader.getString("Taming.Effect.1")));
|
||||
}
|
||||
|
||||
if (canGore) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.2"), LocaleLoader.getString("Taming.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.2"), LocaleLoader.getString("Taming.Effect.3")));
|
||||
}
|
||||
|
||||
if (canSharpenedClaws) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.4"), LocaleLoader.getString("Taming.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.4"), LocaleLoader.getString("Taming.Effect.5")));
|
||||
}
|
||||
|
||||
if (canEnvironmentallyAware) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.6"), LocaleLoader.getString("Taming.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.6"), LocaleLoader.getString("Taming.Effect.7")));
|
||||
}
|
||||
|
||||
if (canThickFur) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.8"), LocaleLoader.getString("Taming.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.8"), LocaleLoader.getString("Taming.Effect.9")));
|
||||
}
|
||||
|
||||
if (canShockProof) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.10"), LocaleLoader.getString("Taming.Effect.11")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.10"), LocaleLoader.getString("Taming.Effect.11")));
|
||||
}
|
||||
|
||||
if (canFastFood) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.16"), LocaleLoader.getString("Taming.Effect.17")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.16"), LocaleLoader.getString("Taming.Effect.17")));
|
||||
}
|
||||
|
||||
if (canHolyHound) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.18"), LocaleLoader.getString("Taming.Effect.19")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.18"), LocaleLoader.getString("Taming.Effect.19")));
|
||||
}
|
||||
|
||||
if (canCallWild) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWOcelotCost()));
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWWolfCost()));
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWHorseCost()));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWCost(EntityType.OCELOT)));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWCost(EntityType.WOLF)));
|
||||
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWCost(EntityType.HORSE)));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canEnvironmentallyAware || canFastFood || canGore || canSharpenedClaws || canShockProof || canThickFur || canHolyHound;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canFastFood) {
|
||||
if (skillValue < Taming.fastFoodServiceUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.4", Taming.fastFoodServiceUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.4", Taming.fastFoodServiceUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.8"), LocaleLoader.getString("Taming.Ability.Bonus.9", percent.format(Taming.fastFoodServiceActivationChance / 100D))));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.8"), LocaleLoader.getString("Taming.Ability.Bonus.9", percent.format(Taming.fastFoodServiceActivationChance / 100D))));
|
||||
}
|
||||
}
|
||||
|
||||
if (canEnvironmentallyAware) {
|
||||
if (skillValue < Taming.environmentallyAwareUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.0", Taming.environmentallyAwareUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.0", Taming.environmentallyAwareUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.0"), LocaleLoader.getString("Taming.Ability.Bonus.1")));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.0"), LocaleLoader.getString("Taming.Ability.Bonus.1")));
|
||||
}
|
||||
}
|
||||
|
||||
if (canThickFur) {
|
||||
if (skillValue < Taming.thickFurUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.1", Taming.thickFurUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.1", Taming.thickFurUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.2"), LocaleLoader.getString("Taming.Ability.Bonus.3", Taming.thickFurModifier)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.2"), LocaleLoader.getString("Taming.Ability.Bonus.3", Taming.thickFurModifier)));
|
||||
}
|
||||
}
|
||||
|
||||
if (canHolyHound) {
|
||||
if (skillValue < Taming.holyHoundUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.5", Taming.holyHoundUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.5", Taming.holyHoundUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.10"), LocaleLoader.getString("Taming.Ability.Bonus.11")));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.10"), LocaleLoader.getString("Taming.Ability.Bonus.11")));
|
||||
}
|
||||
}
|
||||
|
||||
if (canShockProof) {
|
||||
if (skillValue < Taming.shockProofUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.2", Taming.shockProofUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.2", Taming.shockProofUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.4"), LocaleLoader.getString("Taming.Ability.Bonus.5", Taming.shockProofModifier)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.4"), LocaleLoader.getString("Taming.Ability.Bonus.5", Taming.shockProofModifier)));
|
||||
}
|
||||
}
|
||||
|
||||
if (canSharpenedClaws) {
|
||||
if (skillValue < Taming.sharpenedClawsUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.3", Taming.sharpenedClawsUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.3", Taming.sharpenedClawsUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.6"), LocaleLoader.getString("Taming.Ability.Bonus.7", Taming.sharpenedClawsBonusDamage)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.6"), LocaleLoader.getString("Taming.Ability.Bonus.7", Taming.sharpenedClawsBonusDamage)));
|
||||
}
|
||||
}
|
||||
|
||||
if (canGore) {
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", goreChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", goreChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Taming.Combat.Chance.Gore", goreChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", goreChanceLucky) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.unarmed.Unarmed;
|
||||
@@ -18,7 +24,7 @@ public class UnarmedCommand extends SkillCommand {
|
||||
|
||||
private boolean canBerserk;
|
||||
private boolean canDisarm;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canIronArm;
|
||||
private boolean canDeflect;
|
||||
private boolean canIronGrip;
|
||||
|
||||
@@ -27,105 +33,103 @@ public class UnarmedCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// BERSERK
|
||||
if (canBerserk) {
|
||||
String[] berserkStrings = calculateLengthDisplayValues();
|
||||
String[] berserkStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
berserkLength = berserkStrings[0];
|
||||
berserkLengthEndurance = berserkStrings[1];
|
||||
}
|
||||
|
||||
// DISARM
|
||||
if (canDisarm) {
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(Unarmed.disarmMaxBonusLevel, Unarmed.disarmMaxChance);
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DISARM, isLucky);
|
||||
disarmChance = disarmStrings[0];
|
||||
disarmChanceLucky = disarmStrings[1];
|
||||
}
|
||||
|
||||
// DEFLECT
|
||||
if (canDeflect) {
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(Unarmed.deflectMaxBonusLevel, Unarmed.deflectMaxChance);
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.DEFLECT, isLucky);
|
||||
deflectChance = deflectStrings[0];
|
||||
deflectChanceLucky = deflectStrings[1];
|
||||
}
|
||||
|
||||
// IRON ARM
|
||||
if (canBonusDamage) {
|
||||
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||
if (canIronArm) {
|
||||
ironArmBonus = Math.min(Unarmed.ironArmMinBonusDamage + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||
}
|
||||
|
||||
// IRON GRIP
|
||||
if (canIronGrip) {
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(Unarmed.ironGripMaxBonusLevel, Unarmed.ironGripMaxChance);
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.IRON_GRIP, isLucky);
|
||||
ironGripChance = ironGripStrings[0];
|
||||
ironGripChanceLucky = ironGripStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBerserk = Permissions.berserk(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canDeflect = Permissions.arrowDeflect(player);
|
||||
canDisarm = Permissions.disarm(player);
|
||||
canIronGrip = Permissions.ironGrip(player);
|
||||
canIronArm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_ARM);
|
||||
canDeflect = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DEFLECT);
|
||||
canDisarm = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.DISARM);
|
||||
canIronGrip = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.IRON_GRIP);
|
||||
// TODO: Apparently we forgot about block cracker?
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canBerserk || canBonusDamage || canDeflect || canDisarm || canIronGrip;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBerserk) {
|
||||
player.sendMessage(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) {
|
||||
player.sendMessage(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) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5")));
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5")));
|
||||
}
|
||||
|
||||
if (canDeflect) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.6"), LocaleLoader.getString("Unarmed.Effect.7")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.6"), LocaleLoader.getString("Unarmed.Effect.7")));
|
||||
}
|
||||
|
||||
if (canIronGrip) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.8"), LocaleLoader.getString("Unarmed.Effect.9")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.8"), LocaleLoader.getString("Unarmed.Effect.9")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canBerserk || canBonusDamage || canDeflect || canDisarm || canIronGrip;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canBonusDamage) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
||||
}
|
||||
|
||||
if (canDeflect) {
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", deflectChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", deflectChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canDisarm) {
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", disarmChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", disarmChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canIronGrip) {
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canBerserk) {
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
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.woodcutting.Woodcutting;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class WoodcuttingCommand extends SkillCommand {
|
||||
@@ -21,75 +26,71 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// TREE FELLER
|
||||
if (canTreeFell) {
|
||||
String[] treeFellerStrings = calculateLengthDisplayValues();
|
||||
String[] treeFellerStrings = calculateLengthDisplayValues(player, skillValue);
|
||||
treeFellerLength = treeFellerStrings[0];
|
||||
treeFellerLengthEndurance = treeFellerStrings[1];
|
||||
}
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(Woodcutting.doubleDropsMaxLevel, Woodcutting.doubleDropsMaxChance);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck() {
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreeFell = Permissions.treeFeller(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.leafBlower(player);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.LEAF_BLOWER);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean effectsHeaderPermissions() {
|
||||
return canDoubleDrop || canLeafBlow || canTreeFell;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void effectsDisplay() {
|
||||
luckyEffectsDisplay();
|
||||
protected List<String> effectsDisplay() {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canTreeFell) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.0"), LocaleLoader.getString("Woodcutting.Effect.1")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.0"), LocaleLoader.getString("Woodcutting.Effect.1")));
|
||||
}
|
||||
|
||||
if (canLeafBlow) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.2"), LocaleLoader.getString("Woodcutting.Effect.3")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.2"), LocaleLoader.getString("Woodcutting.Effect.3")));
|
||||
}
|
||||
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.4"), LocaleLoader.getString("Woodcutting.Effect.5")));
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.4"), LocaleLoader.getString("Woodcutting.Effect.5")));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean statsHeaderPermissions() {
|
||||
return canDoubleDrop || canLeafBlow || canTreeFell;
|
||||
}
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canLeafBlow) {
|
||||
int leafBlowerUnlockLevel = AdvancedConfig.getInstance().getLeafBlowUnlockLevel();
|
||||
|
||||
if (skillValue < leafBlowerUnlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Woodcutting.Ability.Locked.0", leafBlowerUnlockLevel)));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Woodcutting.Ability.Locked.0", leafBlowerUnlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Woodcutting.Ability.0"), LocaleLoader.getString("Woodcutting.Ability.1")));
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Woodcutting.Ability.0"), LocaleLoader.getString("Woodcutting.Ability.1")));
|
||||
}
|
||||
}
|
||||
|
||||
if (canDoubleDrop) {
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canTreeFell) {
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", treeFellerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", treeFellerLengthEndurance) : ""));
|
||||
messages.add(LocaleLoader.getString("Woodcutting.Ability.Length", treeFellerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", treeFellerLengthEndurance) : ""));
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,15 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.alchemy.Alchemy;
|
||||
import com.gmail.nossr50.skills.fishing.Fishing;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
import com.gmail.nossr50.skills.salvage.Salvage;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
private static AdvancedConfig instance;
|
||||
@@ -40,11 +45,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* ACROBATICS */
|
||||
if (getDodgeChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDodgeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -52,11 +57,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Dodge.DamageModifier should be greater than 1!");
|
||||
}
|
||||
|
||||
if (getRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -64,11 +69,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Roll.DamageThreshold should be at least 0!");
|
||||
}
|
||||
|
||||
if (getGracefulRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGracefulRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -76,6 +81,38 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.DamageThreshold should be at least 0!");
|
||||
}
|
||||
|
||||
/* ALCHEMY */
|
||||
if (getCatalysisUnlockLevel() < 0) {
|
||||
reason.add("Skills.Alchemy.Catalysis.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getCatalysisMaxBonusLevel() <= getCatalysisUnlockLevel()) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MaxBonusLevel should be greater than Skills.Alchemy.Catalysis.UnlockLevel!");
|
||||
}
|
||||
|
||||
if (getCatalysisMinSpeed() <= 0) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MinSpeed must be greater than 0!");
|
||||
}
|
||||
|
||||
if (getCatalysisMaxSpeed() < getCatalysisMinSpeed()) {
|
||||
reason.add("Skills.Alchemy.Catalysis.MaxSpeed should be at least Skills.Alchemy.Catalysis.MinSpeed!");
|
||||
}
|
||||
|
||||
List<Alchemy.Tier> alchemyTierList = Arrays.asList(Alchemy.Tier.values());
|
||||
for (Alchemy.Tier tier : alchemyTierList) {
|
||||
if (getConcoctionsTierLevel(tier) < 0) {
|
||||
reason.add("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (tier != Alchemy.Tier.fromNumerical(Alchemy.Tier.values().length)) {
|
||||
Alchemy.Tier nextTier = alchemyTierList.get(alchemyTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getConcoctionsTierLevel(tier) > getConcoctionsTierLevel(nextTier)) {
|
||||
reason.add("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Alchemy.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ARCHERY */
|
||||
if (getSkillShotIncreaseLevel() < 1) {
|
||||
reason.add("Skills.Archery.SkillShot.IncreaseLevel should be at least 1!");
|
||||
@@ -89,11 +126,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Archery.SkillShot.MaxBonus should be at least 0!");
|
||||
}
|
||||
|
||||
if (getDazeBonusMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDazeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -101,11 +138,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 0!");
|
||||
}
|
||||
|
||||
if (getRetrieveChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRetrieveMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -114,28 +151,28 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* AXES */
|
||||
if (getBonusDamageAxesBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonus should be at least 1!");
|
||||
if (getAxeMasteryBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonus should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBonusDamageAxesMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonusLevel should be at least 1!");
|
||||
if (getAxeMasteryMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalChance() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.ChanceMax should be at least 1!");
|
||||
if (getMaxChance(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.MaxBonusLevel should be at least 1!");
|
||||
if (getMaxBonusLevel(SecondaryAbility.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVP_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVP_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVE_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVE_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreaterImpactChance() < 1) {
|
||||
@@ -185,8 +222,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != Fishing.Tier.EIGHT) {
|
||||
Fishing.Tier nextTier = fishingTierList.get(fishingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getFishingTierLevel(tier) >= getFishingTierLevel(nextTier)) {
|
||||
reason.add("Skills.Fishing.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Fishing.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getFishingTierLevel(tier) > getFishingTierLevel(nextTier)) {
|
||||
reason.add("Skills.Fishing.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Fishing.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getShakeChance(tier) > getShakeChance(nextTier)) {
|
||||
@@ -203,12 +240,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIceFishingUnlockLevel() < 1) {
|
||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 1!");
|
||||
if (getIceFishingUnlockLevel() < 0) {
|
||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerUnlockLevel() < 1) {
|
||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 1!");
|
||||
if (getMasterAnglerUnlockLevel() < 0) {
|
||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerBoatModifier() < 1) {
|
||||
@@ -228,44 +265,44 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Herbalism.GreenThumb.StageChange should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
/* MINING */
|
||||
if (getMiningDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMiningDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -299,8 +336,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != BlastMining.Tier.EIGHT) {
|
||||
BlastMining.Tier nextTier = blastMiningTierList.get(blastMiningTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getBlastMiningRankLevel(tier) >= getBlastMiningRankLevel(nextTier)) {
|
||||
reason.add("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Mining.BlastMining.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getBlastMiningRankLevel(tier) > getBlastMiningRankLevel(nextTier)) {
|
||||
reason.add("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Mining.BlastMining.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getBlastDamageDecrease(tier) > getBlastDamageDecrease(nextTier)) {
|
||||
@@ -334,18 +371,14 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Repair.RepairMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSalvageUnlockLevel() < 1) {
|
||||
reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
|
||||
|
||||
for (ArcaneForging.Tier tier : arcaneForgingTierList) {
|
||||
@@ -364,8 +397,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != ArcaneForging.Tier.EIGHT) {
|
||||
ArcaneForging.Tier nextTier = arcaneForgingTierList.get(arcaneForgingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getArcaneForgingRankLevel(tier) >= getArcaneForgingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getArcaneForgingRankLevel(tier) > getArcaneForgingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneForgingDowngradeChance(nextTier) > getArcaneForgingDowngradeChance(tier)) {
|
||||
@@ -378,6 +411,51 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
}
|
||||
|
||||
/* SALVAGE */
|
||||
if (getSalvageMaxPercentage() < 1) {
|
||||
reason.add("Skills.Salvage.MaxPercentage should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSalvageMaxPercentageLevel() < 1) {
|
||||
reason.add("Skills.Salvage.MaxPercentageLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAdvancedSalvageUnlockLevel() < 1) {
|
||||
reason.add("Skills.Salvage.AdvancedSalvage.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
List<Salvage.Tier> salvageTierList = Arrays.asList(Salvage.Tier.values());
|
||||
|
||||
for (Salvage.Tier tier : salvageTierList) {
|
||||
if (getArcaneSalvageRankLevel(tier) < 0) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractFullEnchantsChance(tier) < 0 || getArcaneSalvageExtractFullEnchantsChance(tier) > 100) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractPartialEnchantsChance(tier) < 0 || getArcaneSalvageExtractPartialEnchantsChance(tier) > 100) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
|
||||
}
|
||||
|
||||
if (tier != Salvage.Tier.EIGHT) {
|
||||
Salvage.Tier nextTier = salvageTierList.get(salvageTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getArcaneSalvageRankLevel(tier) >= getArcaneSalvageRankLevel(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractFullEnchantsChance(tier) > getArcaneSalvageExtractFullEnchantsChance(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getArcaneSalvageExtractPartialEnchantsChance(tier) > getArcaneSalvageExtractPartialEnchantsChance(nextTier)) {
|
||||
reason.add("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SMELTING */
|
||||
if (getBurnModifierMaxLevel() < 1) {
|
||||
reason.add("Skills.Smelting.FuelEfficiency.MaxBonusLevel should be at least 1!");
|
||||
@@ -387,16 +465,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Smelting.FuelEfficiency.Multiplier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getFluxMiningUnlockLevel() < 1) {
|
||||
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 1!");
|
||||
if (getFluxMiningUnlockLevel() < 0) {
|
||||
reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFluxMiningChance() < 1) {
|
||||
@@ -417,22 +495,22 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
if (tier != Smelting.Tier.EIGHT) {
|
||||
Smelting.Tier nextTier = smeltingTierList.get(smeltingTierList.indexOf(tier) - 1);
|
||||
|
||||
if (getSmeltingRankLevel(tier) >= getSmeltingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Smelting.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Smelting.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
if (getSmeltingRankLevel(tier) > getSmeltingRankLevel(nextTier)) {
|
||||
reason.add("Skills.Smelting.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
|
||||
if (getSmeltingVanillaXPBoostMultiplier(tier) > getSmeltingRankLevel(nextTier)) {
|
||||
if (getSmeltingVanillaXPBoostMultiplier(tier) > getSmeltingVanillaXPBoostMultiplier(nextTier)) {
|
||||
reason.add("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.VanillaXPMultiplier.Rank_" + nextTier.toNumerical() + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SWORDS */
|
||||
if (getBleedChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBleedMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -448,11 +526,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Swords.Bleed.BaseTicks should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -470,11 +548,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
/* TAMING */
|
||||
|
||||
if (getGoreChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGoreMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -486,69 +564,72 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getFastFoodUnlock() < 1) {
|
||||
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 1!");
|
||||
if (getFastFoodUnlock() < 0) {
|
||||
reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getFastFoodChance() < 1) {
|
||||
reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
|
||||
}
|
||||
|
||||
if (getEnviromentallyAwareUnlock() < 1) {
|
||||
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 1!");
|
||||
if (getEnviromentallyAwareUnlock() < 0) {
|
||||
reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getThickFurUnlock() < 1) {
|
||||
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 1!");
|
||||
if (getThickFurUnlock() < 0) {
|
||||
reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getThickFurModifier() < 1) {
|
||||
reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHolyHoundUnlock() < 1) {
|
||||
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 1!");
|
||||
if (getHolyHoundUnlock() < 0) {
|
||||
reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getShockProofUnlock() < 1) {
|
||||
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 1!");
|
||||
if (getShockProofUnlock() < 0) {
|
||||
reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getShockProofModifier() < 1) {
|
||||
reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSharpenedClawsUnlock() < 1) {
|
||||
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 1!");
|
||||
if (getSharpenedClawsUnlock() < 0) {
|
||||
reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getSharpenedClawsBonus() < 1) {
|
||||
reason.add("Skills.Taming.SharpenedClaws.Bonus should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMaxHorseJumpStrength() < 0 || getMaxHorseJumpStrength() > 2) {
|
||||
reason.add("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength should be between 0 and 2!");
|
||||
}
|
||||
|
||||
/* UNARMED */
|
||||
if (getDisarmChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDisarmMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -569,15 +650,15 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* WOODCUTTING */
|
||||
if (getLeafBlowUnlockLevel() < 1) {
|
||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 1!");
|
||||
if (getLeafBlowUnlockLevel() < 0) {
|
||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@@ -608,42 +689,41 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
||||
|
||||
public int getMaxBonusLevel(SecondaryAbility skillAbility) { return config.getInt("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace(" ", "") + ".MaxBonusLevel"); }
|
||||
public double getMaxChance(SecondaryAbility skillAbility) { return config.getDouble("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace(" ", "") + ".ChanceMax", 100.0D); }
|
||||
|
||||
/* ACROBATICS */
|
||||
public double getDodgeChanceMax() { return config.getDouble("Skills.Acrobatics.Dodge.ChanceMax", 20.0D); }
|
||||
public int getDodgeMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Dodge.MaxBonusLevel", 800); }
|
||||
public double getDodgeDamageModifier() { return config.getDouble("Skills.Acrobatics.Dodge.DamageModifier", 2.0D); }
|
||||
|
||||
public double getRollChanceMax() { return config.getDouble("Skills.Acrobatics.Roll.ChanceMax", 100.0D); }
|
||||
public int getRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Roll.MaxBonusLevel", 1000); }
|
||||
public double getRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.Roll.DamageThreshold", 7.0D); }
|
||||
|
||||
public double getGracefulRollChanceMax() { return config.getDouble("Skills.Acrobatics.GracefulRoll.ChanceMax", 100.0D); }
|
||||
public int getGracefulRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.GracefulRoll.MaxBonusLevel", 500); }
|
||||
public double getGracefulRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.GracefulRoll.DamageThreshold", 14.0D); }
|
||||
|
||||
/* ALCHEMY */
|
||||
public int getCatalysisUnlockLevel() { return config.getInt("Skills.Alchemy.Catalysis.UnlockLevel", 100); }
|
||||
public int getCatalysisMaxBonusLevel() { return config.getInt("Skills.Alchemy.Catalysis.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getCatalysisMinSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MinSpeed", 1.0D); }
|
||||
public double getCatalysisMaxSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MaxSpeed", 4.0D); }
|
||||
|
||||
public int getConcoctionsTierLevel(Alchemy.Tier tier) { return config.getInt("Skills.Alchemy.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* ARCHERY */
|
||||
public int getSkillShotIncreaseLevel() { return config.getInt("Skills.Archery.SkillShot.IncreaseLevel", 50); }
|
||||
public double getSkillShotIncreasePercentage() { return config.getDouble("Skills.Archery.SkillShot.IncreasePercentage", 0.1D); }
|
||||
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
||||
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot.MaxDamage", 9.0D); }
|
||||
|
||||
public double getDazeBonusMax() { return config.getDouble("Skills.Archery.Daze.ChanceMax", 50.0D); }
|
||||
public int getDazeMaxBonusLevel() { return config.getInt("Skills.Archery.Daze.MaxBonusLevel", 1000); }
|
||||
public double getDazeModifier() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
||||
|
||||
public double getRetrieveChanceMax() { return config.getDouble("Skills.Archery.Retrieve.ChanceMax", 100.0D); }
|
||||
public int getRetrieveMaxBonusLevel() { return config.getInt("Skills.Archery.Retrieve.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
||||
|
||||
/* AXES */
|
||||
public double getBonusDamageAxesBonusMax() { return config.getDouble("Skills.Axes.DamageIncrease.MaxBonus", 4.0D); }
|
||||
public int getBonusDamageAxesMaxBonusLevel() { return config.getInt("Skills.Axes.DamageIncrease.MaxBonusLevel", 200); }
|
||||
public double getAxeMasteryBonusMax() { return config.getDouble("Skills.Axes.AxeMastery.MaxBonus", 4.0D); }
|
||||
public int getAxeMasteryMaxBonusLevel() { return config.getInt("Skills.Axes.AxeMastery.MaxBonusLevel", 200); }
|
||||
|
||||
public double getAxesCriticalChance() { return config.getDouble("Skills.Axes.AxesCritical.ChanceMax", 37.50D); }
|
||||
public int getAxesCriticalMaxBonusLevel() { return config.getInt("Skills.Axes.AxesCritical.MaxBonusLevel", 750); }
|
||||
public double getAxesCriticalPVPModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVP_Modifier", 1.5D); }
|
||||
public double getAxesCriticalPVEModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVE_Modifier", 2.0D); }
|
||||
public double getCriticalHitPVPModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVP_Modifier", 1.5D); }
|
||||
public double getCriticalHitPVEModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVE_Modifier", 2.0D); }
|
||||
|
||||
public double getGreaterImpactChance() { return config.getDouble("Skills.Axes.GreaterImpact.Chance", 25.0D); }
|
||||
public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); }
|
||||
@@ -675,22 +755,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
||||
|
||||
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
|
||||
public double getGreenThumbChanceMax() { return config.getDouble("Skills.Herbalism.GreenThumb.ChanceMax", 100.0D); }
|
||||
public int getGreenThumbMaxLevel() { return config.getInt("Skills.Herbalism.GreenThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
public double getHerbalismDoubleDropsChanceMax() { return config.getDouble("Skills.Herbalism.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getHerbalismDoubleDropsMaxLevel() { return config.getInt("Skills.Herbalism.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getHylianLuckChanceMax() { return config.getDouble("Skills.Herbalism.HylianLuck.ChanceMax", 10.0D); }
|
||||
public int getHylianLuckMaxLevel() { return config.getInt("Skills.Herbalism.HylianLuck.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getShroomThumbChanceMax() { return config.getDouble("Skills.Herbalism.ShroomThumb.ChanceMax", 50.0D); }
|
||||
public int getShroomThumbMaxLevel() { return config.getInt("Skills.Herbalism.ShroomThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
/* MINING */
|
||||
public double getMiningDoubleDropChance() { return config.getDouble("Skills.Mining.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getMiningDoubleDropMaxLevel() { return config.getInt("Skills.Mining.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public int getBlastMiningRankLevel(BlastMining.Tier tier) { return config.getInt("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
public double getBlastDamageDecrease(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.BlastDamageDecrease.Rank_" + tier.toNumerical()); }
|
||||
public double getOreBonus(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + tier.toNumerical()); }
|
||||
@@ -701,9 +767,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* REPAIR */
|
||||
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
|
||||
public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 1000); }
|
||||
public double getSuperRepairChanceMax() { return config.getDouble("Skills.Repair.SuperRepair.ChanceMax", 100.0D); }
|
||||
public int getSuperRepairMaxLevel() { return config.getInt("Skills.Repair.SuperRepair.MaxBonusLevel", 1000); }
|
||||
public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage.UnlockLevel", 600); }
|
||||
|
||||
/* Arcane Forging */
|
||||
public int getArcaneForgingRankLevel(ArcaneForging.Tier tier) { return config.getInt("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
@@ -714,13 +777,23 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.Downgrades_Enabled", true); }
|
||||
public double getArcaneForgingDowngradeChance(ArcaneForging.Tier tier) { return config.getDouble("Skills.Repair.ArcaneForging.Downgrades_Chance.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SALVAGE */
|
||||
public double getSalvageMaxPercentage() { return config.getDouble("Skills.Salvage.MaxPercentage", 100.0D); }
|
||||
public int getSalvageMaxPercentageLevel() { return config.getInt("Skills.Salvage.MaxPercentageLevel", 1000); }
|
||||
|
||||
public int getAdvancedSalvageUnlockLevel() { return config.getInt("Skills.Salvage.AdvancedSalvage.UnlockLevel", 350); }
|
||||
|
||||
public boolean getArcaneSalvageEnchantDowngradeEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantDowngradeEnabled", true); }
|
||||
public boolean getArcaneSalvageEnchantLossEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantLossEnabled", true); }
|
||||
|
||||
public int getArcaneSalvageRankLevel(Salvage.Tier tier) { return config.getInt("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
public double getArcaneSalvageExtractFullEnchantsChance(Salvage.Tier tier) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + tier.toNumerical()); }
|
||||
public double getArcaneSalvageExtractPartialEnchantsChance(Salvage.Tier tier) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SMELTING */
|
||||
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency.MaxBonusLevel", 1000); }
|
||||
public double getBurnTimeMultiplier() { return config.getDouble("Skills.Smelting.FuelEfficiency.Multiplier", 3.0D); }
|
||||
|
||||
public int getSecondSmeltMaxLevel() { return config.getInt("Skills.Smelting.SecondSmelt.MaxBonusLevel", 1000); }
|
||||
public double getSecondSmeltMaxChance() { return config.getDouble("Skills.Smelting.SecondSmelt.ChanceMax", 100.0D); }
|
||||
|
||||
public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining.UnlockLevel", 250); }
|
||||
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
|
||||
|
||||
@@ -729,22 +802,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SWORDS */
|
||||
public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed.ChanceMax", 75.0D); }
|
||||
public int getBleedMaxBonusLevel() { return config.getInt("Skills.Swords.Bleed.MaxBonusLevel", 750); }
|
||||
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||
|
||||
public boolean getCounterRequiresBlock() { return config.getBoolean("Skills.Swords.Counter.RequiresBlock"); }
|
||||
public double getCounterChanceMax() { return config.getDouble("Skills.Swords.Counter.ChanceMax", 30.0D); }
|
||||
public int getCounterMaxBonusLevel() { return config.getInt("Skills.Swords.Counter.MaxBonusLevel", 600); }
|
||||
public double getCounterModifier() { return config.getDouble("Skills.Swords.Counter.DamageModifier", 2.0D); }
|
||||
|
||||
public double getSerratedStrikesModifier() { return config.getDouble("Skills.Swords.SerratedStrikes.DamageModifier", 4.0D); }
|
||||
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.BleedTicks", 5); }
|
||||
|
||||
/* TAMING */
|
||||
public double getGoreChanceMax() { return config.getDouble("Skills.Taming.Gore.ChanceMax", 100.0D); }
|
||||
public int getGoreMaxBonusLevel() { return config.getInt("Skills.Taming.Gore.MaxBonusLevel", 1000); }
|
||||
public int getGoreBleedTicks() { return config.getInt("Skills.Taming.Gore.BleedTicks", 2); }
|
||||
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
|
||||
|
||||
@@ -764,26 +831,18 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getSharpenedClawsUnlock() { return config.getInt("Skills.Taming.SharpenedClaws.UnlockLevel", 750); }
|
||||
public double getSharpenedClawsBonus() { return config.getDouble("Skills.Taming.SharpenedClaws.Bonus", 2.0D); }
|
||||
|
||||
public double getMinHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MinHorseJumpStrength", 0.7D); }
|
||||
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
||||
|
||||
/* UNARMED */
|
||||
public double getDisarmChanceMax() { return config.getDouble("Skills.Unarmed.Disarm.ChanceMax", 33.0D); }
|
||||
public int getDisarmMaxBonusLevel() { return config.getInt("Skills.Unarmed.Disarm.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getDeflectChanceMax() { return config.getDouble("Skills.Unarmed.Deflect.ChanceMax", 50.0D); }
|
||||
public int getDeflectMaxBonusLevel() { return config.getInt("Skills.Unarmed.Deflect.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronGripChanceMax() { return config.getDouble("Skills.Unarmed.IronGrip.ChanceMax", 100.0D); }
|
||||
public int getIronGripMaxBonusLevel() { return config.getInt("Skills.Unarmed.IronGrip.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronArmMinBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMin", 3.0D); }
|
||||
public double getIronArmMaxBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMax", 8.0D); }
|
||||
public int getIronArmIncreaseLevel() { return config.getInt("Skills.Unarmed.IronArm.IncreaseLevel", 50); }
|
||||
public boolean getDisarmProtected() { return config.getBoolean("Skills.Unarmed.Disarm.AntiTheft", false); }
|
||||
|
||||
/* WOODCUTTING */
|
||||
public int getLeafBlowUnlockLevel() { return config.getInt("Skills.Woodcutting.LeafBlower.UnlockLevel", 100); }
|
||||
|
||||
public double getWoodcuttingDoubleDropChance() { return config.getDouble("Skills.Woodcutting.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getWoodcuttingDoubleDropMaxLevel() { return config.getInt("Skills.Woodcutting.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
/* KRAKEN STUFF */
|
||||
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
||||
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
||||
|
||||
@@ -5,10 +5,12 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeSpecies;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@@ -109,7 +111,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
if (getChimaeraRecipeCost() < 1 || getChimaeraRecipeCost() > 9) {
|
||||
reason.add("Items.Chimaera_Wing.Recipe_Cost only accepts values from 1 to 64!");
|
||||
reason.add("Items.Chimaera_Wing.Recipe_Cost only accepts values from 1 to 9!");
|
||||
}
|
||||
|
||||
if (getChimaeraItem() == null) {
|
||||
@@ -146,6 +148,16 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
reason.add("Party.Sharing.Range should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getPartyXpCurveMultiplier() < 1) {
|
||||
reason.add("Party.Leveling.Xp_Curve_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
for (PartyFeature partyFeature : PartyFeature.values()) {
|
||||
if (getPartyFeatureUnlockLevel(partyFeature) < 0) {
|
||||
reason.add("Party.Leveling." + StringUtils.getPrettyPartyFeatureString(partyFeature).replace(" ", "") + "_UnlockLevel should be at least 0!");
|
||||
}
|
||||
}
|
||||
|
||||
/* Inspect command distance */
|
||||
if (getInspectDistance() <= 0) {
|
||||
reason.add("Commands.inspect.Max_Distance should be greater than 0!");
|
||||
@@ -171,20 +183,40 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
reason.add("Cannot use the same item for Repair and Salvage anvils!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWWolfCost() < 1) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Bones_Required should be at least 1!");
|
||||
if (getTamingCOTWMaterial(EntityType.WOLF) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWOcelotCost() < 1) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Fish_Required should be at least 1!");
|
||||
if (getTamingCOTWMaterial(EntityType.OCELOT) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot_Amount should be greater than 0!");
|
||||
if (getTamingCOTWMaterial(EntityType.HORSE) == null) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Material is invalid!!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.WOLF) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWCost(EntityType.HORSE) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf_Amount should be greater than 0!");
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getTamingCOTWAmount(EntityType.HORSE) <= 0) {
|
||||
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Summon_Amount should be greater than 0!");
|
||||
}
|
||||
|
||||
return noErrorsInConfig(reason);
|
||||
@@ -206,18 +238,20 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getUpdateCheckEnabled() { return config.getBoolean("General.Update_Check", true); }
|
||||
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
||||
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
|
||||
public boolean getBackupsEnabled() { return config.getBoolean("General.Generate_Backups", true); }
|
||||
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
||||
public boolean getConfigOverwriteEnabled() { return config.getBoolean("General.Config_Update_Overwrite", true); }
|
||||
|
||||
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
||||
public boolean getPartyChatColorLeaderName() { return config.getBoolean("Commands.partychat.Gold_Leader_Name", true); }
|
||||
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.partychat.Use_Display_Names", true); }
|
||||
public String getPartyChatPrefixAlly() { return config.getString("Commands.partychat.Chat_Prefix_Format_Ally", "[[GREEN]](A)[[RESET]]"); }
|
||||
|
||||
public String getAdminChatPrefix() { return config.getString("Commands.adminchat.Chat_Prefix_Format", "[[AQUA]][[[WHITE]]{0}[[AQUA]]]"); }
|
||||
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.adminchat.Use_Display_Names", true); }
|
||||
|
||||
public boolean getMatchOfflinePlayers() { return config.getBoolean("Commands.Generic.Match_OfflinePlayers", false); }
|
||||
public long getDatabasePlayerCooldown() { return config.getLong("Commands.Database.Player_Cooldown", 1750); }
|
||||
|
||||
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
||||
|
||||
/* Mob Healthbar */
|
||||
public MobHealthbarType getMobHealthbarDefault() {
|
||||
@@ -232,6 +266,11 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getMobHealthbarTime() { return config.getInt("Mob_Healthbar.Display_Time", 3); }
|
||||
|
||||
/* Scoreboards */
|
||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||
public boolean getShowStatsAfterLogin() { return config.getBoolean("Scoreboard.Show_Stats_After_Login", false); }
|
||||
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
||||
|
||||
public boolean getRankUseChat() { return config.getBoolean("Scoreboard.Types.Rank.Print", false); }
|
||||
public boolean getRankUseBoard() { return config.getBoolean("Scoreboard.Types.Rank.Board", true); }
|
||||
public int getRankScoreboardTime() { return config.getInt("Scoreboard.Types.Rank.Display_Time", 10); }
|
||||
@@ -257,15 +296,16 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getSkillLevelUpBoard() { return config.getBoolean("Scoreboard.Types.Skill.LevelUp_Board", true); }
|
||||
public int getSkillLevelUpTime() { return config.getInt("Scoreboard.Types.Skill.LevelUp_Time", 5); }
|
||||
|
||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||
|
||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
||||
|
||||
/* Database Purging */
|
||||
public int getPurgeInterval() { return config.getInt("Database_Purging.Purge_Interval", -1); }
|
||||
public int getOldUsersCutoff() { return config.getInt("Database_Purging.Old_User_Cutoff", 6); }
|
||||
|
||||
/* Backups */
|
||||
public boolean getBackupsEnabled() { return config.getBoolean("Backups.Enabled", true); }
|
||||
public boolean getKeepLast24Hours() { return config.getBoolean("Backups.Keep.Last_24_Hours", true); }
|
||||
public boolean getKeepDailyLastWeek() { return config.getBoolean("Backups.Keep.Daily_Last_Week", true); }
|
||||
public boolean getKeepWeeklyPastMonth() { return config.getBoolean("Backups.Keep.Weekly_Past_Months", true); }
|
||||
|
||||
/* mySQL */
|
||||
public boolean getUseMySQL() { return config.getBoolean("MySQL.Enabled", false); }
|
||||
public String getMySQLTablePrefix() { return config.getString("MySQL.Database.TablePrefix", "mcmmo_"); }
|
||||
@@ -295,12 +335,16 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public double getHardcoreDeathStatPenaltyPercentage() { return config.getDouble("Hardcore.Death_Stat_Loss.Penalty_Percentage", 75.0D); }
|
||||
public void setHardcoreDeathStatPenaltyPercentage(double value) { config.set("Hardcore.Death_Stat_Loss.Penalty_Percentage", value); }
|
||||
|
||||
public int getHardcoreDeathStatPenaltyLevelThreshold() { return config.getInt("Hardcore.Death_Stat_Loss.Level_Threshold", 0); }
|
||||
|
||||
public boolean getHardcoreVampirismEnabled(SkillType skillType) { return config.getBoolean("Hardcore.Vampirism.Enabled." + StringUtils.getCapitalized(skillType.toString()), false); }
|
||||
public void setHardcoreVampirismEnabled(SkillType skillType, boolean enabled) { config.set("Hardcore.Vampirism.Enabled." + StringUtils.getCapitalized(skillType.toString()), enabled); }
|
||||
|
||||
public double getHardcoreVampirismStatLeechPercentage() { return config.getDouble("Hardcore.Vampirism.Leech_Percentage", 5.0D); }
|
||||
public void setHardcoreVampirismStatLeechPercentage(double value) { config.set("Hardcore.Vampirism.Leech_Percentage", value); }
|
||||
|
||||
public int getHardcoreVampirismLevelThreshold() { return config.getInt("Hardcore.Vampirism.Level_Threshold", 0); }
|
||||
|
||||
/* SMP Mods */
|
||||
public boolean getToolModsEnabled() { return config.getBoolean("Mods.Tool_Mods_Enabled", false); }
|
||||
public boolean getArmorModsEnabled() { return config.getBoolean("Mods.Armor_Mods_Enabled", false); }
|
||||
@@ -316,6 +360,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getChimaeraCooldown() { return config.getInt("Items.Chimaera_Wing.Cooldown", 240); }
|
||||
public int getChimaeraWarmup() { return config.getInt("Items.Chimaera_Wing.Warmup", 5); }
|
||||
public int getChimaeraRecentlyHurtCooldown() { return config.getInt("Items.Chimaera_Wing.RecentlyHurt_Cooldown", 60); }
|
||||
public boolean getChimaeraSoundEnabled() { return config.getBoolean("Items.Chimaera_Wing.Sound_Enabled", true); }
|
||||
|
||||
/* Particles */
|
||||
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
||||
@@ -330,19 +375,29 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
/* PARTY SETTINGS */
|
||||
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
||||
public int getAutoPartyKickTime() { return config.getInt("Party.Old_Party_Member_Cutoff", 7); }
|
||||
public boolean getExpShareEnabled() { return config.getBoolean("Party.Sharing.ExpShare_enabled", true); }
|
||||
|
||||
public double getPartyShareBonusBase() { return config.getDouble("Party.Sharing.ExpShare_bonus_base", 1.1D); }
|
||||
public double getPartyShareBonusIncrease() { return config.getDouble("Party.Sharing.ExpShare_bonus_increase", 0.05D); }
|
||||
public double getPartyShareBonusCap() { return config.getDouble("Party.Sharing.ExpShare_bonus_cap", 1.5D); }
|
||||
public boolean getItemShareEnabled() { return config.getBoolean("Party.Sharing.ItemShare_enabled", true); }
|
||||
public double getPartyShareRange() { return config.getDouble("Party.Sharing.Range", 75.0D); }
|
||||
|
||||
public int getPartyLevelCap() {
|
||||
int cap = config.getInt("Party.Leveling.Level_Cap", 10);
|
||||
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
||||
}
|
||||
|
||||
public int getPartyXpCurveMultiplier() { return config.getInt("Party.Leveling.Xp_Curve_Modifier", 3); }
|
||||
public boolean getPartyXpNearMembersNeeded() { return config.getBoolean("Party.Leveling.Near_Members_Needed", false); }
|
||||
public boolean getPartyInformAllMembers() { return config.getBoolean("Party.Leveling.Inform_All_Party_Members_On_LevelUp", false); }
|
||||
|
||||
public int getPartyFeatureUnlockLevel(PartyFeature partyFeature) { return config.getInt("Party.Leveling." + StringUtils.getPrettyPartyFeatureString(partyFeature).replace(" ", "") + "_UnlockLevel", 0); }
|
||||
|
||||
/* Party Teleport Settings */
|
||||
public int getPTPCommandCooldown() { return config.getInt("Commands.ptp.Cooldown", 120); }
|
||||
public int getPTPCommandWarmup() { return config.getInt("Commands.ptp.Warmup", 5); }
|
||||
public int getPTPCommandRecentlyHurtCooldown() { return config.getInt("Commands.ptp.RecentlyHurt_Cooldown", 60); }
|
||||
public int getPTPCommandTimeout() { return config.getInt("Commands.ptp.Request_Timeout", 300); }
|
||||
public boolean getPTPCommandConfirmRequired() { return config.getBoolean("Commands.ptp.Confirm_Required", true); }
|
||||
public boolean getPTPCommandConfirmRequired() { return config.getBoolean("Commands.ptp.Accept_Required", true); }
|
||||
public boolean getPTPCommandWorldPermissions() { return config.getBoolean("Commands.ptp.World_Based_Permissions", false); }
|
||||
|
||||
/* Inspect command distance */
|
||||
@@ -389,37 +444,47 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
/* Acrobatics */
|
||||
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
||||
public boolean getPreventXPAfterTeleport() { return config.getBoolean("Skills.Acrobatics.Prevent_XP_After_Teleport", true); }
|
||||
public int getXPAfterTeleportCooldown() { return config.getInt("Skills.Acrobatics.XP_After_Teleport_Cooldown", 5); }
|
||||
|
||||
/* Alchemy */
|
||||
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
||||
public boolean getPreventHopperTransferIngredients() { return config.getBoolean("Skills.Alchemy.Prevent_Hopper_Transfer_Ingredients", false); }
|
||||
public boolean getPreventHopperTransferBottles() { return config.getBoolean("Skills.Alchemy.Prevent_Hopper_Transfer_Bottles", false); }
|
||||
|
||||
/* Fishing */
|
||||
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
||||
public boolean getFishingOverrideTreasures() { return config.getBoolean("Skills.Fishing.Override_Vanilla_Treasures", true); }
|
||||
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
|
||||
|
||||
/* Mining */
|
||||
public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); }
|
||||
|
||||
/* Repair */
|
||||
public boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
|
||||
public boolean getRepairAnvilPlaceSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Placed_Sounds", true); }
|
||||
public boolean getRepairAnvilUseSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Use_Sounds", true); }
|
||||
public Material getRepairAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Anvil_Material", "IRON_BLOCK")); }
|
||||
public Material getSalvageAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Salvage_Anvil_ID", "GOLD_BLOCK")); }
|
||||
public boolean getSalvageTools() { return config.getBoolean("Skills.Repair.Salvage_tools", true); }
|
||||
public boolean getSalvageArmor() { return config.getBoolean("Skills.Repair.Salvage_armor", true); }
|
||||
public boolean getRepairConfirmRequired() { return config.getBoolean("Skills.Repair.Confirm_Required", true); }
|
||||
|
||||
/* Salvage */
|
||||
public boolean getSalvageAnvilMessagesEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Messages", true); }
|
||||
public boolean getSalvageAnvilPlaceSoundsEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Placed_Sounds", true); }
|
||||
public boolean getSalvageAnvilUseSoundsEnabled() { return config.getBoolean("Skills.Salvage.Anvil_Use_Sounds", true); }
|
||||
public Material getSalvageAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Salvage.Anvil_Material", "GOLD_BLOCK")); }
|
||||
public boolean getSalvageConfirmRequired() { return config.getBoolean("Skills.Salvage.Confirm_Required", true); }
|
||||
|
||||
/* Unarmed */
|
||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
||||
|
||||
/* Taming */
|
||||
public int getTamingCOTWHorseCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Apples_Required", 10); }
|
||||
public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
|
||||
public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
|
||||
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||
public int getTamingCOTWCost(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Amount"); }
|
||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Summon_Amount"); }
|
||||
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type)+ "_Amount"); }
|
||||
|
||||
/* Woodcutting */
|
||||
public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
|
||||
public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
|
||||
public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
|
||||
public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
|
||||
public boolean getWoodcuttingDoubleDropsEnabled(TreeSpecies species) { return config.getBoolean("Double_Drops.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
||||
|
||||
/* AFK Leveling */
|
||||
public boolean getAcrobaticsPreventAFK() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
|
||||
|
||||
@@ -4,12 +4,16 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeSpecies;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.material.LongGrass;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
@@ -76,6 +80,13 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
* XP SETTINGS
|
||||
*/
|
||||
|
||||
/* Alchemy */
|
||||
for (PotionStage potionStage : PotionStage.values()) {
|
||||
if (getPotionXP(potionStage) < 0) {
|
||||
reason.add("Experience.Alchemy.Potion_Stage_" + potionStage.toNumerical() + " should be at least 0!");
|
||||
}
|
||||
}
|
||||
|
||||
/* Combat XP Multipliers */
|
||||
if (getAnimalsXP() < 0) {
|
||||
reason.add("Experience.Combat.Multiplier.Animals should be at least 0!");
|
||||
@@ -98,9 +109,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Fishing */
|
||||
if (getFishingBaseXP() <= 0) {
|
||||
reason.add("Experience.Fishing.Base should be greater than 0!");
|
||||
}
|
||||
// TODO: Add validation for each fish type once enum is available.
|
||||
|
||||
if (getFishingShakeXP() <= 0) {
|
||||
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
||||
@@ -121,20 +130,12 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* Woodcutting */
|
||||
if (getWoodcuttingXPOak() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Oak should be greater than 0!");
|
||||
}
|
||||
for (TreeSpecies species : TreeSpecies.values()) {
|
||||
String key = "Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_");
|
||||
|
||||
if (getWoodcuttingXPBirch() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Birch should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPSpruce() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Spruce should be greater than 0!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPJungle() <= 0) {
|
||||
reason.add("Experience.Woodcutting.Jungle should be greater than 0!");
|
||||
if (config.getInt(key) <= 0) {
|
||||
reason.add(key + " should be greater than 0!");
|
||||
}
|
||||
}
|
||||
|
||||
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
||||
@@ -159,7 +160,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
/* Curve values */
|
||||
public double getMultiplier(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.multiplier"); }
|
||||
public int getBase(FormulaType type) { return config.getInt("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.base"); }
|
||||
public double getExponent(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) +"_Values.exponent"); }
|
||||
public double getExponent(FormulaType type) { return config.getDouble("Experience_Formula." + StringUtils.getCapitalized(type.toString()) + "_Values.exponent"); }
|
||||
|
||||
/* Global modifier */
|
||||
public double getExperienceGainsGlobalMultiplier() { return config.getDouble("Experience_Formula.Multiplier.Global", 1.0); }
|
||||
@@ -174,6 +175,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
/* Skill modifiers */
|
||||
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
||||
|
||||
/* Custom XP perk */
|
||||
public double getCustomXpPerkBoost() { return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25); }
|
||||
|
||||
/* Conversion */
|
||||
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
||||
|
||||
@@ -199,13 +203,115 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
||||
|
||||
/* Alchemy */
|
||||
public double getPotionXP(PotionStage stage) { return config.getDouble("Experience.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
||||
|
||||
/* Fishing */
|
||||
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
||||
public int getFishXp(MaterialData data) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Fishing.Raw_Fish", 800);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Fishing.Raw_Salmon", 800);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Fishing.Clownfish", 800);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Fishing.Pufferfish", 800);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
||||
|
||||
/* Herbalism */
|
||||
public int getFlowerAndGrassXp(MaterialData data) {
|
||||
Material type = data.getItemType();
|
||||
|
||||
if (type == Material.RED_ROSE) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Herbalism.Poppy", 100);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Herbalism.Blue_Orchid", 150);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Herbalism.Allium", 300);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Herbalism.Azure_Bluet", 150);
|
||||
|
||||
case 0x4:
|
||||
return config.getInt("Experience.Herbalism.Red_Tulip", 150);
|
||||
|
||||
case 0x5:
|
||||
return config.getInt("Experience.Herbalism.Orange_Tulip", 150);
|
||||
|
||||
case 0x6:
|
||||
return config.getInt("Experience.Herbalism.White_Tulip", 150);
|
||||
|
||||
case 0x7:
|
||||
return config.getInt("Experience.Herbalism.Pink_Tulip", 150);
|
||||
|
||||
case 0x8:
|
||||
return config.getInt("Experience.Herbalism.Oxeye_Daisy", 150);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
else if (type == Material.LONG_GRASS) {
|
||||
switch (((LongGrass) data).getSpecies()) {
|
||||
case DEAD:
|
||||
return config.getInt("Experience.Herbalism.Dead_Bush", 30);
|
||||
|
||||
case FERN_LIKE:
|
||||
return config.getInt("Experience.Herbalism.Small_Fern", 10);
|
||||
|
||||
case NORMAL:
|
||||
return config.getInt("Experience.Herbalism.Small_Grass", 10);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (type == Material.DOUBLE_PLANT) {
|
||||
switch (data.getData()) {
|
||||
case 0x0:
|
||||
return config.getInt("Experience.Herbalism.Sunflower", 50);
|
||||
|
||||
case 0x1:
|
||||
return config.getInt("Experience.Herbalism.Lilac", 50);
|
||||
|
||||
case 0x2:
|
||||
return config.getInt("Experience.Herbalism.Tall_Grass", 50);
|
||||
|
||||
case 0x3:
|
||||
return config.getInt("Experience.Herbalism.Tall_Fern", 50);
|
||||
|
||||
case 0x4:
|
||||
return config.getInt("Experience.Herbalism.Rose_Bush", 50);
|
||||
|
||||
case 0x5:
|
||||
return config.getInt("Experience.Herbalism.Peony", 50);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Repair */
|
||||
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
||||
public double getRepairXP(RepairMaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||
public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||
|
||||
/* Taming */
|
||||
public int getTamingXPHorse() { return config.getInt("Experience.Taming.Animal_Taming.Horse", 1000); }
|
||||
@@ -213,10 +319,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
||||
|
||||
/* Woodcutting */
|
||||
public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
|
||||
public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
|
||||
public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
|
||||
public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
|
||||
public int getWoodcuttingTreeXP(TreeSpecies species) { return config.getInt("Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
||||
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class ArmorConfigManager {
|
||||
public ArmorConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("armor\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.armor\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "armor.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "armor.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomArmor(new CustomArmorConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gmail.nossr50.config.mods;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.ModManager;
|
||||
|
||||
public class BlockConfigManager {
|
||||
public BlockConfigManager(mcMMO plugin) {
|
||||
Pattern middlePattern = Pattern.compile("blocks\\.(?:.+)\\.yml");
|
||||
Pattern startPattern = Pattern.compile("(?:.+)\\.blocks\\.yml");
|
||||
File dataFolder = new File(mcMMO.getModDirectory());
|
||||
File vanilla = new File(dataFolder, "blocks.default.yml");
|
||||
ModManager modManager = mcMMO.getModManager();
|
||||
|
||||
if (!vanilla.exists()) {
|
||||
plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "blocks.default.yml", false);
|
||||
}
|
||||
|
||||
for (String fileName : dataFolder.list()) {
|
||||
if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File file = new File(dataFolder, fileName);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
modManager.registerCustomBlocks(new CustomBlockConfig(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,49 +9,29 @@ import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairItemType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairMaterialType;
|
||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class CustomArmorConfig extends ConfigLoader {
|
||||
private static CustomArmorConfig instance;
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
|
||||
private List<Repairable> repairables;
|
||||
public List<Material> customBoots = new ArrayList<Material>();
|
||||
public List<Material> customChestplates = new ArrayList<Material>();
|
||||
public List<Material> customHelmets = new ArrayList<Material>();
|
||||
public List<Material> customLeggings = new ArrayList<Material>();
|
||||
|
||||
private List<Material> customBoots = new ArrayList<Material>();
|
||||
private List<Material> customChestplates = new ArrayList<Material>();
|
||||
private List<Material> customHelmets = new ArrayList<Material>();
|
||||
private List<Material> customLeggings = new ArrayList<Material>();
|
||||
public List<Repairable> repairables = new ArrayList<Repairable>();
|
||||
|
||||
public CustomArmorConfig() {
|
||||
super("mods", "armor.yml");
|
||||
protected CustomArmorConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomArmorConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomArmorConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public List<Repairable> getLoadedRepairables() {
|
||||
if (repairables == null) {
|
||||
return new ArrayList<Repairable>();
|
||||
}
|
||||
|
||||
return repairables;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
loadArmor("Boots", customBoots);
|
||||
loadArmor("Chestplates", customChestplates);
|
||||
loadArmor("Helmets", customHelmets);
|
||||
@@ -99,7 +79,7 @@ public class CustomArmorConfig extends ConfigLoader {
|
||||
|
||||
if (repairable) {
|
||||
byte repairData = (byte) config.getInt(armorType + "." + armorName + ".Repair_Material_Data_Value", -1);
|
||||
int repairQuantity = Repair.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
||||
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
||||
|
||||
if (repairQuantity == 0) {
|
||||
repairQuantity = config.getInt(armorType + "." + armorName + ".Repair_Material_Data_Quantity", 2);
|
||||
@@ -111,26 +91,10 @@ public class CustomArmorConfig extends ConfigLoader {
|
||||
durability = (short) config.getInt(armorType + "." + armorName + ".Durability", 70);
|
||||
}
|
||||
|
||||
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, repairQuantity, 0, durability, RepairItemType.ARMOR, RepairMaterialType.OTHER, 1.0));
|
||||
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, 0, repairQuantity, durability, ItemType.ARMOR, MaterialType.OTHER, 1.0));
|
||||
}
|
||||
|
||||
materialList.add(armorMaterial);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomBoots(Material material) {
|
||||
return customBoots.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomChestplate(Material material) {
|
||||
return customChestplates.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomHelmet(Material material) {
|
||||
return customHelmets.contains(material);
|
||||
}
|
||||
|
||||
public boolean isCustomLeggings(Material material) {
|
||||
return customLeggings.contains(material);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,40 +13,29 @@ import com.gmail.nossr50.config.ConfigLoader;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
|
||||
public class CustomBlockConfig extends ConfigLoader {
|
||||
private static CustomBlockConfig instance;
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
|
||||
private List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customWoodcuttingBlocks = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customOres = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
||||
private List<MaterialData> customAbilityBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customExcavationBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customHerbalismBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customMiningBlocks = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customOres = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customLogs = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customLeaves = new ArrayList<MaterialData>();
|
||||
public List<MaterialData> customAbilityBlocks = new ArrayList<MaterialData>();
|
||||
|
||||
private HashMap<MaterialData, CustomBlock> customBlockMap = new HashMap<MaterialData, CustomBlock>();
|
||||
public HashMap<MaterialData, CustomBlock> customBlockMap = new HashMap<MaterialData, CustomBlock>();
|
||||
|
||||
public CustomBlockConfig() {
|
||||
super("mods", "blocks.yml");
|
||||
protected CustomBlockConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomBlockConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomBlockConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
loadBlocks("Excavation", customExcavationBlocks);
|
||||
loadBlocks("Herbalism", customHerbalismBlocks);
|
||||
loadBlocks("Mining", customMiningBlocks);
|
||||
loadBlocks("Woodcutting", customWoodcuttingBlocks);
|
||||
loadBlocks("Woodcutting", null);
|
||||
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
||||
|
||||
if (needsUpdate) {
|
||||
@@ -83,18 +72,23 @@ public class CustomBlockConfig extends ConfigLoader {
|
||||
continue;
|
||||
}
|
||||
|
||||
byte blockData = Byte.valueOf(blockInfo[1]);
|
||||
byte blockData = (blockInfo.length == 2) ? Byte.valueOf(blockInfo[1]) : 0;
|
||||
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||
blockList.add(blockMaterialData);
|
||||
|
||||
if (blockList != null) {
|
||||
blockList.add(blockMaterialData);
|
||||
}
|
||||
|
||||
if (skillType.equals("Ability_Blocks")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain");
|
||||
int smeltingXp = 0;
|
||||
|
||||
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
||||
customOres.add(blockMaterialData);
|
||||
smeltingXp = config.getInt(skillType + "." + blockName + ".Smelting_XP_Gain", xp / 10);
|
||||
}
|
||||
else if (skillType.equals("Woodcutting")) {
|
||||
if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) {
|
||||
@@ -106,43 +100,7 @@ public class CustomBlockConfig extends ConfigLoader {
|
||||
}
|
||||
}
|
||||
|
||||
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled")));
|
||||
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 org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigLoader;
|
||||
@@ -12,24 +11,14 @@ import com.gmail.nossr50.datatypes.mods.CustomEntity;
|
||||
import org.apache.commons.lang.ClassUtils;
|
||||
|
||||
public class CustomEntityConfig extends ConfigLoader {
|
||||
private static CustomEntityConfig instance;
|
||||
public HashMap<String, CustomEntity> customEntityClassMap = new HashMap<String, CustomEntity>();
|
||||
public HashMap<String, CustomEntity> customEntityTypeMap = new HashMap<String, CustomEntity>();
|
||||
|
||||
private HashMap<String, CustomEntity> customEntityClassMap = new HashMap<String, CustomEntity>();
|
||||
private HashMap<String, CustomEntity> customEntityTypeMap = new HashMap<String, CustomEntity>();
|
||||
|
||||
public CustomEntityConfig() {
|
||||
super("mods", "entities.yml");
|
||||
protected CustomEntityConfig(String fileName) {
|
||||
super("mods", fileName);
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
public static CustomEntityConfig getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new CustomEntityConfig();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
if (config.getConfigurationSection("Hostile") != null) {
|
||||
@@ -71,47 +60,4 @@ public class CustomEntityConfig extends ConfigLoader {
|
||||
customEntityClassMap.put(clazz == null ? null : clazz.getName(), entity);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCustomEntity(Entity entity) {
|
||||
if (customEntityTypeMap.containsKey(entity.getType().toString())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
return customEntityClassMap.containsKey(((Class<?>) entity.getClass().getDeclaredField("entityClass").get(entity)).getName());
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof NoSuchFieldException || e instanceof IllegalArgumentException || e instanceof IllegalAccessException) {
|
||||
return customEntityClassMap.containsKey(entity.getClass().getName());
|
||||
}
|
||||
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public CustomEntity getCustomEntity(Entity entity) {
|
||||
CustomEntity customEntity = customEntityTypeMap.get(entity.getType().toString());
|
||||
|
||||
if (customEntity == null) {
|
||||
try {
|
||||
customEntity = customEntityClassMap.get(((Class<?>) entity.getClass().getDeclaredField("entityClass").get(entity)).getName());
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof NoSuchFieldException || e instanceof IllegalArgumentException || e instanceof IllegalAccessException) {
|
||||
customEntity = customEntityClassMap.get(entity.getClass().getName());
|
||||
}
|
||||
else {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return customEntity;
|
||||
}
|
||||
|
||||
public void addEntity(CustomEntity customEntity, String className, String entityName) {
|
||||
customEntityTypeMap.put(entityName, customEntity);
|
||||
customEntityClassMap.put(className, customEntity);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user