1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 17:53:00 +01:00

Compare commits

...

620 Commits

Author SHA1 Message Date
Robert A. C
24e4c28355 Updating the readme to reflect current times. 2018-12-24 20:05:18 -08:00
nossr50
6ec61ecb76 Fireworks from ability activation will be Opt-In, updates to strings 2018-12-24 19:05:46 -08:00
nossr50
55a69006bf Merge branch 'master' of https://github.com/mcMMO-Dev/mcMMO 2018-12-24 17:53:03 -08:00
nossr50
8a02230fd2 Updating strings relating to the project. 2018-12-24 17:52:39 -08:00
t00thpick1
2a26b016d9 Only stop monitoring LOG To LOG transitions, there are a ton of non-air block placements we want to monitor 2018-12-24 19:33:26 -05:00
nossr50
7be5b4ecbd Monitor only blocks that replace air. This fixes the TreeFeller interaction with stripped wood. 2018-12-24 00:21:13 -08:00
t00thpick1
565fb35217 Update McmmoCommand.java 2018-12-23 16:40:57 -05:00
LogGits
d2b8c527ad Use dropItem instead of dropItemNaturally (#3644)
This could possibly eliminate a few issues.
2018-12-14 19:51:44 -05:00
LogGits
2cdb17d64f Use dropItem instead of dropItemNaturally (#3645)
Should fix #3641 and #3638
2018-12-14 19:51:38 -05:00
LogGits
96f06ca812 Fixed plugin.yml mistake (#3639)
Accidentally forgot to add the ":" to some of the permissions.
2018-12-09 22:59:16 -05:00
Fabrizio La Rosa
685f6d76a8 Corrected a word (#3629) 2018-12-09 18:29:40 -05:00
LogGits
840cfbe94d Updated plugin.yml to include command permissions (#3637)
This will stop people from seeing the commands in tabcomplete for 1.13.2 if they dont have the permission for it. Should fix #3625.
2018-12-09 18:26:09 -05:00
Josh
605535ed60 fix memory leak (#3631)
on servers with lots of spawner farms this metadata won't get GC'd unless removed, line 436 its added but never removed as far as I can tell
2018-12-06 22:05:55 -05:00
t00thpick1
71c72045b9 Revert "Update locale_zh_CN.properties (#3541)"
This reverts commit eb930883fa.
2018-12-02 23:28:36 -05:00
Ghost_chu
eb930883fa Update locale_zh_CN.properties (#3541) 2018-12-02 23:27:39 -05:00
CNAmira
30ed18eb95 Update Simplified Chinese localization (#3617) 2018-12-02 23:27:19 -05:00
Fabrizio La Rosa
8508f5b8b8 Bug fix for italian locale (#3616)
Fixed the command "/mctop Tiro con l'Arco" that with spaces was not recognized (/mctop archery is not usable if the English locale is not selected).
Now is "/mctop Arco".

That should fix also "/Tiro con l'Arco".
2018-12-02 23:26:58 -05:00
ゆき
dfab223eb2 Fix locale_ja_JP.properties colors (#3628) 2018-12-02 23:26:38 -05:00
Andrewkm
dd82fa0791 Duplicate shulker entry (#3623) 2018-11-26 23:30:08 -05:00
t00thpick1
af8d2dc2c7 Tridents are enchantable 2018-11-26 23:28:15 -05:00
t00thpick1
9f9529debf Has this ever not happened??? I don't understand why it only showed up in 1.13..... Fixes #3564 2018-11-26 23:10:51 -05:00
t00thpick1
495c4a33e5 Store skill totals rather than calculating them on the fly for faster leaderboard queries. 2018-11-14 20:31:57 -05:00
t00thpick1
203d3749ee Fix herbalism XP again 2018-10-14 21:27:55 -04:00
t00thpick1
1fcecbd3e7 Replant only the fully grown plants. 2018-10-13 17:09:08 -04:00
t00thpick1
d778616b2c Herbalism was the one that actually needed to remain blockdata. 2018-10-13 17:06:54 -04:00
t00thpick1
4bdd97a302 Not sure why this is even still here. 2018-10-09 21:57:01 -04:00
t00thpick1
ab2a031ee0 Missed file in commit 2018-10-09 21:56:47 -04:00
t00thpick1
5663b71387 Some of these should not have been blockdata, also this should check age of crops. 2018-10-09 21:52:23 -04:00
ProfLuz
2a43bce849 Fix spectators being affected by a combat ability (#3591)
* Fix spectators being affected by a combat ability
2018-10-01 22:21:22 -04:00
András Marczinkó
592c3a2142 Fix woodcutting double drop item names (#3585) 2018-09-23 14:43:38 -04:00
András Marczinkó
e9ca341476 End_Bricks renamed to End_Stone (#3584) 2018-09-23 11:52:48 -04:00
Captain Justin
76617c8a61 German spelling fix (#3576) 2018-09-23 11:52:35 -04:00
András Marczinkó
10ff097232 Fix config item names (#3583) 2018-09-22 13:45:25 -04:00
Sean Porter
1e043d481a Merge pull request #3582 from andris155/patch-7
Wood renamed to Wooden
2018-09-22 09:54:39 -07:00
Sean Porter
7f8c670dc1 Merge pull request #3581 from andris155/patch-6
QUARTZ_ORE was renamed to NETHER_QUARTZ_ORE
2018-09-22 09:54:24 -07:00
András Marczinkó
0e536a2cb3 Wood renamed to Wooden 2018-09-22 18:53:08 +02:00
András Marczinkó
090cf82a39 Fix Terracotta and stained Terracotta names (#3580) 2018-09-22 12:50:25 -04:00
András Marczinkó
6e60f39f82 QUARTZ_ORE was renamed to NETHER_QUARTZ_ORE 2018-09-22 18:49:02 +02:00
András Marczinkó
b8078e4730 Fix Mycelium name (#3579) 2018-09-22 12:21:23 -04:00
András Marczinkó
e08fe64db2 Fix End Stone name (#3578) 2018-09-22 12:21:13 -04:00
Sean Porter
2b576568a7 QUARTZ_ORE was renamed to NETHER_QUARTZ_ORE. 2018-09-16 18:47:15 -07:00
t00thpick1
e2edbaad34 Update herbalism permissions for new block names. Should fix replanting crops. 2018-09-14 22:44:21 -04:00
t00thpick1
184b98bbdc BREAKING CHANGE - Fix typo in secondary skill enum...... Fixes #2891 2018-09-14 22:36:47 -04:00
t00thpick1
7cc604dbdb Update potions.yml to reflect 1.13 potions and material names. 2018-09-14 20:50:28 -04:00
t00thpick1
44ed35825f more cleanup in the TreasureConfig. 2018-08-30 23:59:55 -04:00
t00thpick1
22833eea6c Slightly delay recipe loading because apparently spigot broke doing that on enable....... 2018-08-30 23:57:29 -04:00
t00thpick1
64dfc1e3d3 Fix hylian drops 2018-08-30 23:28:48 -04:00
nemba246
6619ca1d22 update excavation on experience.yml (#3551)
In 1.13, the name of the grass block changed from "grass" to "grass_block". This caused no experience to be given while using a shovel on grass. This change was part of something mojang called the flattening and could possibly be the cause of some other experience related issues. 
https://minecraft.gamepedia.com/1.13/Flattening
2018-08-30 22:37:01 -04:00
Devon Palma
2f2a80e1ce Various Fixes (#3537)
* Updated ItemUtils, added isBlock check to smelt functions

+ added a check in ItemUtils.isSmeltable() and ItemUtils.isSmelted() to make sure the Item type was a block to prevent an error occuring mentioned in https://github.com/mcMMO-Dev/mcMMO/issues/3536

* Fixed Green Thumb replant issue

see https://github.com/mcMMO-Dev/mcMMO/issues/3535

HerbalismManager
= fixed names of netherwart
= fixed handleBlockState, and slightly altered it
StringUtils
= fixed name of netherwart

* Fixes to herbalism skill

Herbalism
= fixed material name for grass in green terra block conversion
= fixed material name for grass in shroom thumb block conversion
EntityListener
= fixed material name for melon in food level change
experience config
= updated name for melon and sugar cane

* Minor Name Updates

experience config
= removed Stone|*
= added Stone, Granite, Adesite, Diorite
MaterialTypes
= updated material reference for wood

* Small fishing change

PlayerListener
= made it so COD, TROPICAL_FISH, and PUFFERFISH are no longer overwritten, so players can now catch these
2018-08-05 10:15:12 -04:00
Aaron Karras
fa1bbd2031 Updated SkillUtils to no longer use BlockData (#3533) 2018-08-03 18:21:13 -04:00
R4zorax
a39a77f89e Fix fishing in 1.13 (#3528)
* Fix fishing to use Material instead of BlockData (that was AIR)
2018-08-02 20:27:15 -04:00
R4zorax
7800e48f61 Make BiomeAdaptor support Bukkit 1.13 and bump java-version to 1.8 (#3526) 2018-08-01 21:23:29 -04:00
Shane Robertson
63378ae4c1 Updated herbalism (crop replaced by ageable) (#3523)
* [WIP] Replacing MaterialData with Blockdata

* Fixed most block based experience gain

* Removed debug prints

* Updated configs

* [WIP] Replacing MaterialData with Blockdata

* Fixed most block based experience gain & updated wooden_tools

* ACTAULLY removed debug prints

* [WIP] Replacing bukkit treespecies 

This feature has been unofficially deprecated, (not yet fixed/marked in bukkit)
Also updated config.yml to match changes

* Updated configs

* [WIP] Replacing MaterialData with Blockdata

* [WIP] Replacing MaterialData with Blockdata

* Fixed most block based experience gain

* Fixed most block based experience gain & updated wooden_tools

* Removed debug prints

* ACTAULLY removed debug prints

* [WIP] Replacing bukkit treespecies 

This feature has been unofficially deprecated, (not yet fixed/marked in bukkit)
Also updated config.yml to match changes

* Fixed greenterra

Replaced deprecated features
2018-07-31 21:35:45 -04:00
t00thpick1
fecf83c79c Don't break on double drops for woodcutting. 2018-07-30 20:44:10 -04:00
t00thpick1
f287b6d8a7 Update fishing experience config 2018-07-27 22:30:57 -04:00
Leomixer17
9082658357 Update locale_it.properties (#3509) 2018-07-27 18:28:44 -04:00
Shane Robertson
4bda175328 Removed misc, print statements (#3508)
* ACTAULLY removed debug prints
2018-07-26 20:47:45 -04:00
Shane Robertson
ee324c77a9 Fixed errors with block-based skill experience (#3506)
* Updated configs

* [WIP] Replacing MaterialData with Blockdata

* Fixed most block based experience gain

* Fixed most block based experience gain & updated wooden_tools

* Removed debug prints
2018-07-26 19:53:29 -04:00
Jamie Sinn
210b418e44 Get string before format. (#3507) 2018-07-26 19:52:15 -04:00
t00thpick1
b73eced36f Remove sound adapter 2018-07-25 20:29:40 -04:00
shanedrgn
6296a6adde Updated configs
Signed-off-by: t00thpick1 <t00thpick1dirko@gmail.com>
2018-07-25 20:20:31 -04:00
Leomixer17
99f6192965 Update locale_it.properties (#3502) 2018-07-25 19:53:23 -04:00
t00thpick1
bff454f397 Wood is not planks. 2018-07-24 20:50:17 -04:00
t00thpick1
8216dbe355 This is kinda important 2018-07-23 22:38:05 -04:00
t00thpick1
fbe26af2d7 Merge remote-tracking branch 'origin/master' 2018-07-23 22:14:44 -04:00
t00thpick1
0a1559511a Quick and dirty 1.13 update. I.e. it now compiles for 1.13. 2018-07-23 22:13:57 -04:00
Jamie Sinn
aee60f2c09 Mctop Cooldown message correction. Closes https://github.com/mcMMO-Dev/mcMMO/issues/3470 (#3481) 2018-07-15 10:08:52 -04:00
FabioZumbi12
9ce850f84f Re-added handlersList to event. (#3234) 2018-06-13 20:50:46 -04:00
t00thpick1
cbff8482ce Merge pull request #3427 from joblo2213/master
Add McMMOPlayerSalvageCheckEvent
2018-06-09 11:50:32 -04:00
joblo.2213
0035762a71 Add McMMOPlayerSalvageCheckEvent 2018-06-09 09:46:06 +02:00
t00thpick1
3d515aab23 Bump version 2018-05-25 22:52:10 -04:00
Glitchfinder
e77801f3c1 Ensure all entity types function in experience.yml
Fixes #3443
2018-05-16 08:07:07 -07:00
Glitchfinder
c83d011faa Don't convert raw salmon to raw fish when summoning ocelots.
Fixes #3366
2018-05-15 19:40:48 -07:00
Glitchfinder
5aa4949baa Allow experience on crops grown with bonemeal. 2018-05-15 11:31:52 -07:00
Glitchfinder
906ead53dd Merge branch 'patch-1' of github.com:ChrisLane/mcMMO 2018-05-11 10:09:37 -07:00
Glitchfinder
cbcdedc67a Merge branch 'patch-1' of github.com:MiniDigger/mcMMO 2018-05-11 10:08:26 -07:00
Glitchfinder
c87b410823 Merge branch 'anvil_unbreakables' of github.com:GiovanH/mcMMO 2018-05-11 10:07:53 -07:00
Glitchfinder
0a447f68c6 Merge branch 'patch-2' of github.com:GiovanH/mcMMO 2018-05-11 10:06:58 -07:00
Glitchfinder
e98d241452 Merge branch 'master' of github.com:ProgrammingAtDawn/mcMMO 2018-05-11 10:04:14 -07:00
GiovanH
421455224f Codebase! 2018-05-10 04:54:35 +01:00
t00thpick1
29c55312a5 Don't allow these commands on child skills. 2018-05-01 23:12:06 -04:00
Gio
6c474c8838 Added nether bricks to mining
As per https://github.com/mcMMO-Dev/mcMMO/issues/3426
2018-04-30 20:38:01 -05:00
t00thpick1
03182ea24c Merge pull request #3440 from GiovanH/patch-1
Handle playerdata without bukkit.lastKnownName info
2018-04-30 18:38:08 -04:00
Gio
2c6543da9e More descriptive text. 2018-04-30 13:30:41 -05:00
Gio
20bbdfc4ab Check playerdata for corruption
Fixed a null pointer exception that would occur if the offlinePlayer object did not have a defined string for .getName();
2018-04-30 12:54:35 -05:00
Glitchfinder
5b2ebf4aa8 Prevent shulker boxes from activating abilities.
Fixes #3438.
2018-04-29 23:09:52 -07:00
t00thpick1
2b159adefd Merge pull request #3330 from hoorigan/ench-book-fixes
Enchanted book fixes
2018-04-28 20:04:06 -04:00
Glitchfinder
be2de1d487 Fix a duping bug that uses a coordinate error. Fixes #2979 and fixes #3429. 2018-04-15 10:19:31 -07:00
t00thpick1
6876f192de Deflag blocks when they grow, Fixes #3311, #3207 2018-04-07 13:41:20 -04:00
t00thpick1
875db44afd Don't active skills on shulker blocks Fixes #3423 2018-04-07 13:33:28 -04:00
t00thpick1
2e120abe3a Merge pull request #3395 from ezeiger92/master
Fix a couple tickets
2018-02-15 23:00:30 -05:00
ezeiger92
feeb17d6f0 Scale fishing drop chance by lure rather than subtracting 1
Fixes mcMMO-Dev/mcMMO#3383
Added config option for lure enchantment modifier
Fixes lure enchantment having no effect on drops from offhand
2018-02-15 15:48:21 -08:00
ezeiger92
6d2003d577 Remove offhand fishing rod if not in main hand
Fixes mcMMO-Dev/mcMMO#3342
Fixed style error in last commit
2018-02-15 13:59:10 -08:00
ezeiger92
40b609ccd8 Respect unbreakable tag on items when attempting durability changes
Fixes mcMMO-Dev/mcMMO#3327
Fixes mcMMO-Dev/mcMMO#3391
2018-02-15 13:38:10 -08:00
ProgrammingAtDawn
d64399df49 Calculate experience gain before processing green thumb. 2018-01-24 20:53:59 +01:00
t00thpick1
d4f2f0e11b Use new recipe constructor to avoid deprecation errors. 2017-12-17 13:31:30 -05:00
hoorigan
916d9a7c8a ItemUtils: add ENCHANTED_BOOK to isEnchantable()
This will (hopefully) make mcMMO aware that ENCHATED_BOOK can have an enchantment.
2017-10-31 16:47:46 -04:00
hoorigan
6d5ab0edda FishingManager: force enchant on enchanted book
Added a small conditional to ensure that enchanted books get an enchantment.
2017-10-31 16:45:08 -04:00
t00thpick1
307d483323 Dont do diminishing returns on command caused xp gains Fixes #3312 2017-10-27 20:30:56 -04:00
t00thpick1
eb4960f307 Merge pull request #3300 from EasyMFnE/master
Add automatic Alchemy potion colorization and custom color config
2017-10-05 19:44:47 -04:00
t00thpick1
9df72e61a2 Mob Health bars global toggle 2017-10-03 23:32:54 -04:00
EasyMFnE
fcb6391ba3 Remove leftover debug code. 2017-09-28 11:44:15 -04:00
EasyMFnE
16a77f281e Add automatic Alchemy potion colorization and custom color configuration. 2017-09-23 15:35:38 -04:00
t00thpick1
87ebf7023f Additional changes that are less important but related to the dupe fix. 2017-09-12 20:01:09 -04:00
t00thpick1
028f87653a Check length of the Y dimension of the array, not the x dimension, which will only be 16 2017-09-08 23:16:41 -04:00
t00thpick1
0e51983819 Y, not Z, very very important. 2017-09-06 00:23:35 -04:00
t00thpick1
c174f2b829 Back to development 2017-09-05 20:57:25 -04:00
t00thpick1
8e9d393eb2 Bump version 2017-09-05 20:51:24 -04:00
t00thpick1
f1f02fd005 Don't fail out of saves just because a single player fails. 2017-09-01 00:45:22 -04:00
t00thpick1
f279a979e3 Also handle bottom of world 2017-09-01 00:44:37 -04:00
t00thpick1
e0bbe9cea4 Fix error with pistons retracting near top of world. Fixes #3172 2017-09-01 00:43:11 -04:00
t00thpick1
d3cc23f6a0 Fix smelting vanilla xp boost. Fixes #3270 2017-09-01 00:32:11 -04:00
t00thpick1
4c3f3ee4e2 Dont use named seeds in replanting. Fixes #3273 2017-08-31 23:47:28 -04:00
t00thpick1
2d7c5d7fd6 Merge pull request #3279 from ezeiger92/master
Pull downstream changes
2017-08-31 00:08:32 -04:00
t00thpick1
8be68aa6df Merge pull request #3252 from ezeiger92/fix-3250
Fix 3250
2017-08-31 00:02:37 -04:00
Erik
a731ad14ec Merge pull request #1 from ezeiger92/many-fixes
Pull in fixes
2017-08-15 21:44:49 -07:00
Erik
05ca96aa7f Build against 1.12.1 to NOT break getTargetBlock 2017-08-15 16:45:32 -07:00
Erik
60aa32d003 Patches!
* Update bukkit version
* Default vanilla  exp modifier for fishing is now 1
* Fixed beetroot permission for herbalism
2017-08-15 12:20:09 -07:00
Erik
0e7ee41444 Follow spacing convention 2017-08-05 11:53:38 -07:00
Erik
b5f6b1d97f Fix for 3250 - HashSet<Byte> to HashSet<Material> for getTargetBlock 2017-08-05 11:50:24 -07:00
t00thpick1
f1ac5739e4 [bugfix] Resolve issues with Herbalism exp.
Due to flaws the previous changes to the configuration system combined with some bad lines in the experience.config that I mistakenly recommended, herbalism was not granting experience in most cases, as it was marking newly planted crops and such as player placed no exp granting blocks, rather than ignoring them as it should.
block types now are evaluated in 3 steps:
1: Explicit Name  i.e. ("Crops|4", "Crops|0"), Which is the material name then data value
2: "friendly name"  i.e. ("Crops_Ripe", "Crops_Ungrown"), Which is a typically data valueless name,  some of which I make up in mcMMO, but most of which are just the Material name
3: Wildcard name  i.e. ("Crops|*") Which is any block with that block value, regardless of data value

In order to be sure herbalism grants exp for you once again, make sure your configuration for herbalism looks similar to this:
https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/resources/experience.yml#L151

In terms of which blocks are listed there.  Specifically, there should be no blocks marked "ungrown"
2017-08-01 01:33:02 -04:00
t00thpick1
8cbb57df97 Fix herbalism I think 2017-07-23 18:06:45 -04:00
t00thpick1
2c8d2998bb Merge pull request #3201 from wysohn/master
HandlerList should be present in every Events. (It's static you know)
2017-06-28 08:59:52 -04:00
t00thpick1
44684fcfd0 Fix green thumbing plants to grow. They need to be in the config to be used, but at 0 exp so we don't gain exp off them 2017-06-27 20:26:55 -04:00
t00thpick1
7081e03c23 Back to dev 2017-06-27 20:26:30 -04:00
t00thpick1
246db98519 bump version 2017-06-26 20:56:34 -04:00
Chris Lane
ee245d348f Remove duplicate "Beetroot_block" option 2017-06-23 14:34:24 +01:00
wysohn
f718741044 HandlerList should be present in every Events. (It's static you know) 2017-06-17 20:16:09 -07:00
t00thpick1
c054ff851a Fix excavation treasures 2017-06-14 21:14:09 -04:00
t00thpick1
755787f9ee Add sapling types 2017-06-10 14:30:06 -04:00
t00thpick1
24f8b2fbd5 More configuration for hylian luck 2017-06-10 14:16:31 -04:00
t00thpick1
ee02a19e9a Add more configuration to shake treasures 2017-06-10 13:59:49 -04:00
t00thpick1
cb5d38c11f Leftover debug 2017-06-10 13:49:19 -04:00
t00thpick1
15436b44da Update configurations and skill block checks to be more configurable. 2017-06-10 13:47:20 -04:00
t00thpick1
5c267663a2 Merge pull request #3160 from filoghost/patch-1
Fix permission error
2017-06-07 21:24:00 -04:00
t00thpick1
fda625b235 Merge pull request #3185 from nathanprocks/master
Add shaking from shulkers
2017-06-07 21:22:30 -04:00
t00thpick1
2cbd8789d8 Merge pull request #3175 from lucko/master
Fix for removed methods in Bukkit 1.12
2017-06-07 21:22:00 -04:00
Nathan Piercy
95167f44f1 Add shaking from shulkers 2017-06-04 16:34:48 +10:00
Luck
789b51fd05 Fix for removed methods in Bukkit 1.12 2017-05-14 16:36:31 +01:00
filoghost
0911c86422 Prevent players from resetting each other's skills
The child permission has the value set to false. From http://bukkit.gamepedia.com/Plugin_YAML: "a child node of false inherits the inverse parent permission". Having the value set to false grants the permission to reset other players' skills to everyone that doesn't have the mcmmo.skillreset permission, which by default nobody has.
2017-04-24 20:17:43 +02:00
t00thpick1
7d05c9d8e6 Add some more defaults into the config. Remove the parts that delete keys, I don't maintain config files well enough to have them remove unknown keys. 2017-04-15 00:24:39 -04:00
t00thpick1
a43ae4178a Some cleanups to mob related XP code 2017-04-15 00:04:07 -04:00
t00thpick1
c9c2c483fa Remove unneccessary code. 2017-04-14 23:34:54 -04:00
t00thpick1
133281faaa Merge pull request #3131 from TheComputerGeek2/master
Prevent disarming, bleed, and axe passives when dealing thorns damage
2017-04-14 23:26:49 -04:00
MiniDigger
ef8987917d Fix avatars in readme, link can't be in new line 2017-04-07 08:25:23 +02:00
TheComputerGeek2
d6a00eaf00 Prevent disarming, bleed, and axe passives when dealing thorns damage 2017-03-06 18:03:15 -08:00
t00thpick1
69151f0855 Forgot to actually add the funfetti 2017-02-22 00:01:39 -05:00
t00thpick1
bb27d753b1 I think this should stop my fireworks from damaging people 2017-02-22 00:00:47 -05:00
t00thpick1
37ce29a5e8 Merge pull request #3094 from SupaHam/fix-chimaera-tp-cancel
Set TeleportCommenceLocation to null after Chimaera cancellation.
2017-01-15 22:19:51 -05:00
t00thpick1
6297e1c79b Merge pull request #3104 from kanesada2/skeleton
Fix shake from WITHER-SKELETON. avoid to use depredated method: getSkeltonType().
2017-01-15 22:18:26 -05:00
kanesada2
4e2903e65c I used wrong treasure.yml... 2017-01-13 14:28:54 +09:00
kanesada2
2e7f56eeb5 fix shake for WITHER-SKELETON. avoid to use getSkeltonType() 2017-01-13 14:10:55 +09:00
Ali Moghnieh
7e46d5ca08 Set TeleportCommenceLocation to null after Chimaera cancellation.
This makes the item usable once again, as the prechecks check to make sure the location is null.
2016-12-26 21:26:38 +00:00
t00thpick1
a2bcce9ab1 I believe this resolves berserk allowing you to take drops into your equipment slots. 2016-12-17 17:32:16 -05:00
t00thpick1
2f7b1c38e1 Snapshot again 2016-12-04 21:54:11 -05:00
t00thpick1
789aaec186 I should probably compile before committing in the future. 2016-12-04 21:42:26 -05:00
t00thpick1
f3d6c1727b 1.5.07 - The "Thanks @TheBentoBox for the brewing fix" update 2016-12-04 21:40:30 -05:00
t00thpick1
c029b51c97 Doesn't look like CI handles this anymore :( 2016-12-04 21:39:15 -05:00
t00thpick1
6c5fb5f398 Fix entity kill xp 2016-12-04 20:53:51 -05:00
t00thpick1
4b20db47b2 Update spigot version 2016-12-02 00:12:16 -05:00
t00thpick1
e238ec8fc6 Merge pull request #3067 from TheBentoBox/master
Fix 1.11 brewing, remove health bar from armor stands
2016-12-01 00:54:39 -05:00
t00thpick1
9689f55e5c Merge pull request #3055 from jjm223/bugfix/fuel
Rapid fuel consumption fix
2016-12-01 00:54:32 -05:00
t00thpick1
ec0c7da494 Merge pull request #3050 from MLG-Fortress/master
Don't handle item pickups when Items_As_Unarmed is set to true
2016-12-01 00:54:23 -05:00
Jake Ben-Tovim
5f9f3e8167 Fix 1.11 brewing, remove health bar from armor stands
This fixes brewing on the newest Spigot API builds. The Alchemy skill was completely broken due to a change in the Spigot BrewEvent constructor, which this fixes via the changes to FakeBrewEvent.java and AlchemyPotionBrewer.java. This also adds a check in EntityListener.java for armor stands, so that health bars aren't displayed for them. The health bars never really displayed properly (armor stand health acts differently from most entities), and it allowed players to punch invisible armor stands server admins may have been intentionally hiding to temporarily reveal them via a health bar, which is an issue.
2016-11-28 21:28:05 -05:00
Jacob Martin
6388246418 Fix an issue where brewing stands will consume two fuel units for vanilla ingredients. 2016-11-13 10:26:29 -06:00
RoboMWM
86432eb426 Don't handle item pickups when Items_As_Unarmed is set to true
If `unarmed.Items_As_Unarmed` is set to true in config, then there's no
need to be manually handling item pickups.
2016-10-23 22:38:31 -07:00
t00thpick1
a51585f5d0 Merge pull request #3007 from FabioZumbi12/master
Fix pt-br strings
2016-08-20 22:00:05 -04:00
t00thpick1
9ec75fb470 Back to dev 2016-08-20 21:54:09 -04:00
t00thpick1
c8a7f6d76f Version Bump 2016-08-20 21:50:43 -04:00
t00thpick1
01a8a199d2 Fix a dupe bug that resulted from yet another change to piston code a couple mc patches ago. Oh well. 2016-08-20 21:47:29 -04:00
t00thpick1
f85c54596a Merge pull request #3011 from SidShakal/patch-chunkRefreshRadiusFix
Correcting loop conditions related to "ghost block" mitigation.
2016-08-07 20:55:09 -04:00
Sid Shakal
b3e1acc563 Correcting conditions related to "ghost block" mitigation.
If radius is 1 (as it is when called elsewhere in the class), the loop
conditions fail to refresh some of the neighboring chunks, allowing for
ghost blocks to continue to occur on eastern and southern edges of the
chunk the player is in.

This commit fixes the loop conditions.

= Chunk diagram of old behavior =
-----
-RR--
-RP--
-----
-----

= Chunk diagram of new behavior =
-----
-RRR-
-RPR-
-RRR-
-----

= Legend =
P: the chunk the player is in
R and P: chunks that are refreshed
-: chunks that do not get refreshed
2016-08-07 17:32:34 -05:00
FabioZumbi12
745ff21551 Merge pull request #2 from FabioZumbi12/FabioZumbi12-patch-1
Fix translated strings
2016-08-05 09:59:52 -03:00
FabioZumbi12
31c8cf9766 Fix translated strings
Fix translated strings
2016-08-05 09:59:39 -03:00
t00thpick1
8901db4e18 Add Beetroot to herbalism skill
Merge pull request #2918 from isokissa3/master

His was better.

(cherry picked from commit 3ed0fdf330)
2016-06-26 17:14:19 -04:00
t00thpick1
b1b8c4d713 Back to dev 2016-06-25 13:05:47 -04:00
t00thpick1
b14b37c22d Version bump 2016-06-25 13:00:47 -04:00
t00thpick1
e73e628051 Merge pull request #2951 from minoneer/brewing-fuel
Fix brewing stands consuming all remaining fuel items
2016-06-25 12:53:20 -04:00
t00thpick1
3bb920f22c This is completely untested but it probably works. Maybe Fixes #2966 2016-06-23 21:22:40 -04:00
t00thpick1
2bed26f18a Fix scoreboard numbering being off 2016-06-19 17:47:38 -04:00
t00thpick1
fb3363661b Remove invalid enchantment from default config 2016-06-19 17:42:40 -04:00
t00thpick1
315b713005 These should definently not be hard coded in the future... but allow rabbits and guardians to be shaken down 2016-06-19 17:41:18 -04:00
t00thpick1
70de0ba00b Enable Beetroot I think 2016-06-19 17:33:43 -04:00
minoneer
25cad3afc6 Fix brewing stands consuming all remaining fuel items when the fuel bar is refilled 2016-06-09 02:10:27 +02:00
t00thpick1
11aa126b80 Merge pull request #2918 from isokissa3/master
Exploit fix, turning spawned pigs into zombie pigmans using lightning stike allows you gain XP
2016-04-28 10:31:24 -04:00
isokissa3
d0e8bb3174 Fixed spacing 2016-04-27 13:45:26 +03:00
isokissa3
6b03108052 Fixed formatting 2016-04-26 15:26:50 +03:00
isokissa3
34447ef874 Exploit fix, turning spawned pigs into zombie pigmans using lightning stike allows you gain XP 2016-04-25 18:47:15 +03:00
t00thpick1
dcd79e87e1 This command probably works 2016-04-23 00:32:04 -04:00
t00thpick1
8822b4edae Fix typo 2016-04-03 00:25:50 -04:00
t00thpick1
a24d6ff018 Missed removals 2016-03-27 11:46:00 -05:00
t00thpick1
707195f237 I honestly forgot this was in here. Fixes #2863 2016-03-27 11:12:16 -05:00
t00thpick1
321fcd7b84 Merge pull request #2850 from DylanCare/master
Fixes Alchemy for Stage 1 Potions and Lingering
2016-03-23 21:21:51 -05:00
Dylan
c5970e9246 Ensure NETHER_WARTS are renamed to NETHER_STALK 2016-03-21 14:42:57 -04:00
Dylan
538a0c5d6c Fixes Stage 1 Potions
The 'NETHER_WARTS' material enum should be 'NETHER_STALK' to represent the actual item.
Adds Dragon's Breath as Tier 1 Ingredient so lingering potions are actually validated as an mcMMO brew.
Adds second type of Potion of Water to support water potions that are spawned in via commands or other plugins.
2016-03-21 14:38:58 -04:00
t00thpick1
4c4df60b81 Was in a second location as well. 2016-03-20 17:52:21 -05:00
t00thpick1
d1cf08c6ba Null check. Fixes #2840 #2842 2016-03-20 12:47:27 -05:00
t00thpick1
e091a8eb55 Fix material validation errors. 2016-03-20 12:42:16 -05:00
t00thpick1
d579c9a2af Merge pull request #2829 from DorCoMaNdO/master
Stop duplicate messages from abilities.
2016-03-17 19:38:55 -05:00
Dor
a711d3a3e3 Stop duplicate messages from abilities. 2016-03-18 02:18:40 +02:00
Dor
2c197af9fd Merge remote-tracking branch 'refs/remotes/mcMMO-Dev/master' 2016-03-18 02:17:03 +02:00
t00thpick1
d58d621f96 Bump java compat version (reverted from commit 0203252b63) 2016-03-17 16:57:27 -05:00
t00thpick1
0203252b63 Bump java compat version 2016-03-17 16:52:41 -05:00
t00thpick1
22edd121d3 Back to dev 2016-03-17 12:36:32 -05:00
t00thpick1
31b83becad Version bump 1.5.04 2016-03-17 12:36:08 -05:00
t00thpick1
6cce3098db Update PotionConfigGenerator and default potions.yml for missing potions 2016-03-17 12:31:20 -05:00
t00thpick1
fd3d60d112 Merge pull request #2828 from SidShakal/master
Moved center of block drops to block center. Fixes #2544.
2016-03-17 11:16:24 -05:00
t00thpick1
9094e5feb8 French Translation update provided by @HollishKid Resolves #2819 2016-03-17 12:12:22 -05:00
Sid Shakal
60bfabb097 Moved salvaged material spawn center to center of top face of anvil.
My fix for the central spawn points of various block-based item drops
moved them from the low corner of the block to the center of the block.
In the case of the salvaged materials, this moved the central spawn
point from the low corner of the top face of the anvil block to the
center of the block above the anvil block. This felt unnatural, so the
point has been moved to the center of the top face of the anvil block.
2016-03-17 02:06:19 -05:00
Sid Shakal
2d4cf76825 ... (completing the previous style fix)
Not sure how I missed this one. (Well, sure I do. I used the GitHub
editor for the re-casing of the variable name. Noob mistake.)
2016-03-16 20:38:24 -05:00
t00thpick1
6a7279ea05 Merge pull request #2824 from DorCoMaNdO/master
Custom potion brewing now consume fuel from the brewing stand.
2016-03-16 18:07:45 -05:00
Sid
4cb4a6224b Added javadoc for Misc.getBlockCenter(BlockState)
And camel-cased the parameter name to conform to style.
2016-03-16 15:47:24 -05:00
Sid Shakal
a6e445b7ef Minor formatting adjustments to keep my commit to code style.
Whoops. Eclipse removed a line in imports, and I placed a brace on the
wrong line. Fixed.
2016-03-16 12:01:52 -05:00
Sid Shakal
123a139e43 Moving the center of block drops to block center. Fixes #2544. 2016-03-16 11:47:40 -05:00
Dor
4054315c19 Custom potion brewing now consume fuel from the brewing stand.
Fixed a glitch that let players remove the ingredient of a custom potion
from the brewing stand without cancelling the brewing task (this doesn't
seem to have caused any duplicates, once the task finished nothing
happened).
2016-03-16 15:16:48 +02:00
Dor
d942cedb8e Merge remote-tracking branch 'refs/remotes/mcMMO-Dev/master' 2016-03-16 15:11:51 +02:00
t00thpick1
ec774b590b Fix potions. Fixes #2813, #2814 2016-03-16 00:39:36 -05:00
Dor
988a11a5da Merge remote-tracking branch 'refs/remotes/mcMMO-Dev/master' 2016-03-13 01:11:51 +02:00
t00thpick1
1488946fc5 Merge pull request #2694 from Maximvdw/patch-1
Fixed NPE when skill is not in config
2016-03-12 17:56:40 -05:00
t00thpick1
1f05967b0b Merge pull request #2725 from EvilOlaf/patch-3
Fix space and color code
2016-03-12 17:56:11 -05:00
t00thpick1
4924391ae8 Merge pull request #2726 from JamieSinn/master
If sender is console, strip colours for mctop
2016-03-12 17:55:59 -05:00
t00thpick1
f2668d7dbb Merge pull request #2735 from EvilOlaf/patch-2
fixed typo
2016-03-12 17:55:46 -05:00
t00thpick1
d26779bee9 Merge pull request #2810 from DorCoMaNdO/master
Fix Shroom Thumb not removing the item held.
2016-03-12 17:55:35 -05:00
t00thpick1
c75715b186 We need to name the custom potions. 2016-03-12 17:52:19 -05:00
t00thpick1
a238b7029d Update default potions.yml and add tool to do so in the future. 2016-03-12 17:45:14 -05:00
Dor
98511136ee Fix Shroom Thumb not removing the item held. 2016-03-12 20:35:19 +02:00
t00thpick1
6723b3a4c6 Merge pull request #2803 from DorCoMaNdO/master
Treat grass path as grass...
2016-03-12 12:17:04 -05:00
Dor
40c61149cf Treat grass paths as grass. 2016-03-12 08:12:27 +02:00
Dor
4f9a463b9d Merge remote-tracking branch 'refs/remotes/mcMMO-Dev/master' 2016-03-12 08:03:30 +02:00
t00thpick1
f3a8208425 Add new enchants and fallback to bukkit enchant name map 2016-03-11 22:55:01 -05:00
t00thpick1
cbf2f34f93 Update Treasures for potions 2016-03-11 22:42:55 -05:00
t00thpick1
898fad6be4 Merge pull request #2801 from DorCoMaNdO/master
Chorus plant experience reward is now 1 instead of 2.
2016-03-11 22:38:46 -05:00
Dor
eaa1a8edca Chorus plant experience reward is now 1 instead of 2.
Sneaking is required if the player has an item in the off hand and
they're not in a vehicle.
2016-03-12 05:31:11 +02:00
Dor
08db154791 Merge pull request #3 from mcMMO-Dev/master
Merge master
2016-03-12 05:29:35 +02:00
t00thpick1
e1cf4c0c67 Merge pull request #2800 from DorCoMaNdO/master
Fix config auto update.
2016-03-11 22:21:59 -05:00
Dor
529c43b0e6 Fix config auto update. 2016-03-12 05:10:41 +02:00
t00thpick1
376abdf49e Merge pull request #2799 from DorCoMaNdO/patch-3
Use getItemInMainHand()
2016-03-11 22:09:08 -05:00
t00thpick1
11a744a772 Properly calculate potionstage 2016-03-11 22:07:27 -05:00
Dor
47f73ba455 Merge pull request #2 from mcMMO-Dev/master
Merge master
2016-03-12 05:05:37 +02:00
t00thpick1
001b11efc6 Better Auto-Update config loader, still cannot handle multiple options with the exact same name and spacing, but will not break configs anymore in those situations, just mis-comment. 2016-03-11 21:54:57 -05:00
t00thpick1
089f3a0e71 Does this fix the CI? (reverted from commit af9a3c85c6) 2016-03-11 21:30:11 -05:00
t00thpick1
af9a3c85c6 Does this fix the CI? 2016-03-11 21:28:46 -05:00
t00thpick1
a534f9aac1 Update default Potions.yml to have some of the new format, someone should PR a full update. 2016-03-11 21:15:22 -05:00
t00thpick1
a08016647a Update to new Potions API, still supports old config options 2016-03-11 21:08:10 -05:00
Dor
a557fc7d3c Use getItemInMainHand()
Add 1.9 blocks to be detected for experience rewards.
Add experience rewards for the Chorus plant.
Add experience rewards for the Shulker mob.
2016-03-11 16:20:23 +02:00
Dor
2d3d11ec2d Merge pull request #1 from mcMMO-Dev/master
Merge master
2016-03-11 06:01:08 +02:00
t00thpick1
9bc97c6dd3 I think this fixes the auto update config function when a config file has two similar keys. (reverted from commit 52f1e33052) 2016-03-08 08:09:48 -05:00
t00thpick1
52f1e33052 I think this fixes the auto update config function when a config file has two similar keys. 2016-03-07 18:41:49 -05:00
t00thpick1
272e99d41f Master volume config option 2016-03-06 16:48:56 -05:00
t00thpick1
77b67d5a79 Merge pull request #2781 from Tslat/patch-1
Fix infinite GreenThumb & ShroomThumb usage bug

-Not sure if this is the correct way to fix this, but it is A way, and that will due in the meantime.
2016-03-05 23:57:25 -05:00
t00thpick1
8e1f464209 Merge pull request #2783 from Tslat/patch-2
Update ability blacklist to include 1.8 fence[gate] types
2016-03-05 23:56:08 -05:00
Tslat
5f960fd80a Update ability blacklist to include 1.8 fence[gate] types 2016-03-06 14:36:21 +10:00
Tslat
bddca30668 Fix infinite GreenThumb & ShroomThumb usage bug 2016-03-05 20:39:16 +10:00
t00thpick1
28a2b9668d I think preserve potions backwards compatability and also update documentation. 2016-03-01 17:16:59 -05:00
t00thpick1
f52d9feef8 Update Alchemy for 1.9 Configuration style has changed, but theoretically old version should still work I think. 2016-03-01 17:05:58 -05:00
t00thpick1
f77ae6ee15 Biome needs to be in the enum compatability as well. 2016-03-01 13:25:51 -05:00
t00thpick1
88b99a3835 I *think* this should be backwards compatible, I may be wrong and it could break both. 2016-03-01 13:08:11 -05:00
t00thpick1
8d16af8770 Why is my local compiler missing thigns the CI hits? 2016-03-01 12:42:26 -05:00
t00thpick1
fde9ba86a2 Actually update all sounds 2016-03-01 12:39:05 -05:00
t00thpick1
c9356f9ef5 Update for 1.9 Sound enum changes. Now only compatible with 1.9+ 2016-03-01 12:21:00 -05:00
t00thpick1
6a0529f02d Fully remove metrics. 2016-01-28 15:20:36 -05:00
t00thpick1
760178c061 Give custom perk boost the highest priority. 2016-01-28 13:37:21 -05:00
t00thpick1
0bb2642d24 Remove metrics 2016-01-11 14:12:54 -05:00
Very Evil Olaf
635a4f7265 fixed typo
smelt = Schmelzung, not Schmelung
2015-12-28 20:18:55 +01:00
Jamie Sinn
0e34202d4d Curly braces as toothpick requested
@andrewkm
2015-12-20 23:05:48 -05:00
JamieSinn
3a9c55a9ea Remove ternary operators and use if/else 2015-12-12 00:04:23 -05:00
JamieSinn
2dd1775d9a Remove regex replace, does nothing 2015-12-11 23:52:14 -05:00
JamieSinn
a0635eeb08 Remove escape character at EOL 2015-12-11 23:45:17 -05:00
JamieSinn
9677653c54 If sender is console, strip colours for mctop
Ugly ugly colours.
2015-12-11 23:30:21 -05:00
Very Evil Olaf
6cf7167c09 Fix space and color code 2015-12-10 21:37:42 +01:00
t00thpick1
9718123292 Catchup the changelog 2015-11-12 19:19:57 -05:00
t00thpick1
420559efec Append to existing lore when crafting Flux Pickaxes. Fixes #2557 2015-11-12 19:13:27 -05:00
t00thpick1
f4b6d7845e Add config option to auto-truncate player skill levels that exceed the configured max level. Adds #2512
Also removes a good bit of magic numbering from FlatFileDatabaseManager
2015-11-12 19:10:30 -05:00
t00thpick1
b966529487 Merge pull request #2709 from JamieSinn/master
Strip colours from party chat when logging to console.
2015-11-12 17:43:34 -05:00
JamieSinn
9c7b83a52e Strip colours from party chat when logging to console. 2015-11-12 16:06:43 -05:00
t00thpick1
ac9447d439 This is actually not correct. 2015-11-04 16:31:30 -05:00
t00thpick1
a5bcc3ce58 Correctly identify tree species. Fixes #2667 2015-11-04 16:06:28 -05:00
t00thpick1
a020890244 Remove hardcoded nerf to treefeller. Fixes #2666 2015-11-04 15:53:38 -05:00
t00thpick1
616200f20f Fix compile 2015-11-04 15:48:42 -05:00
t00thpick1
1f9c3759e7 Merge pull request #2441 from wolfdate25/patch-2
Update locale_ko.properties.  Hope this is right, I cannot read it personally.
2015-11-04 15:46:55 -05:00
t00thpick1
9fb72cfea8 Merge pull request #2648 from EvilOlaf/patch-2
Update locale_de.properties
2015-11-04 15:46:13 -05:00
t00thpick1
dd84abe927 Merge pull request #2647 from EvilOlaf/patch-1
Missing bracket
2015-11-04 15:45:11 -05:00
t00thpick1
aaa69adb0c Merge pull request #2663 from MinelinkNetwork/fix-child-skill-level
Remove hardcoded limit for parent skill levels when calculating child…
2015-11-04 15:45:00 -05:00
t00thpick1
982ee13631 Merge pull request #2697 from SilverCory/master
Monitor falling blocks.
2015-11-04 15:44:45 -05:00
t00thpick1
8927e16b1f Fix skillreset argument validation. Fixes #2651 2015-11-04 15:43:07 -05:00
t00thpick1
dd01504111 Treat nether portal spawned mobs as spawner mobs. Fixes #2662 2015-11-04 15:37:17 -05:00
t00thpick1
50e727d591 Fix salvaging to return more than 1 item. Fixes #2627 2015-11-04 15:35:22 -05:00
t00thpick1
f84e98d836 Simulate block break for flux mining. Fixes #2668 2015-11-04 15:27:03 -05:00
t00thpick1
7e92905618 Comments so I don't forget why I did it like this again 2015-11-04 13:48:29 -05:00
t00thpick1
9b24dd306c Actually use Hylian Treasure config values. Fixes #2688 2015-11-04 13:35:25 -05:00
t00thpick1
aa796266a7 Don't remember what this is for, but it was in my repo so its probably important 2015-11-04 13:26:47 -05:00
Cory Redmond
a783d0dfc8 Monitor falling blocks. 2015-10-04 21:39:22 +01:00
Maxim Van de Wynckel
f9879be439 Fixed NPE when skill is not in config
When a skill is not configured this would throw an NPE as the section is not found.

Found while trying to get information from an McMMOLevelUp event
2015-09-27 00:50:26 +02:00
Byteflux
5f21efb1cd Remove hardcoded limit for parent skill levels when calculating child skill level 2015-08-16 00:35:22 -07:00
Very Evil Olaf
8e2b8f111f Update locale_de.properties
Add missing space
`Fixen` can not be used in this context. `Reparatur` is slightly better.
2015-08-03 16:53:48 +02:00
Very Evil Olaf
08766a0ff7 Missing bracket 2015-08-03 15:17:52 +02:00
t00thpick1
5b19e2e9d2 Snapshot again for realz 2015-07-28 17:49:36 -04:00
t00thpick1
bef28583f3 Fix missed compile error. Re-release 1.5.03 2015-07-28 17:48:24 -04:00
t00thpick1
eff53d90ab We need to preserve block data with our double drops for silk touch. Fixes #2625 2015-07-25 22:30:22 -04:00
t00thpick1
2aade8b7ff Remove no longer needed DualSupport classes, we crossed that road long ago. 2015-07-25 22:29:19 -04:00
t00thpick1
de0ac51b3d This should ignore absorption damage for allied players. Fixes #2618 2015-07-25 21:59:10 -04:00
t00thpick1
b161a907a7 back to development 2015-07-25 16:53:38 -04:00
t00thpick1
397ec929aa Bump version for release 2015-07-25 16:52:26 -04:00
t00thpick1
f108de9ba2 Incorrect config key. 2015-07-25 16:32:44 -04:00
t00thpick1
e3a139f7bd Update website link 2015-07-18 11:51:53 -04:00
t00thpick1
90f8132030 Merge pull request #2540 from xion87/patch-2
Update locale_it.properties
2015-07-18 11:25:45 -04:00
t00thpick1
60d89c15e6 Merge pull request #2551 from lol768/patch-1
Escape apostrophes in localised strings
2015-07-18 11:24:59 -04:00
t00thpick1
58a0287be7 Merge pull request #2583 from lumis31/patch-1
Update locale_de.properties
2015-07-18 11:24:19 -04:00
t00thpick1
ac3b28da8b Merge pull request #2614 from ThundrRok/master
Fix for custom potions being missed in potion stage calculation. #2386
2015-07-18 11:22:48 -04:00
t00thpick1
12cb1e4161 Offload slightly more calculations to the async loading thread. kinda Fixes #2591 2015-07-18 11:18:42 -04:00
t00thpick1
4e013b44d8 Support offline player experience editing 2015-07-18 10:50:38 -04:00
t00thpick1
9934ab972e Clean up SQLDatabaseManager 2015-07-18 10:48:40 -04:00
t00thpick1
30adac5e63 Properly restore state when errors occur during uuid update 2015-07-18 10:41:55 -04:00
Stephen Jenkins
d3d7c254f4 Fix for custom potions being missed in potion stage calculation. #2386 2015-07-10 18:04:53 -04:00
t00thpick1
93ad040936 Syntax is important 2015-06-20 15:11:18 -04:00
t00thpick1
bfeac43f12 NULL uuids in flatfile should not be wiped as duplicates. Fixes #2594 2015-06-20 13:04:03 -04:00
t00thpick1
4388430491 When an older user no longer has a username that a new user now has, we will update the old entry to be _INVALID_OLD_USERNAME_, however we no longer strictly enforce name uniqueness, so people altering their DB's need to tweek with caution. Invalid old users will not display in the leaderboards. Fixes #2503 2015-06-20 12:57:01 -04:00
t00thpick1
b4e21a7817 Due to the unstable and volatile nature of pistons in the current versions of mc, we cannot reliably guarentee that we can track the position of blocks being moved by pistons, and therefore will no longer track piston moved blocks in the blockstore with 100% accuracy, and will instead just not refresh the potentially empty new blocks. This will not have any effect on regular usage of the plugin aside from 100% preventing any mcMMO related piston dupe bugs. Fixes #2565, #2582 2015-06-11 21:31:20 -04:00
t00thpick1
4fe41fe416 Check Item Type, not Material Type a second time. Fixes #2584 2015-06-11 21:15:40 -04:00
t00thpick1
d8184fb298 Properly calculate diff times for old user purge. Fixes #2541 2015-06-11 18:12:22 -04:00
lumis31
78dec51ad4 Update locale_de.properties
Major updates to the locale_de including:

Most important: added translations to ALL ABILITIES DESCRIPTIONS in german

Additionally:
-Adding a translation for the Alchemy skill
-Addition of translations for fishing
-removed salvage form repair
-added horses and holy hound to taming
->full translation to german except parties
For more changes please see the changelog at the beginnig of the file. No changes have been made to the existing translations except if the information was out of date due to the recent update to Minecraft 1.8. All translations are socially acceptable (usable for children).
2015-06-09 00:10:53 +02:00
lol768
de38826897 Escape apostrophes
"The java.text.MessageFormat class uses the apostrophe (\u0027) as an escape character. Consequently, you need to write two consecutive apostrophes in your translation if you wish to display a single apostrophe"
2015-04-25 22:59:33 +01:00
xion87
f63e793006 Update locale_it.properties
Fixed italian locale for use bow skill command
2015-04-21 09:46:51 +02:00
TfT_02
ecfdd75e36 This should be SNAPSHOT 2015-04-05 20:27:39 +02:00
TfT_02
90b31a29f5 We can simplify this!
Didn’t realize there was a event.getBlocks() method for
BlockPistonRetractEvent as well.
2015-03-22 14:49:51 +01:00
TfT_02
cfa0daefc5 Fix the issues with sticky pistons and slime blocks
This is a fix for issues #2419 and #2494
2015-03-21 19:24:06 +01:00
t00thpick1
4aeda6e9e8 Still not fully on track with the original event, but as we want them to see the potions we create, we can't be fully correct. However, correcting the behavior to decrement the ingredient after the event shouldn't harm anything. Fixes #2486 2015-03-18 16:23:07 -04:00
t00thpick1
4f1f10333f Use notification settings for critical hits Fixes #2498 2015-03-18 16:09:15 -04:00
t00thpick1
342c37a02c Merge pull request #2426 from zreed/master
Empty constructors don't take arguments  Sure why not.
2015-03-18 15:31:44 -04:00
t00thpick1
e347bc1c9e Short data, Fixed #1909 2015-03-18 15:28:57 -04:00
t00thpick1
42116f4467 Include license in builds 2015-03-18 03:56:46 -04:00
t00thpick1
7ce72bafb0 Merge pull request #2489 from isokissa3/master
Fixed duplication Bug #2489 
Tentatively pulling this as I assume its valid.
2015-03-18 03:51:35 -04:00
isokissa3
f76771f0a8 Fixed duplication bug #2419 (Correct fix) 2015-03-11 14:31:56 +02:00
isokissa3
6c29da94f3 Fixed duplication Bug #2419 2015-03-11 11:36:51 +02:00
t00thpick1
981523789e Add Debug and change a line 2015-03-09 14:20:52 -04:00
t00thpick1
d9aacfa059 Back to dev 2015-03-02 15:15:08 -05:00
t00thpick1
5efc5289f7 Version bump release 2015-03-02 15:14:16 -05:00
t00thpick1
1f68f4e654 More debug for rare cases where things don't work. 2015-02-23 20:37:03 -05:00
TfT_02
5670e6696a Archery distance XP bonus cannot exceed indefinitely anymore
Fixes #2465
2015-02-21 09:42:22 +01:00
t00thpick1
ca6dc5195d Properly convert SQL to Flatfile when UUIDs are null 2015-02-16 23:12:50 -05:00
t00thpick1
30ebe318e0 Since apparently we magically can no longer compile without these. 2015-02-16 22:13:32 -05:00
t00thpick1
a1c3f0d651 WHERE'S HARVEY DENT 2015-02-16 21:43:51 -05:00
t00thpick1
347e03d75e When did this break? It was working before. 2015-02-16 12:09:00 -05:00
t00thpick1
8543382bde We want answers for the issues. 2015-02-15 22:03:58 -05:00
t00thpick1
4f1004472c Possibly fix berserk bug 2015-02-15 22:03:58 -05:00
t00thpick1
7aee829b94 Merge pull request #2456 from ulumulu1510/patch-1
Resolve duplication Bug #2419
2015-02-15 12:34:08 -05:00
Benjamin
98701104d8 Resolve duplication Bug #2419
https://github.com/mcMMO-Dev/mcMMO/issues/2419
2015-02-11 20:17:08 +01:00
t00thpick1
7a14e61762 Fix flatfile UUID conversion I think. Fixes #2225, #2411 2015-01-31 14:38:49 -05:00
wolfwork
f42f5c31ed Update locale_ko.properties 2015-01-31 15:10:15 +09:00
t00thpick1
342662c944 Round 3: DeathMatch 2015-01-25 23:28:30 -05:00
t00thpick1
50088fe0bd Round 2 2015-01-25 23:04:02 -05:00
t00thpick1
687f87a748 No more opening inventories with ability tools. Fixes #2416 2015-01-25 22:55:18 -05:00
zreed
6815c66a0e Empty constructors don't take arguments 2015-01-22 07:14:14 -05:00
TfT_02
385fe1bb05 Added option for XP gained by killing bred animals
Fixes #2402
2015-01-10 12:31:13 +01:00
t00thpick1
eddadcc179 Properly allow searches by name without UUID 2015-01-01 23:56:30 -05:00
mjkaufer
9426f44cdd Added isUnarmed Method
Checks if the player is not holding a tool, as opposed to checking if
the player is holding air. This means that attacking with something such
as a dirt block would count as unarmed.
2014-12-29 16:31:18 +01:00
TfT_02
af7ff3df58 Make Archery distance multiplier configurable
Add #2385
2014-12-24 11:00:43 +01:00
TfT_02
7c0cc8794f Whoops, should've incremented these 2014-12-23 18:49:26 +01:00
TfT_02
eda18bc990 Only show the scoreboard tips a couple of times
We can assume a player knows how scoreboards work after showing them
the tips a few times across multiple login sessions

Adds #1833
2014-12-23 14:08:29 +01:00
TfT_02
a2c395db36 Fixed bug where MobHealthbarTypes were not saved 2014-12-23 14:07:10 +01:00
TfT_02
522b085499 Fix bug where no XP was granted when Flux Mining
Fixes #2359
2014-12-22 17:25:55 +01:00
TfT_02
3ea845cfd9 Changed Flux Mining mechanics
Previously, Flux Mining would get unlocked at a specified level with a
specified chance. Once unlocked, the player would have no control over
this ability and some players complained they would like to be able to
turn it on and off.

By adding a new furnace recipe, to craft a special pickaxe - a Flux
Pickaxe - this issue is solved. If a player doesn’t want to use Flux
Mining, they simply shouldn’t mine using a Flux Pickaxe.

Crafting a Flux Pickaxe is simple, just place one of the vanilla
pickaxes in a furnace and cook it up.

Every time the ability is successful, extra durability damage is dealt
to the tool. Just like with other abilities.

Adds #2320
2014-12-22 16:58:22 +01:00
TfT_02
93013b2db1 Fix an NPE when loading potion configs 2014-12-21 17:50:31 +01:00
TfT_02
d5a2dea06b Add option to shake items from player inventories 2014-12-20 23:55:49 +01:00
TfT_02
d188224c06 Make it possible to shake heads from players 2014-12-20 23:55:49 +01:00
TfT_02
3422c5d3eb Don't need this here 2014-12-20 19:14:52 +01:00
TfT_02
ebeebbde72 Randomize spawn location of Call of the Wild pets
So that when you’re spawning multiple pets at once, they don’t all
spawn at the same spot.
2014-12-20 19:14:52 +01:00
t00thpick1
e71eff852c Add ChatColor support for lore and custom item names. Add lore and custom item name support for potions and dyes. 2014-12-20 02:16:23 -05:00
t00thpick1
bfff5682b5 As a semi-temporary measure, lets move 1.8 specific objects into their own classes, so we can be 1.7 and 1.8 compatable. 2014-12-19 13:48:06 -05:00
t00thpick1
429a7d926a 1.8 changed the inheritance structure of Squids, this update resolves issues that cropped up from this change. 2014-12-18 18:15:02 -05:00
TfT_02
262e711bcc Add option for Chimaera Wings to ignore bed spawns
Adds #2365
2014-12-18 23:04:38 +01:00
t00thpick1
b44b1cc859 And back to development 2014-12-18 14:15:59 -05:00
t00thpick1
75dfec1236 Bump version for release build. 2014-12-18 14:14:58 -05:00
t00thpick1
8c2f3cff8f Silly me, prismarine isn't an ore. 2014-12-18 14:11:54 -05:00
t00thpick1
32336b712b Quick initial update for 1.8
Adds default configuration for new blocks and entities.
Updates a few hardcoded utilities to account for new blocks and entities.
2014-12-18 01:36:02 -05:00
t00thpick1
cfc51e9b96 use players for events 2014-12-17 22:34:42 -05:00
t00thpick1
31cefbfc8c Update readme 2014-12-17 18:54:21 -05:00
riking
2c940ecdac Try again later when Mojang ratelimits us 2014-11-26 01:52:17 -08:00
riking
e51809d066 Goddamnit, save more often to make sure progress is made 2014-11-26 01:24:44 -08:00
riking
01a18fa587 Revert "Downgrade Bukkit to 1.7.9 to compile"
This reverts commit d0881ab3fd.
2014-11-24 05:34:15 -08:00
Kane York
f93deeceb6 Merge pull request #2356 from riking/logout-method
This will allow for BungeeCord compat when the sending server knows about the move. It will NOT work if the proxy processes the transfer.
2014-11-24 05:30:49 -08:00
riking
3275395d53 Remove dead logoutParty() method 2014-11-24 05:28:46 -08:00
riking
d0881ab3fd Downgrade Bukkit to 1.7.9 to compile 2014-11-24 05:28:28 -08:00
riking
5db09bf45c Allow synchronous save on logout
This is intended for plugins that have foreknowledge of a logout
happening (e.g. a BungeeCord server hop about to happen), so that they
can tell mcMMO to save the data, and the new server will be able to pull
the profile correctly from the database.
2014-11-24 05:24:13 -08:00
riking
f4406bd9cf Move PlayerQuit logic to mcMMOPlayer.logout() 2014-11-24 05:23:37 -08:00
riking
3b441073fd Change PROFILES_PER_REQUEST to 50
@blood thinks this may fix the 429 issue
2014-11-18 17:25:03 -08:00
riking
da22a8ff93 Change UUID ratelimits to sane values 2014-11-18 17:21:44 -08:00
Harry
f8469cbe00 Fix an old bug where the config is read incorrectly
This should be "DamageModifier" not "DamagerModifier.". As seen here dbc7b98b0d/src/main/resources/advanced.yml (L140) . Thanks to @matagin for pointing this out.
2014-11-03 12:36:20 +01:00
TfT_02
0188629fe2 Should add these to the hash map to prevent a NPE
Fixes #2333
2014-10-25 17:33:55 +02:00
TfT_02
5d246d2701 Add missing UserManager check
Caused an java.lang.IndexOutOfBoundsException: Index: 0

Fixes #2335
2014-10-25 17:29:58 +02:00
t00thpick1
b3cd5486d6 Actually use settings 2014-10-19 01:55:10 -04:00
zreed
7e961fc2a3 Actually include Tomcat (and dependencies) 2014-10-15 22:00:11 -04:00
t00thpick1
8fcd286eb0 This might be important 2014-10-15 01:31:11 -04:00
t00thpick1
4723a7cbdb Switch to a different ConnectionPool implementation 2014-10-15 00:15:43 -04:00
TfT_02
dbc7b98b0d Properly name these config nodes
I forgot that we don’t use underscores here
2014-10-11 13:37:25 +02:00
TfT_02
a5bc547c40 Add settings for Bleed damage
Adds #2154
2014-10-11 12:18:31 +02:00
TfT_02
63b332216e Read summon item from config in /taming command 2014-10-11 11:38:53 +02:00
TfT_02
8e5340ebc3 Wolves attack a target when shot by their owner 2014-10-11 11:38:53 +02:00
TfT_02
e4af611c91 Fix formatting of TreeFeller threshold locale key 2014-10-11 11:38:52 +02:00
TfT_02
c31281971c Summon amount limits and new ability 2014-10-11 11:38:52 +02:00
TfT_02
eda38cba66 Add lifespan to Taming summons 2014-10-11 11:25:57 +02:00
TfT_02
b5a2e76926 Fixed diminished returns not getting disabled 2014-10-10 00:03:51 +02:00
TfT_02
38cc7435dc Prevent strings from getting larger than 16 chars
Fixes #2314
2014-10-04 20:31:37 +02:00
TfT_02
864a760e9c Better like this 2014-10-04 14:16:38 +02:00
TfT_02
0838cbb874 Add option to not show ability names on scoreboard
Adds #2249
2014-10-04 14:05:30 +02:00
TfT_02
4844be80da Fixed bug with Salvage and ability tools
Fixes #2311
2014-10-04 01:36:57 +02:00
TfT-02
62a767db89 Add enable toggle and per skill thresholds 2014-09-28 11:43:17 +02:00
TfT_02
ce3463ad6d Cleanup 2014-09-28 11:34:50 +02:00
TfT_02
5d059d8537 Move SkillXpGain to datatypes/experience 2014-09-28 11:34:49 +02:00
riking
332860b9ce Use a DelayQueue to manage rolling diminished returns 2014-09-28 11:34:49 +02:00
TfT_02
2a443cd9db Diminished instead of Deminished 2014-09-28 11:34:49 +02:00
NuclearW
f4d1004d32 Rolling xp diminishing returns
This adds on top of the diminishing returns system a mechanic such that gains will expire the configured number of minutes after they occured, rather than all being reset at once.

This prevents someone from not getting diminishing returns on the xp gain they recieved just before the reset would have occured.

Obligatory explanatory graphs: http://i.imgur.com/uSzicIR.png
2014-09-28 11:34:49 +02:00
TfT_02
9d8aec7eca Add diminished returns when a player has earned too much XP
When a player reaches a certain (configurable) threshold value of total
XP earned in a specific skill, his earned XP in this skill will be
decreased.

Depending on how far the player has exceeded the threshold value, his
XP will decrease more. After the (configurable) time interval of 10
minutes, the registered data will be cleared and the player can earn XP
as normal again.
2014-09-28 11:34:49 +02:00
Ivo Julca
958c116fd0 Acrobatics: cap same-location fall counter for XP gain
It used to increase boundlessly, thus preventing players from gaining XP for a while even after moving to another place.
2014-09-28 11:19:41 +02:00
Bestle
ec1a125809 These are the wrong way round
The UUID's are the keys, not the names
2014-09-28 11:13:23 +02:00
TfT_02
2dd8e719c8 UUID support for parties 2014-09-28 11:13:23 +02:00
TfT_02
d62c68a490 Fixes build 2014-09-28 11:08:57 +02:00
TfT_02
3c6dd290f4 Allow AdvancedSalvage unlock level 0
Fixes #2265
2014-09-06 20:23:41 +02:00
TfT_02
07e589aae3 Allow equal rank levels for Salvage
Fixes #2270
2014-09-06 19:59:26 +02:00
t00thpick1
1119d3c17f Actually fix flatfile player loading....
you lied to me @tft_02
2014-09-03 00:05:48 -04:00
TfT_02
eac5d1ee7a Improve auto mod config generator 2014-08-31 19:10:49 +02:00
TfT_02
56cb5c092f Should be this 2014-08-26 21:55:35 +02:00
Shevchik
9d7faf9ed9 Fix database loading data for wrong player
Fixes #2223
2014-08-24 15:25:56 -07:00
TfT_02
7da661546f Fixed bug where processing message would always get displayed
and the player could never execute /mctop or /mcrank if chat display
was disabled.
2014-08-24 09:21:40 -07:00
TfT_02
48d3280e5e Make sure that player has McMMOPlayer object before calling API 2014-08-22 15:50:40 -07:00
TfT_02
b61c65636b Add new ExperienceAPI method to specify if XP can be shared 2014-08-22 15:50:40 -07:00
TfT_02
087a0b079f Fixed bug with new Death API 2014-08-22 15:50:40 -07:00
t00thpick1
2147417322 This seems easier. 2014-08-22 15:16:40 -04:00
t00thpick1
4304970059 This was supposed to be a zero. 2014-08-22 00:59:20 -04:00
t00thpick1
fc981fda20 Better connection validation for us. 2014-08-21 19:42:03 -04:00
t00thpick1
be9ff51fd9 Should fix #2223 for realz this time. 2014-08-21 19:42:03 -04:00
TfT_02
adde56114e Cleanup the changelog 2014-08-21 16:40:06 -06:00
TfT_02
5cfd2dc799 Added API to ExperienceAPI to get the amount of XP needed for a level 2014-08-21 16:38:33 -06:00
TfT_02
c878775c72 Close the statement here as well 2014-08-21 14:33:50 -06:00
t00thpick1
574cdd374b Use a placeholder value. Fixes #2216 #2221 2014-08-20 22:19:36 -04:00
TfT_02
a3943aab24 Add checks for loaded/unloaded profiles in commands 2014-08-19 22:23:19 -06:00
t00thpick1
1503e58d11 More relevant donation information 2014-08-19 23:45:54 -04:00
TfT_02
2650d57d8e Added options to experience.yml for Dirt and Sand variations
Adds #2194
2014-08-19 21:28:53 -06:00
t00thpick1
4d402c7229 Use correct element 2014-08-19 19:11:07 -04:00
t00thpick1
d687543910 Prevent players from having more than one database querying command running at once. 2014-08-19 18:11:56 -04:00
t00thpick1
d8ad519cd0 Seperate pools for essential tasks like profile loading and profile saving. 2014-08-19 17:58:45 -04:00
TfT_02
a23d093271 Use provided instead of compile 2014-08-18 17:19:14 -06:00
TfT_02
8a35d69540 Move RefreshChunks setting from hidden.yml to config.yml
Adds #2213
2014-08-17 20:21:23 -06:00
t00thpick1
097a5a0894 Change purge a bit. Apparently andrewkm says this works. 2014-08-17 21:23:27 -04:00
t00thpick1
8760c2bbb0 This way is cleaner though. 2014-08-17 20:01:04 -04:00
t00thpick1
dc635fe7d7 SHould fix #2195 2014-08-17 19:57:52 -04:00
TfT_02
f10a1d0ffb Added McMMOPlayerPreDeathPenaltyEvent and McMMOPlayerStatLossEvent
McMMOPlayerPreDeathPenaltyEvent is fired before hardcore calculations
take place, use this if you want to cancel hardcore penalties.

Use McMMOPlayerVampirismEvent and McMMOPlayerStatLossEvent when you
want to know how many levels or experience the player lost or if you
want to modify this.
2014-08-16 21:13:46 -06:00
TfT_02
809779e508 Added McMMOPlayerVampirismEvent
Expands API possibilities regarding death penalty features.
2014-08-16 21:13:39 -06:00
TfT_02
80d358d1fd Fix dealing too much AOE damage
Bandaid for #2170
2014-08-13 21:24:32 -06:00
t00thpick1
a1be17c72c Add a rate limit for mojang api requests. Configurable via hidden.yml 2014-08-12 11:51:34 -04:00
t00thpick1
0a066f51bb Fix #2197 There is no wait forever option, so we actually need a timeout. 2014-08-12 11:39:43 -04:00
t00thpick1
294141c353 We should be reconnecting automagically. 2014-08-11 12:16:27 -04:00
t00thpick1
5a47f9fa86 Fix #1320 2014-08-08 00:42:33 -04:00
t00thpick1
6ee2d7d823 Do UUID saves in batches. 2014-08-08 00:13:30 -04:00
t00thpick1
f2881f02c8 Fix id retrieval 2014-08-08 00:09:00 -04:00
t00thpick1
9f5445689c Helpful debug on shutdown 2014-08-08 00:02:07 -04:00
t00thpick1
0ea163e3ee Lazy fix 2014-08-08 00:01:57 -04:00
t00thpick1
f097aa4a67 Missed loaded profile check, Fix #2189 2014-08-07 23:46:22 -04:00
t00thpick1
1fcb9e649e A bit more logic simplification in SQLDatabaseManager, also fixes error printing, Fix #2188 2014-08-07 23:45:40 -04:00
t00thpick1
1d0dc02013 Greatly simplify Profile loading in mySQL 2014-08-07 14:16:28 -04:00
t00thpick1
8766d31943 Fix #2182 and Fix #2178
NOW() is a numeric representation of the date, not a timestamp....  so thats a nono.

Also,  we need to update UUIDs grabbing by name.
2014-08-07 13:54:28 -04:00
t00thpick1
d857bf483e Fix #2184 2014-08-07 11:23:02 -04:00
t00thpick1
b7774251eb Remove need for thread locks in profile loading, just reschedule as needed. also stagger based on number of previous attempts. 2014-08-05 23:02:41 -04:00
t00thpick1
da7507fc75 Throw some sanity information into the info log. 2014-08-05 20:20:05 -04:00
t00thpick1
fe4699430d Fix #2177 2014-08-05 19:15:22 -04:00
t00thpick1
df4fc8149d Stagger load attempts more. 2014-08-05 19:03:55 -04:00
t00thpick1
c156f0c346 Missed an unlock condition, lets use a finally. Should Fix #2180 2014-08-05 18:57:13 -04:00
t00thpick1
79a17b0c1c Fix /mcrank when using flatfile. Fixes #2179 2014-08-05 09:20:12 -04:00
t00thpick1
d3051ad127 Use a slight delay to ensure its after the purge. 2014-08-04 11:49:09 -04:00
t00thpick1
f4c53aaf8a Prevent user purges and UUID updates from conflicting in mass database operations. 2014-08-04 11:42:02 -04:00
t00thpick1
432ff95a98 More constants 2014-08-04 11:40:47 -04:00
t00thpick1
fe29bb4b9f Accurate purge count 2014-08-03 21:14:24 -04:00
t00thpick1
ae5347bc0f Purging shouldn't be main thread, also we have no reason to refresh profiles of purged users, as old users aren't online, and powerless users have nothing to wipe. 2014-08-03 21:12:41 -04:00
t00thpick1
966de87ef9 Print reason 2014-08-03 20:57:28 -04:00
t00thpick1
3569f9a182 Woot, rushing things without looking! 2014-08-03 20:40:48 -04:00
t00thpick1
70a23f8a0a EnumMaps cannot use a null key 2014-08-03 20:39:37 -04:00
t00thpick1
857e12b96e SQLDatabaseManager optimizations, async profile loading -t00thpick1, zreed
This commit changes our shared connection into a connection pool utility to prevent
thread locks from multiple actions attempting to access the database at the same time.
In additon,  profile loading has been moved off the main thread at login time, to
allieviate the performance issues caused by it.

Fixes #2138, Fixes #2119, Fixes #1982, Fixes #1953
2014-08-01 20:31:17 +02:00
TfT_02
c10525ada9 Add UUID support! - zreed, slipcor, t00thpick1
This commit updates our database managers to use UUIDs instead
of usernames for persistent storage.

Fixes #1979
2014-08-01 20:23:03 +02:00
TfT_02
fb8592495d Only set detected durability if it's > 0 2014-08-01 01:09:00 +02:00
TfT_02
a48ada306c Add magical mod importer
Usage: Create a folder called 'import' inside /mcMMO/mods/. Place your latest Cauldron 1.7+ startup log in this folder and rename it to 'import.log'.
It is worth noting that it's advisable to create a short log by starting and stopping the server once, or by manually editing the log file to only include material mapping in order to speed up the import process.

When the server is running, use the command /mcimport. You will see the import progress in the console, once it is done the files are created in /mcMMO/mods/output/.

Any item that wasn't recognised gets placed in a .unknown.yml config file. Durability detection only works if the mod is installed when importing (it should be).
2014-08-01 00:22:29 +02:00
Lucas Savva
8db0d663dc More configs for 1.6.X mods
+ Added full tools and armor and some block configs for:
- Advanced Genetics
- Applied Energistcs
- Big Reactors
- Biomes O Plenty
- Emasher Resource
- Extra Utilities
- Factorization
- Forestry
- MineFactory Reloaded
- Natura
- Project Red
- Railcraft
- StargateTech 2
- Thermal Expansion
- Tinker's Construct
- Twilight Forest
2014-07-31 16:56:41 +01:00
TfT_02
70744371a3 Fix bug where Repair_Material_Quantity wasn't read 2014-07-31 00:47:22 +02:00
TfT_02
18c322e8d6 Check if the user wants this item repairable first
Stop complaining that the item is not repairable when Repairable is set
to false.
2014-07-31 00:46:41 +02:00
TfT_02
75cbfa1b1c Ensure player has mcMMOPlayer object in brewing
Fixes #2086
2014-07-24 12:29:42 +02:00
zreed
48c7aa3e84 Add an UpgradeManager 2014-07-23 12:37:02 +02:00
TfT_02
87bce65098 Update twilightforest.blocks.yml 2014-07-20 19:44:13 +02:00
TfT_02
c288dc433b Add Twilightforest mod configs, made by joulesbeef 2014-07-20 17:17:02 +02:00
TfT_02
0cc29d070f Move 1.6.x mod config to their own folder
and add a folder for 1.7.x mod config files
2014-07-20 16:11:41 +02:00
TfT_02
8fd94b625c Fix Blast Mining and change its behavior slightly
Fixed bug where Blast Minings ability "Demolition Expert" would not
work with certain CB versions. DanageCause.BLOCK_EXPLOSION was not
passed, ENTITY_EXPLOSION was used instead.

Changed behavior of the Blast Mining ability "Demolition Expert"; now
only decreases damage for the ability user and for Blast Mining
explosions.
2014-07-20 00:43:53 +02:00
TfT_02
ccca3fff26 Don't use hardcoded unlock levels for Blast Mining 2014-07-20 00:43:52 +02:00
TfT_02
f77446919f Can't use more function modifiers than necessary
Fixes #2139
2014-07-18 17:11:26 +02:00
TfT_02
96fdf265d5 Don't run party chat on a separate thread
Fixes #2080
2014-07-18 17:06:30 +02:00
TfT_02
b964e3f7c3 Show colors in console for party chat
Fixes #2129
2014-07-18 00:51:09 +02:00
TfT_02
d93c83f775 Add a modifier function for each DamageModifier
Must have a modifier function for each DamageModifier

Fixes #2139
2014-07-18 00:16:12 +02:00
TfT_02
6b9f6c29ec Actually fix the isWaterBottle() check
Fixes #2134

For some reason Bukkit wanted to use Potion(PotionType type, int level)
when calling .toPotion(), even though .getDataValue() is 0.
2014-07-17 00:14:06 +02:00
TfT_02
09b0bf62e2 Added SkillAPI used to get a list of skill names
This prevents having to rely on the SkillType enum
2014-07-16 20:07:23 +02:00
TfT_02
15d7d3f8a2 Add Snow to Excavation guide 2014-07-16 11:47:28 +02:00
TfT_02
dedbdf890a Fixed broken isWaterBottle() check 2014-07-15 17:50:39 +02:00
TfT_02
30085e1e34 Add option to control Unarmed item pickup behavior
By default when using Unarmed, picking up items is prevented when a
players entire inventory is full, except for his empty hand.
2014-07-15 15:40:49 +02:00
TfT_02
1c30146491 Fixed bug where Berserk deletes items
when the players inventory is full.

Fixes #1947
2014-07-15 15:25:02 +02:00
TfT_02
037022b175 Fixed bug where falling blocks were not tracked
Fixes #2130
2014-07-15 14:46:20 +02:00
TfT_02
0aa67727f5 Fixed bug with flatfile format updater 2014-07-12 14:02:53 +02:00
TfT_02
8e3e1d5f11 Use deprecated events for damage dealing for now 2014-07-11 21:33:35 +02:00
TfT_02
d2d70089ca Update for modifierFunctions 2014-07-11 14:02:42 +02:00
zreed
94a566acc9 Remove redundant maxReconnects database connection property 2014-07-09 19:03:15 +02:00
TfT_02
daab095557 I was actually using the wrong Map
Fixes #2113
2014-07-03 12:33:03 +02:00
TfT_02
2b9b5df1ee Alter original event and stop firing FakeDamageEvents
Fixes #2105
2014-07-02 11:28:21 +02:00
TfT_02
e7e62b8d40 SecondaryAbilityEvent now implements Cancellable
Fire SecondaryAbilityEvent for abilities with static chances

Also cleanup some of the event handling for Armor Impact, Greater
Impact and Fast Food
2014-07-02 11:25:13 +02:00
TfT_02
3d242bbdb6 Always call back events 2014-07-02 11:25:13 +02:00
TfT_02
e796eae3c3 Update for new damage API 2014-07-02 11:25:08 +02:00
TfT_02
a257e83a62 Update for new getOnlinePlayers behavior 2014-06-29 14:04:36 +02:00
Kane York
d527584248 A private method cannot be abstract >.> 2014-06-28 23:49:46 -07:00
Kane York
0a4de6e2fc Reword statement in standards.md 2014-06-28 23:48:12 -07:00
TfT_02
4b20f12eff Fix a NPE with getFlowerAndGrassXp()
Fixes #1975
2014-06-23 22:52:34 +02:00
TfT_02
0de1187012 Fixed setting custom names and lore with treasures 2014-06-22 20:42:48 +02:00
TfT_02
8e474170e4 Fix crafting with items received from Salvage
Only set metadata on Salvage items when it’s not set to -1
Fixes #2078

And cleanup some javadocs in Salvageable
2014-06-18 11:44:21 +02:00
TfT_02
2eeb9b1f35 Set a pretty repair material name in armor.yml
Adds #1863
2014-06-15 17:46:16 +02:00
TfT_02
3de6e2c3f1 Add full Repairable support in armor config files
You can now fully configure armor to be repairable from the armor.yml
config files.

Adds Repair_MinimumLevel and Repair_XpMultiplier to armor.yml
2014-06-15 17:46:16 +02:00
TfT_02
98d166808f Finish the tools.yml header 2014-06-15 17:45:52 +02:00
TfT_02
f75e15dfdc Set a pretty repair material name in tools.yml
Adds #1863
2014-06-15 17:31:50 +02:00
TfT_02
f2b892b7d5 Add full Repairable support in tools config files
You can now fully configure a tool to be repairable from the tools.yml
config files.

Adds Repair_MinimumLevel and Repair_XpMultiplier to tools.yml
2014-06-15 17:28:54 +02:00
TfT_02
883ada01f8 Fix typo with XP_Modifier in tools.default.yml 2014-06-15 17:18:49 +02:00
TfT_02
3a8f45a04d Fix bugs with pistons
This commit improves piston tracking and fixes a couple of bugs with
block tracking.

Fixes #2043
2014-06-15 14:26:02 +02:00
TfT_02
906609696b Workaround a CB bug by tracking piston events
There is a bug in Craftbukkit that causes piston events to fire
multiple times. We need to keep track of the extend and retract events
to see which piston events should be processed.
2014-06-15 14:26:02 +02:00
riking
66ccde4310 MCPC+ is now known as Cauldron 2014-06-14 11:34:35 -07:00
TfT_02
4970cdc3f4 Add mcmmo.skills.salvage permission to plugin.yml
Fixes issue where players would have access to the Salvage child skill
by default.

Mentioned in #2075
2014-06-12 13:42:42 +02:00
TfT_02
1becc874ba Check if input is a water bottle first 2014-06-09 22:55:03 +02:00
TfT_02
b107a8dc7c Fire brew event after outputs have changed
and before experience is granted.
Part 2 of fixing #2041
2014-06-09 02:04:59 +02:00
TfT_02
37aebc1716 Calculate Alchemy XP based on potion stage
Adds #1926
2014-06-09 01:56:07 +02:00
TfT_02
836877ff93 Alchemy should fire BrewEvents
Fixes #2041
2014-06-09 01:43:50 +02:00
TfT_02
28a846e0cb Update changelog 2014-06-08 18:23:07 +02:00
TfT_02
0185a30ec9 Fix an IndexOutOfBoundsException: Index: 0
In SaveTimerTask.java

Fixes #2039
2014-06-08 18:21:13 +02:00
TfT_02
38e1947302 Remove PvpLogger checks
No longer needed when testing with Combat Tag v6.1.4, the NPCs have
metadata „NPC”.

Fixes #2017
2014-06-08 18:11:18 +02:00
riking
4fb4d6fc0c Save users asynchronously 2014-06-08 14:12:25 +02:00
TfT_02
6d719988bf Remove this check here, allows Salvage in Adv mode
We’re already checking if the players game mode isn’t CREATIVE, so we
can safely remove this check.

Fixes #2059
2014-06-03 12:23:42 +02:00
TfT_02
b1c1f0e21e Added missing Salvage permissions to plugin.yml 2014-05-25 23:45:20 +02:00
TfT_02
3f34cc7365 Actually fix maximumQuantity reading from config
Now we try to automatically detect the maximum quantity if possible and
fall back to the config if the user has set a value there.

Also fixed the feedback message which said „Minimum quantity” instead
of „Maximum quantity”
2014-05-25 23:20:19 +02:00
TfT_02
3c6c2837bd Check permission before sending anvil messages 2014-05-25 22:46:35 +02:00
TfT_02
4bcef76fd8 Let config key take priority here 2014-05-24 15:42:15 +02:00
TfT_02
2fd5d7aa81 Cleanup RepairConfig leftovers in SalvageConfig
Some copy/pasta I forgot to remove
2014-05-24 15:24:25 +02:00
TfT_02
5080c68dce Fix Maximum Quantity in Salvage configs 2014-05-24 15:23:50 +02:00
TfT_02
3403aef37d Don't display child skills on scoreboards
This fixes an issue where the scoreboard would not display properly
when using /mcstats or /inspect.

Fixes #2037
2014-05-23 17:03:02 +02:00
TfT_02
53a34c12d2 Add SALVAGE to MISC_SKILLS List 2014-05-23 14:23:05 +02:00
TfT_02
59417d6721 Add changelog entry for Salvage child skill
Closes #561
2014-05-19 16:59:28 +02:00
TfT_02
93d63dbca5 Minor cleanup of imports 2014-05-18 17:06:50 +02:00
TfT_02
4643cf1070 A whole bunch of more work to convert Salvage to a child skill 2014-05-18 17:04:39 +02:00
GJ
91bf54019e Convert Salvage to a child skill. 2014-05-18 17:04:38 +02:00
TfT_02
ead716ef0d Fix a NPE when tab completing with /ptp
Fixes #2013
2014-05-11 18:33:50 +02:00
TfT_02
8fec1af257 Fix a bunch of small formatting issues 2014-05-11 15:15:44 +02:00
Sean Porter
99248caba3 Redstone ore now throws events when it flips on or off.
Fixes issue #2021
2014-05-11 01:30:11 -07:00
TfT_02
af64bdf742 Added API to check if an entity is bleeding 2014-05-02 19:41:44 +02:00
TfT_02
66a4925371 Use getAllyName() here instead 2014-05-02 00:53:05 +02:00
TfT_02
8eb6acd60f Add option to prevent hopper transfers of bottles 2014-04-27 15:03:07 +02:00
TfT_02
ce6892f2e6 Update README.md 2014-04-24 16:00:02 +02:00
TfT_02
c14a4e9305 Fix /party teleport command
Why did we use getCommand("ptp").getExecutor() again?

Fixes #1995
2014-04-21 14:54:09 +02:00
TfT_02
5825eb1696 Make sure to shorten long ability and skill names
(cherry picked from commit 236ccd6ebdd0834f87b373794e1597ef36fb2ff6)
2014-04-21 14:09:52 +02:00
TfT_02
bfebbd0095 Fix formatting
(cherry picked from commit 4e36073e6e2dc3aeba087d605cef79fc4a8a9779)
2014-04-21 14:09:41 +02:00
GJ
b204507a82 Use strings instead of OfflinePlayers for scoreboards.
(cherry picked from commit 89b596591ec1974e0201395dc6e76353e4709572)
2014-04-21 14:09:09 +02:00
TfT_02
9f53426511 Added API to XP events to get XP gain reason 2014-04-18 22:32:32 +02:00
Sean Porter
03c2282c3f Fix the calculations for Iron Arm Style in the Unarmed command. 2014-04-18 02:16:35 -07:00
TfT_02
20092d55fd Fix bug where dodge would check the wrong player 2014-04-18 00:49:40 +02:00
TfT_02
69a2a5cfff Check if player has a mcMMOPlayer object
Fixes #1976
2014-04-12 17:06:14 +02:00
TfT_02
618cfad100 Prevent accidentally breaking regrown crops
Adds #828
2014-04-06 14:41:40 +02:00
TfT_02
56e625a9df Added option to open /mcstats after logging in
Added #1033
2014-04-06 13:27:38 +02:00
TfT_02
79a1ef5d3e Players need to be in a party to use /ptp
Fixes #1967
2014-04-06 12:43:42 +02:00
TfT_02
10dd7619bf Support MATERIAL|data format in treasures.yml
Allows users to use the same material type for multiple treasures in
treasures.yml

Fixes #1965
2014-04-05 18:31:01 +02:00
TfT_02
f9dfec5bd0 Check event.getBow() != null
Fixes #1933
2014-04-05 13:55:10 +02:00
TfT_02
a9488bc18b Vanished players no longer get hit by AoE effects
Fixes #1964
2014-04-05 13:12:20 +02:00
TfT_02
f0ee708710 Updater should not be running on the main thread
Fixes #1957
2014-04-05 12:10:02 +02:00
TfT_02
3390a31cc6 Move PlayerUpdateInventoryTask to runnables.player 2014-04-05 11:59:36 +02:00
t00thpick1
0b4b272223 Account for level 0 2014-04-01 14:58:24 -04:00
TfT_02
8d200ea653 Back to active development 2014-03-29 18:28:26 +01:00
TfT_02
eb359c5595 Update pom.xml and changelog.txt for 1.5.00 release 2014-03-29 17:52:08 +01:00
TfT_02
e1b8088c17 Improve holiday manager with 1.7 changes 2014-03-29 17:50:29 +01:00
TfT_02
70a1eea231 Nerf Herbalism XP from Tall Grass 2014-03-29 17:12:55 +01:00
TfT_02
c744974192 Added option to config.yml to override vanilla Minecraft treasures 2014-03-29 17:12:55 +01:00
TfT_02
faa11a87a9 Removed "Treasure found!" message
Because when treasures are found in vanilla Minecraft, there isn’t a
message either
2014-03-29 17:12:55 +01:00
TfT_02
91da5c4ab1 Add option to drop extra fish
Allows enabling of old fishing mechanic where fish was always caught,
even when a treasure was found
2014-03-29 17:12:54 +01:00
GJ
da5e770e06 Add Podzol & Red Sand to Excavation 2014-03-29 17:12:54 +01:00
TfT_02
09557e378b Update to the new ProjectileSource API 2014-03-29 17:12:54 +01:00
TfT_02
72d26fed0f Update version number to 1.5.00 2014-03-29 17:12:54 +01:00
TfT_02
225de799e8 Increase TreasureHunter chances for Luck enchantment
When the player is using a fishing rod with the ”Luck of the Sea”
enchantment, the drop chances will increase with 1% for each level of
the enchantment.
2014-03-29 17:12:36 +01:00
TfT_02
334c44760f Workaround for ClassCastException: MaterialData cannot be cast to Tree 2014-03-29 17:12:36 +01:00
TfT_02
ac7fc1020d Use tree species for Woodcutting double drops in config.yml
Oak is now Generic, and Spruce is now Redwood.
2014-03-29 17:12:36 +01:00
riking
461871327b Include new 1.7 biomes in fishing biome XP boost and Ice Fishing check 2014-03-29 17:12:36 +01:00
GJ
60ddd799de Update mcMMO for Minecraft 1.7.2 2014-03-29 17:12:35 +01:00
GJ
80571fbe8f Remove deprecated permission nodes 2014-03-29 17:12:35 +01:00
TfT_02
d407f85704 Update pom.xml and changelog.txt for 1.4.08 release 2014-03-29 17:06:01 +01:00
TfT_02
458dc7db42 Make database command cooldown configurable 2014-03-29 17:02:08 +01:00
TfT_02
beab794c0e Fixed some issues with the HolidayManager
Was severely lacking more lols
2014-03-29 16:52:41 +01:00
TfT_02
8256f5461c Using an axe is required to earn Woodcutting XP
Not really sure why or when this check had gone missing..
2014-03-26 09:52:59 +01:00
TfT_02
0fe3ad7432 Reworked COTW config options + made COTW item configurable
Adresses #1481 partially
2014-03-23 14:33:57 +01:00
TfT_02
04e5dda127 Actually fix Repair lucky perk with Arcane Forging downgrade chance 2014-03-23 14:33:57 +01:00
TfT_02
f65adea2f9 Added minimum jump strength requirement and config option
for horses summoned with "Call of the Wild"
2014-03-23 13:41:31 +01:00
TfT_02
cdfb0da5c9 Fixed bug where shift right clicking potion ingredients was broken 2014-03-23 12:59:43 +01:00
TfT_02
cfa3d34dff Fix important bug regarding pistons 2014-03-14 15:23:28 +01:00
TfT_02
01b7d4f742 Repair lucky perk should decrease the Arcane Forging downgrade chance,
instead of increasing it.
2014-03-14 15:16:22 +01:00
TfT_02
9a359bf42c We need to use event.getBlock() here
Fix my boo boo from previous commit
2014-03-11 13:33:54 +01:00
TfT_02
ebdf11300b We do need to use a runnable. 2014-03-10 20:51:52 +01:00
TfT_02
e1a8f02bce Make Acrobatics XP prevention cool down, after teleporting configurable
Adds #1906
2014-03-09 15:24:24 +01:00
TfT_02
862d38b587 Clean up all of the imports 2014-03-03 18:27:45 +01:00
GJ
2415767c06 Clean up imports. 2014-03-03 12:22:28 -05:00
GJ
aa59348a94 We only care about blocks that award XP.
Also, this fixes a possible issue where blocks changed by entities other than falling blocks could have been left as tracked even after they were destroyed.
2014-03-03 12:14:01 -05:00
GJ
9c925d3327 We can do this without needing a runnable. 2014-03-03 11:40:36 -05:00
GJ
30f7521a3a Handle healthbars even when skills are disabled. Fixes #1194 2014-03-03 10:29:14 -05:00
GJ
7b3869e385 Use .equals instead of deprecated ID method. 2014-03-03 09:24:24 -05:00
GJ
0e641f7c5b Clean up some of our metadata handling. 2014-03-03 08:48:16 -05:00
GJ
733d16cf35 Don't clone if it's null. Fixes #1894 2014-03-03 08:03:30 -05:00
TfT_02
833bc1b251 Fixed bug where disbanded parties could still see alliance chat 2014-02-28 22:41:47 +01:00
TfT_02
840f3d9382 Fix /party kick command 2014-02-28 22:32:09 +01:00
TfT_02
34d6d867f2 Prevent combat abilities from damaging allied players 2014-02-28 22:08:48 +01:00
TfT_02
e56d5a0454 Exclude vanished players from tab complete list
Part 2 of fixing #1745
2014-02-28 21:56:30 +01:00
TfT_02
53fdf750f4 Pretend like the player is offline when he is vanished
Part 1 of fixing #1745
2014-02-28 21:56:30 +01:00
TfT_02
f096e915cf Changed default amount of XP from mining Quartz Ore
#1886
2014-02-28 19:24:41 +01:00
GJ
ce59488e8e Add FakeEntityTameEvent to match expected behavior for an animal being tamed. 2014-02-28 12:04:00 -05:00
GJ
47db522cc1 Because Bukkit doesn't set this automatically with setTamed. Go figure. Fixes #1888 2014-02-28 11:50:36 -05:00
TfT_02
a2cac82cba Check if player has data key here as well
Fixes #272
2014-02-28 14:45:44 +01:00
GJ
2e74333eb7 Oops. 2014-02-28 08:40:00 -05:00
GJ
0056be2d5f Assorted cleanup. 2014-02-28 08:36:42 -05:00
TfT_02
1d7e034d5e Fix the updater 2014-02-27 22:26:58 +01:00
297 changed files with 18553 additions and 7895 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
/.classpath /.classpath
/.project /.project
/.settings /.settings
/dependency-reduced-pom.xml
# netbeans # netbeans
/nbproject /nbproject

View File

@@ -7,7 +7,134 @@ Key:
! Change ! Change
- Removal - Removal
Version 1.4.08-dev Version 2.0.00
= Fixed an interaction between Tree Feller and Stripped Wood
! Fireworks no longer fire by default for ability activation/deactivation
! Website has been changed and the MOTD string relating to it reflects this
! Discord link added to mcMMO command
! Updated misc strings relating to mcMMO
Version 1.5.05-SNAPSHOT
Version 1.5.04
+ Added option to config.yml to control mcMMO generated sound volume
+ Added option to config.yml to truncate existing player skill levels that exceed the skill level cap
+ Falling blocks persist mcMMO natural data
= Woodcutting double drops correctly identify acacia and dark oak logs
= Skill Reset command now correctly identifies arguments
= Hylian Treasure config options are now actually used
= Child skills now use parent skills configured skill caps properly
= Auto Update config now properly works
! Item dropped from blocks now drop from the center
! Potions Config updated for 1.9
! Flux mining now simulates a block break event for other plugins to act upon
! Zombie Pigmen spawned from nether portals are now considered spawner mobs
! Flux Pickaxe lore now appends to existing lore as opposed to replacing it
! Party chat no longer displays colors when logged in server console
- Treefeller no longer lowers exp for big trees
- No longer supports 1.8 :(
- Removed plugin metrics
Version 1.5.03
= Fixed bug where absorption hearts could be attacked by allied players
= Fixed bug where new forms of stone would drop the wrong type when mined with Silk Touch
= Fixed bug where blocks would not get tracked correctly when using sticky pistons and slime blocks in certain situations
= Fixed bug where config value for Daze damage was ignored
= Fixed UUID updater to not lose data on errors
= Fixed bug where uuid update could result in large amounts of user data being deleted
= Fixed bug where custom potions were missed in potion stage calculation
= Fixed piston dupe bugs permanently
= Fixed bug involving user name changes
= Fixed old user purge to properly calculate months
= Fixed bug where Repair would incorrectly check items
= Fixed bug where apostrophes in locale files would not read correctly
= Fixed bug where treasure data was limited to 255 instead of Short.MAX_VALUE
! Moved more user loading calculations to async loading thread to reduce lag on login
Version 1.5.02
+ Added option to config.yml for Chimaera Wings to stop using bed spawn points
+ Added option to config.yml to let non-tools in hand count as unarmed
+ Added option to experience.yml to control XP gained by killing bred animals
+ Added support for 1.8 mobs and features
= Fixed bug where no Mining XP was granted when Flux Mining was successful
= Fixed bug with UUID conversions in Flatfile
= Fixed a couple Dupe bugs that were introduced recently
= Fixed bug where MobHealthbarTypes were not saved between server restarts
! Changed Flux Mining mechanics. In order to use the ability, you need to infuse a pickaxe with furnace powers first.
! Scoreboard tips are only shown a couple of times to the player, instead of once per login session
! Changed Archery distance multiplier to be configurable
! Archery distance XP bonus cannot exceed indefinitely anymore
Version 1.5.01
+ Added new child skill; Salvage
+ Added UUID support!
+ Added SQL connection pooling and async loading!
+ Added the long awaited Diminished Returns feature
+ 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 option to config.yml for Scoreboards, display "Ability" instead of ability names on the scoreboards
+ Added options to experience.yml for Dirt and Sand variations
+ Added support for `MATERIAL|data` format in treasures.yml
+ Added API to experience events to get XP gain reason
+ Added API to check if an entity is bleeding
+ Added API to ExperienceAPI to get the amount of XP needed for a level
+ Added API class SkillAPI used to get a list of valid skill names
+ Added API events for hardcore features, McMMOPlayerPreDeathPenaltyEvent, McMMOPlayerStatLossEvent and McMMOPlayerVampirismEvent
+ Added API to ExperienceAPI to specify if XP can be shared
+ Added options to tools.yml and armor.yml config files to set a pretty repair material name
+ Added full support for repairables in tools.yml and armor.yml config files
+ Added magical mod config file import command, for Cauldron 1.7+. Check wiki for usage
+ Added particle effects and sounds to "Call of the Wild" (Taming)
+ Added summon length to "Call of the Wild". Summons will now commit suicide after their lifespan expires
+ Added feature which makes tamed wolves attack a target shot by the owner
= Fixed bug where pistons would mess with the block tracking
= Fixed bug where the Updater was running on the main thread.
= Fixed bug when players would use /ptp without being in a party
= Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent
= Fixed bug where dodge would check the wrong player skill level
= Fixed bug which causes /party teleport to stop working
= Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
= Fixed bug where Alchemy would not fire BrewEvents
= Fixed bug with setting custom names and lore in treasures config
= Fixed bug which would cause a NullPointerException with getFlowerAndGrassXp()
= Fixed bug which could cause and SQLException regarding the connection property 'maxReconnects'.
= Fixed bug where falling blocks were incorrectly tracked
= Fixed bug where items would get deleted when in Berserk with a full inventory
= Fixed bug where the console would not correctly show party chat colors
= Fixed bug where party chat was using non thread safe methods
= Fixed bug where Blast Mining unlock levels could be to high in certain occasions
= Fixed bug where Blast Minings ability "Demolition Expert" would not work
= Fixed bug where Repair_Material_Quantity wasn't read in mod config files
! Changed SecondaryAbilityEvent to implement Cancellable and it now gets fired for damage related secondary abilities
! Changed the way mcMMO handles bonus damage, updated for the new damage event API
! Changed player data saving. Save tasks are now asynchronous
! Vanished players no longer get hit by AoE effects
! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
! Changed Alchemy XP distribution. XP is granted based on the stage of the potion.
! Changed behavior of the Blast Mining ability "Demolition Expert"; now only decreases damage for the ability user
! Updated for new getOnlinePlayers() behavior
! Updated for new blocks and entities
! Changed McMMOPlayerDeathPenaltyEvent to get fired after hardcore penalty calculations, use McMMOPlayerPreDeathPenaltyEvent for old behavior
! Moved Refresh_Chunks setting from hidden.yml to config.yml
- 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 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 SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
+ Added the possibility to gain experience when using Fishing "Shake" + Added the possibility to gain experience when using Fishing "Shake"
@@ -21,6 +148,10 @@ Version 1.4.08-dev
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config + 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 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 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 updating (very) old user data.
= Fixed bug with checking maximum durability of mod items. = Fixed bug with checking maximum durability of mod items.
= Fixed exploit involving Call of The Wild. = Fixed exploit involving Call of The Wild.
@@ -37,9 +168,12 @@ Version 1.4.08-dev
= Fixed bug where party chat broke if the display name contained special characters = 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 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 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 the /ptp request expiration time was checked wrongly - preventing players from using the command
= Fixed bug where Hylian Luck was broken = Fixed bug where Hylian Luck was broken
= Fixed bug where Snow would never drop treasures = 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 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 ! Changed appearance of party member list. Gold = party leader, White = online, Gray = offline, Italic = not nearby
! Updated localization files ! Updated localization files
@@ -49,6 +183,8 @@ Version 1.4.08-dev
! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required ! 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 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 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 - Removed /stats alias for /mcstats
Version 1.4.07 Version 1.4.07

View File

@@ -1,8 +1,10 @@
# mcMMO # mcMMO
## The RPG lovers mod ## The RPG lovers mod
### Dev builds ### Builds
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/). Currently, you can obtain our builds via the Spigot resource page: https://www.spigotmc.org/resources/official-mcmmo.63489/
### Brief Description ### Brief Description
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds 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. 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.
@@ -10,31 +12,24 @@ The goal of mcMMO is to take core Minecraft game mechanics and expand them into
## About the Team ## About the Team
mcMMO is currently developed by a team of individuals from all over the world. mcMMO is currently developed by a team of individuals from all over the world.
### Glorious Leader
[![gmcferrin](http://www.gravatar.com/avatar/b64c52daf25d206b27650788b5813b7b.png)] ### Project Lead & Founder
(https://github.com/gmcferrin) [![nossr50](http://www.gravatar.com/avatar/f2ee41eedfd645fb4a3a2c8f6cb1b18c.png)](https://github.com/nossr50)
### Former Lead
[![gmcferrin](http://www.gravatar.com/avatar/b64c52daf25d206b27650788b5813b7b.png)](https://github.com/gmcferrin)
### Developers ### Developers
[![bm01](http://www.gravatar.com/avatar/ec8146f5358177f12e9a252271bbc391.png)] [![bm01](http://www.gravatar.com/avatar/ec8146f5358177f12e9a252271bbc391.png)](https://github.com/bm01)
(https://github.com/bm01) [![Glitchfinder](http://www.gravatar.com/avatar/5aa4cce22f72ae9c002ecec30f061d00.png)](https://github.com/Glitchfinder)
[![Glitchfinder](http://www.gravatar.com/avatar/5aa4cce22f72ae9c002ecec30f061d00.png)] [![NuclearW](http://www.gravatar.com/avatar/90926bdcf1c8a75918df5ea5fa801ce6.png)](https://github.com/NuclearW)
(https://github.com/Glitchfinder) [![shatteredbeam](http://www.gravatar.com/avatar/cad3b5d7d39cf5387afb87f494389610.png)](https://github.com/shatteredbeam)
[![nossr50](http://www.gravatar.com/avatar/f2ee41eedfd645fb4a3a2c8f6cb1b18c.png)] [![TfT_02](http://www.gravatar.com/avatar/b8914f9970e1f6ffd5281ce4770e20a7.png)](https://github.com/TfT-02)
(https://github.com/nossr50) [![t00thpick1](http://www.gravatar.com/avatar/ee23c7794a0c40120c3474287c7bce06.png)](https://github.com/t00thpick1)
[![NuclearW](http://www.gravatar.com/avatar/90926bdcf1c8a75918df5ea5fa801ce6.png)] [![riking](https://1.gravatar.com/avatar/aca9f37e569ac3a63929920035a91ba4.png)](https://github.com/riking)
(https://github.com/NuclearW)
[![shatteredbeam](http://www.gravatar.com/avatar/cad3b5d7d39cf5387afb87f494389610.png)]
(https://github.com/shatteredbeam)
[![TfT_02](http://www.gravatar.com/avatar/b8914f9970e1f6ffd5281ce4770e20a7.png)]
(https://github.com/TfT-02)
[![t00thpick1](http://www.gravatar.com/avatar/ee23c7794a0c40120c3474287c7bce06.png)]
(https://github.com/t00thpick1)
[![riking](https://1.gravatar.com/avatar/aca9f37e569ac3a63929920035a91ba4.png)]
(https://github.com/riking)
### Special thanks ### Special thanks
[![EasyMFnE](https://www.gravatar.com/avatar/99c9a1fa3bbf957791ceac7b45daadb0.png)] [![EasyMFnE](https://www.gravatar.com/avatar/99c9a1fa3bbf957791ceac7b45daadb0.png)](https://github.com/EasyMFnE)
(https://github.com/EasyMFnE)
Added the Alchemy skill Added the Alchemy skill
## Compiling ## Compiling
@@ -44,8 +39,7 @@ mcMMO uses Maven 3 to manage dependencies, packaging, and shading of necessary c
The typical command used to build mcMMO is: `mvn clean package install` The typical command used to build mcMMO is: `mvn clean package install`
Required Libraries: Required Libraries:
* JUnit
* EMetrics
* Bukkit * Bukkit
* JUnit
http://dev.bukkit.org/server-mods/mcmmo for more up to date information. https://www.spigotmc.org/resources/official-mcmmo.63489/ for more up to date information.

View File

@@ -0,0 +1,14 @@
# Config wrote by M1cr0man
# Up to date as of Advanced Genetics 1.4.3
Bows:
# Genetic
X31179:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31197
Repair_Material_Pretty_Name: "Cell"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 1501

View File

@@ -0,0 +1,9 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Applied Energistics rv14-finale3
Mining:
# Certus Quartz Ore
X4076|0:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,65 @@
# Config wrote by M1cr0man
# Up to date as of Applied Energistics rv14-finale3
Axes:
# Quartz
X4365:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X4362
Repair_Material_Pretty_Name: "Certus Quartz"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 3
Durability: 250
Hoes:
# Quartz
X4366:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X4362
Repair_Material_Pretty_Name: "Certus Quartz"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 2
Pickaxes:
# Quartz
X4368:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X4362
Repair_Material_Pretty_Name: "Certus Quartz"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 3
Durability: 250
Shovels:
# Quartz
X4367:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X4362
Repair_Material_Pretty_Name: "Certus Quartz"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 1
Durability: 750
Swords:
# Quartz
X4369:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X4362
Repair_Material_Pretty_Name: "Certus Quartz"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 2
Durability: 250

View File

@@ -0,0 +1,9 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Big Reactors 0.3.4A2
Mining:
# Yellorite
X1750|0:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,77 @@
# Config wrote by M1cr0man
# Up to date as of BoP 1.2.1.434
Boots:
# Wading
X21269:
Repairable: false
Durability: 9999
# Muddy
X21283:
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 26
# Amethyst
X21293:
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 520
Chestplates:
# Muddy
X21281:
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 32
# Amethyst
X21291:
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 640
Helmets:
# Muddy
X21280:
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 22
# Amethyst
X21290:
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 440
Leggings:
# Muddy
X21280:
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 30
# Amethyst
X21290:
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 600

View File

@@ -0,0 +1,44 @@
# Config wrote by M1cr0man
# Incomplete! Only covers ores
# Up to date as of BoP 1.2.1.434
Mining:
# Red Rock
X162|0:
XP_Gain: 30
Double_Drops_Enabled: true
Is_Ore: false
# Amethyst
X1921|0:
XP_Gain: 200
Double_Drops_Enabled: true
Is_Ore: true
# Ruby
X1921|2:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Peridot
X1921|4:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Topaz
X1921|6:
XP_Gain: 200
Double_Drops_Enabled: true
Is_Ore: true
# Tanzanite
X1921|8:
XP_Gain: 200
Double_Drops_Enabled: true
Is_Ore: true
# Malachite
X1921|10:
XP_Gain: 200
Double_Drops_Enabled: true
Is_Ore: true
# Sapphire
X1921|12:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,121 @@
# Config wrote by M1cr0man
# Up to date as of BoP 1.2.1.434
Axes:
# Amethyst
X21287:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 2013
# Muddy
X21277:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 32
Hoes:
# Amethyst
X21288:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 2013
# Muddy
X21278:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 32
Pickaxes:
# Amethyst
X21286:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 2013
# Muddy
X21276:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 32
Shovels:
# Amethyst
X21285:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 1
Durability: 2013
# Muddy
X21275:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 1
Durability: 32
Swords:
# Amethyst
X21284:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X21264
Repair_Material_Pretty_Name: "Amethyst"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 2013
# Muddy
X21274:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X21263
Repair_Material_Pretty_Name: "Mud Ball"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 32

View File

@@ -0,0 +1,31 @@
# Config wrote by M1cr0man
# Up to date as of Emasher Resource 1.2.3.5
Boots:
# Hemp
X9301:
Repairable: true
Repair_Material: X9291
Repair_Material_Pretty_Name: "Hemp"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 65
Chestplates:
# Hemp
X9299:
Repairable: true
Repair_Material: X9291
Repair_Material_Pretty_Name: "Hemp"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 80
Leggings:
# Hemp
X9300:
Repairable: true
Repair_Material: X9291
Repair_Material_Pretty_Name: "Hemp"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 75

View File

@@ -0,0 +1,44 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Emasher Resource 1.2.3.5
Mining:
# Bauxite
X1565|0:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: true
# Cassiterite
X1565|1:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Emery
X1565|2:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Galena
X1565|3:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true
# Native Copper
X1565|4:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Petlandite
X1565|5:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true
# Ruby
X1565|6:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Sapphire
X1565|7:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,54 @@
# Config wrote by M1cr0man
# Up to date as of Extra Utilities 1.0.3c
Axes:
# Healing
X10264:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X10258
Repair_Material_Pretty_Name: "Unstable Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 1561
Hoes:
# Reversing
X10265:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: true
Repair_Material: X10258
Repair_Material_Pretty_Name: "Unstable Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 1561
Pickaxes:
# Destruction
X10263:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: false
Durability: 6244
Shovels:
# Erosion
X10262:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: false
Durability: 6244
Swords:
# Etheric
X10261:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 4
Repairable: false
Durability: 1561

View File

@@ -0,0 +1,9 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Factorization 0.8.34
Mining:
# Dark Iron Ore
X1004|0:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,19 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Forestry 2.3.1.1
Mining:
# Apatite
X1398|0:
XP_Gain: 100
Double_Drops_Enabled: true
Is_Ore: true
# Copper
X1398|1:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Tin
X1398|2:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,27 @@
# Config wrote by M1cr0man
# Up to date as of Forestry 2.3.1.1
Pickaxes:
# Survivalist
X13261:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X5261
Repair_Material_Pretty_Name: "Bronze Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 200
Shovels:
# Survivalist
X13264:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X5261
Repair_Material_Pretty_Name: "Bronze Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 200

View File

@@ -0,0 +1,11 @@
# Config wrote by M1cr0man
# Up to date as of Minefactory Reloaded 2.7.9 Final
Boots:
# Plastic
X12306:
Repairable: true
Repair_Material: X12249
Repair_Material_Pretty_Name: "Plastic Sheets"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 39

View File

@@ -0,0 +1,41 @@
# Config wrote by M1cr0man
# Up to date as of Natura 2.1.14
Boots:
# Impskin
X12712:
Repairable: true
Repair_Material: X12660
Repair_Material_Pretty_Name: "Imp Leather"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 4
Durability: 429
Chestplates:
# Impskin
X12710:
Repairable: true
Repair_Material: X12660
Repair_Material_Pretty_Name: "Imp Leather"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 8
Durability: 528
Helmets:
# Impskin
X12709:
Repairable: true
Repair_Material: X12660
Repair_Material_Pretty_Name: "Imp Leather"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 5
Durability: 363
Leggings:
# Impskin
X12709:
Repairable: true
Repair_Material: X12660
Repair_Material_Pretty_Name: "Imp Leather"
Repair_Material_Data_Value: 6
Repair_Material_Quantity: 7
Durability: 495

View File

@@ -0,0 +1,272 @@
# Config wrote by M1cr0man
# Up to date as of Natura 2.1.14
Axes:
# Bloodwood
X12685:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Bloodwood Planks"
Repair_Material_Data_Value: 4
Repair_Material_Quantity: 3
Durability: 350
# Darkwood
X12689:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Darkwood Planks"
Repair_Material_Data_Value: 11
Repair_Material_Quantity: 3
Durability: 131
# Fusewood
X12693:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Fusewood Planks"
Repair_Material_Data_Value: 12
Repair_Material_Quantity: 3
Durability: 250
# Ghostwood
X12681:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Ghostwood Planks"
Repair_Material_Data_Value: 2
Repair_Material_Quantity: 3
Durability: 59
# Quartz
X12697:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: QUARTZ_BLOCK
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 131
Bows:
# Bloodwood
X12706:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X12677
Repair_Material_Pretty_Name: "Bloodwood Stick"
Repair_Material_Data_Value: 4
Repair_Material_Quantity: 3
Durability: 1501
# Darkwood
X12707:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X12677
Repair_Material_Pretty_Name: "Darkwood Stick"
Repair_Material_Data_Value: 11
Repair_Material_Quantity: 3
Durability: 162
# Fusewood
X12708:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X12677
Repair_Material_Pretty_Name: "Fusewood Stick"
Repair_Material_Data_Value: 12
Repair_Material_Quantity: 3
Durability: 28
# Ghostwood
X12705:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X12677
Repair_Material_Pretty_Name: "Ghostwood Stick"
Repair_Material_Data_Value: 2
Repair_Material_Quantity: 3
Durability: 384
Pickaxes:
# Bloodwood
X12683:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Bloodwood Planks"
Repair_Material_Data_Value: 4
Repair_Material_Quantity: 3
Durability: 350
# Darkwood
X12687:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Darkwood Planks"
Repair_Material_Data_Value: 11
Repair_Material_Quantity: 3
Durability: 131
# Fusewood
X12691:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Fusewood Planks"
Repair_Material_Data_Value: 12
Repair_Material_Quantity: 3
Durability: 250
# Ghostwood
X12679:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Ghostwood Planks"
Repair_Material_Data_Value: 2
Repair_Material_Quantity: 3
Durability: 59
# Quartz
X12695:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: QUARTZ_BLOCK
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 3
Durability: 131
Shovels:
# Bloodwood
X12684:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Bloodwood Planks"
Repair_Material_Data_Value: 4
Repair_Material_Quantity: 1
Durability: 350
# Darkwood
X12688:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Darkwood Planks"
Repair_Material_Data_Value: 11
Repair_Material_Quantity: 1
Durability: 131
# Fusewood
X12692:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Fusewood Planks"
Repair_Material_Data_Value: 12
Repair_Material_Quantity: 1
Durability: 250
# Ghostwood
X12680:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Ghostwood Planks"
Repair_Material_Data_Value: 2
Repair_Material_Quantity: 1
Durability: 59
# Quartz
X12696:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: QUARTZ_BLOCK
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 1
Durability: 131
Swords:
# Bloodwood
X12682:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Bloodwood Planks"
Repair_Material_Data_Value: 4
Repair_Material_Quantity: 2
Durability: 350
# Darkwood
X12686:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Darkwood Planks"
Repair_Material_Data_Value: 11
Repair_Material_Quantity: 2
Durability: 131
# Fusewood
X12690:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Fusewood Planks"
Repair_Material_Data_Value: 12
Repair_Material_Quantity: 2
Durability: 250
# Ghostwood
X12678:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: X3262
Repair_Material_Pretty_Name: "Ghostwood Planks"
Repair_Material_Data_Value: 2
Repair_Material_Quantity: 2
Durability: 59
# Quartz
X12694:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: true
Repair_Material: QUARTZ_BLOCK
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131

View File

@@ -0,0 +1,29 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Project Red 4.3.5.30
Mining:
# Ruby
X2130|0:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Sapphire
X2130|1:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Peridot
X2130|2:
XP_Gain: 350
Double_Drops_Enabled: true
Is_Ore: true
# Marble
X2131|0:
XP_Gain: 30
Double_Drops_Enabled: true
Is_Ore: false
# Basalt
X2131|3:
XP_Gain: 30
Double_Drops_Enabled: true
Is_Ore: false

View File

@@ -0,0 +1,176 @@
# Config wrote by M1cr0man
# Up to date as of Project Red 4.3.5.30
Axes:
# Ruby
X9353:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Ruby"
Repair_Material_Data_Value: 37
Repair_Material_Quantity: 3
Durability: 500
# Sapphire
X9354:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Sapphire"
Repair_Material_Data_Value: 38
Repair_Material_Quantity: 3
Durability: 500
# Peridot
X9355:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Peridot"
Repair_Material_Data_Value: 39
Repair_Material_Quantity: 3
Durability: 500
Hoes:
# Ruby
X9356:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Ruby"
Repair_Material_Data_Value: 37
Repair_Material_Quantity: 2
Durability: 500
# Sapphire
X9357:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Sapphire"
Repair_Material_Data_Value: 38
Repair_Material_Quantity: 2
Durability: 500
# Peridot
X9358:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Peridot"
Repair_Material_Data_Value: 39
Repair_Material_Quantity: 2
Durability: 500
Pickaxes:
# Ruby
X9359:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Ruby"
Repair_Material_Data_Value: 37
Repair_Material_Quantity: 3
Durability: 500
# Sapphire
X9360:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Sapphire"
Repair_Material_Data_Value: 38
Repair_Material_Quantity: 3
Durability: 500
# Peridot
X9361:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Peridot"
Repair_Material_Data_Value: 39
Repair_Material_Quantity: 3
Durability: 500
Shovels:
# Ruby
X9362:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Ruby"
Repair_Material_Data_Value: 37
Repair_Material_Quantity: 1
Durability: 500
# Sapphire
X9363:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Sapphire"
Repair_Material_Data_Value: 38
Repair_Material_Quantity: 1
Durability: 500
# Peridot
X9364:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Peridot"
Repair_Material_Data_Value: 39
Repair_Material_Quantity: 1
Durability: 500
Swords:
# Ruby
X9365:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Ruby"
Repair_Material_Data_Value: 37
Repair_Material_Quantity: 2
Durability: 500
# Sapphire
X9366:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Sapphire"
Repair_Material_Data_Value: 38
Repair_Material_Quantity: 2
Durability: 500
# Peridot
X9368:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X9281
Repair_Material_Pretty_Name: "Peridot"
Repair_Material_Data_Value: 39
Repair_Material_Quantity: 2
Durability: 500

View File

@@ -0,0 +1,49 @@
# Config wrote by Dragyn, updated by M1cr0man
# Up to date as of Railcraft 8.4.0.0
Boots:
# Steel
X7758:
Repairable: true
Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 325
Chestplates:
# Steel
X7761:
Repairable: true
Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 400
Helmets:
# Steel
X7759:
Repairable: true
Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 275
Leggings:
# Steel
X7760:
Repairable: true
Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 375
# Overalls
X7757:
Repairable: true
Repair_Material: WOOL
Repair_Material_Pretty_Name: "Light Blue Wool"
Repair_Material_Data_Value: 3
Repair_Material_Quantity: 7
Durability: 75

View File

@@ -1,76 +1,66 @@
# Config created by Dragyn # Config wrote by Dragyn, updated by M1cr0man
# Created For Railcraft_1.6.2-8.1.0.0 # Up to date as of Railcraft 8.4.0.0
#
#
# Settings for Axes
###
Axes: Axes:
# Steel # Steel
X7819: X7819:
XP_Modifer: 1.0 XP_Modifier: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X7796 Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
#
# Settings for Hoes
###
Hoes: Hoes:
# Steel # Steel
X7820: X7820:
XP_Modifer: 1.0 XP_Modifier: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X7796 Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
#
# Settings for Pickaxes
###
Pickaxes: Pickaxes:
# Steel # Steel
X7821: X7821:
XP_Modifer: 1.0 XP_Modifier: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X7796 Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
#
# Settings for Shovels
###
Shovels: Shovels:
# Steel # Steel
X7823: X7823:
XP_Modifer: 1.0 XP_Modifier: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X7796 Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
#
# Settings for Swords
###
Swords: Swords:
# Steel # Steel
X7824: X7824:
XP_Modifer: 1.0 XP_Modifier: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X7796 Repair_Material: X7796
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500

View File

@@ -0,0 +1,9 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Stargate Tech 2 Alpha 0.7.3
Mining:
# Naquadah Ore
X1005|0:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,41 @@
# Config wrote by M1cr0man
# Up to date as of Thermal Expansion 3.0.0.7
Boots:
# Invar
X31973:
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 4
Durability: 325
Chestplates:
# Invar
X31975:
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 8
Durability: 400
Helmets:
# Invar
X31976:
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 5
Durability: 275
Leggings:
# Invar
X31976:
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 7
Durability: 375

View File

@@ -0,0 +1,29 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Thermal Expansion 3.0.0.7
Mining:
# Copper
X4064|0:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Tin
X4064|1:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Silver
X4064|2:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true
# Lead
X4064|3:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true
# Ferrous
X4064|4:
XP_Gain: 300
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,66 @@
# Config wrote by M1cr0man
# Up to date as of Thermal Expansion 3.0.0.7
Axes:
# Invar
X31969:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 3
Durability: 450
Hoes:
# Invar
X31968:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 2
Durability: 450
Pickaxes:
# Invar
X31970:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 3
Durability: 450
Shovels:
# Invar
X31971:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 1
Durability: 450
Swords:
# Invar
X31972:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 3
Repairable: true
Repair_Material: X31978
Repair_Material_Pretty_Name: "Invar Ingot"
Repair_Material_Data_Value: 71
Repair_Material_Quantity: 2
Durability: 450

View File

@@ -0,0 +1,74 @@
# Config wrote by M1cr0man
# Up to date as of Tinker's Construct 1.5.5.7
# Also covers Tinker's Steelworks 0.0.4.2-fix2
Boots:
# Wooden (Repaired with Oak Wood)
X14366:
Repairable: true
Repair_Material: LOG
Repair_Material_Pretty_Name: "Oak Wood"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 26
# Steel
X14771:
Repairable: true
Repair_Material: X14276
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 16
Repair_Material_Quantity: 4
Durability: 325
Chestplates:
# Wooden (Repaired with Oak Wood)
X14364:
Repairable: true
Repair_Material: LOG
Repair_Material_Pretty_Name: "Oak Wood"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 32
# Steel
X14769:
Repairable: true
Repair_Material: X14276
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 16
Repair_Material_Quantity: 8
Durability: 400
Helmets:
# Wooden (Repaired with Oak Wood)
X14362:
Repairable: true
Repair_Material: LOG
Repair_Material_Pretty_Name: "Oak Wood"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 22
# Steel
X14768:
Repairable: true
Repair_Material: X14276
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 16
Repair_Material_Quantity: 5
Durability: 275
Leggings:
# Wooden (Repaired with Oak Wood)
X14362:
Repairable: true
Repair_Material: LOG
Repair_Material_Pretty_Name: "Oak Wood"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 30
# Steel
X14768:
Repairable: true
Repair_Material: X14276
Repair_Material_Pretty_Name: "Steel Ingot"
Repair_Material_Data_Value: 16
Repair_Material_Quantity: 7
Durability: 375

View File

@@ -0,0 +1,55 @@
# Config wrote by M1cr0man
# Possibly incomplete. Only covers ores
# Up to date as of Tinker's Construct 1.5.5.7
Excavation:
# Iron
X1488|0:
XP_Gain: 250
Double_Drops_Enabled: true
# Gold
X1488|1:
XP_Gain: 350
Double_Drops_Enabled: true
# Copper
X1488|2:
XP_Gain: 175
Double_Drops_Enabled: true
# Tin
X1488|3:
XP_Gain: 175
Double_Drops_Enabled: true
# Aluminum
X1488|4:
XP_Gain: 250
Double_Drops_Enabled: true
# Cobalt
X1488|5:
XP_Gain: 500
Double_Drops_Enabled: true
Mining:
# Cobalt
X1475|1:
XP_Gain: 500
Double_Drops_Enabled: true
Is_Ore: true
# Ardite
X1475|2:
XP_Gain: 500
Double_Drops_Enabled: true
Is_Ore: true
# Copper
X1475|3:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Tin
X1475|4:
XP_Gain: 175
Double_Drops_Enabled: true
Is_Ore: true
# Aluminium
X1475|5:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: true

View File

@@ -0,0 +1,149 @@
# Config wrote by M1cr0man
# Abilites for Pickaxes and Shovels disabled due to a bug
# Repair disabled as mcMMO does not support NBTTag - based tools
# Up to date as of Tinker's Construct 1.5.5.7
# Also covers Tinker's Steelworks 0.0.4.2-fix2
Axes:
# Hatchets
X14309:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Mattocks
X14316:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Lumber Axes
X14317:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Battle Axes
X14327:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
Bows:
# Shortbows
X14319:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
Hoes:
# Mattocks
X14316:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Scythes
X14323:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
Pickaxes:
# Pickaxes
X14307:
XP_Modifier: 1.0
Ability_Enabled: false
Tier: 2
Repairable: false
Durability: 500
# Hammers
X14326:
XP_Modifier: 1.0
Ability_Enabled: false
Tier: 2
Repairable: false
Durability: 500
Shovels:
# Shovels
X14308:
XP_Modifier: 1.0
Ability_Enabled: false
Tier: 2
Repairable: false
Durability: 500
# Mattocks
X14316:
XP_Modifier: 1.0
Ability_Enabled: false
Tier: 2
Repairable: false
Durability: 500
# Excavators
X14325:
XP_Modifier: 1.0
Ability_Enabled: false
Tier: 2
Repairable: false
Durability: 500
Swords:
# Broadswords
X14311:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Longswords
X14312:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Rapiers
X14313:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Daggers
X14321:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Cleavers
X14324:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Battle Axes
X14327:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500
# Cutlasses
X14328:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 2
Repairable: false
Durability: 500

View File

@@ -0,0 +1,161 @@
# Config wrote by Dragyn, updated by M1cr0man
# Up to date as of Twilight Forest 1.20.5
Boots:
# Ironwood
X27978:
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 260
# Fiery
X27995:
Repairable: true
Repair_Material: X27991
Repair_Material_Pretty_Name: "Fiery Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 325
# Stealeaf
X28002:
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 260
# Knightmetal
X28037:
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 4
Durability: 260
Chestplates:
# Ironwood
X27976:
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 320
# Naga Scale
X27958:
Repairable: true
Repair_Material: X27957
Repair_Material_Pretty_Name: "Naga Scale"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 336
# Fiery
X27993:
Repairable: true
Repair_Material: X27991
Repair_Material_Pretty_Name: "Fiery Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 400
# Stealeaf
X28000:
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 320
# Knightmetal
X28035:
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 8
Durability: 320
# Phantom
X28035:
Repairable: false
Durability: 480
Helmets:
# Ironwood
X27975:
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 220
# Fiery
X27992:
Repairable: true
Repair_Material: X27991
Repair_Material_Pretty_Name: "Fiery Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 275
# Stealeaf
X27999:
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 220
# Knightmetal
X28034:
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 5
Durability: 220
# Phantom
X28034:
Repairable: false
Durability: 330
Leggings:
# Ironwood
X27977:
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 300
# Naga Scale
X27959:
Repairable: true
Repair_Material: X27957
Repair_Material_Pretty_Name: "Naga Scale"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 315
# Fiery
X27994:
Repairable: true
Repair_Material: X27991
Repair_Material_Pretty_Name: "Fiery Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 375
# Stealeaf
X28001:
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 300
# Knightmetal
X28036:
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 7
Durability: 300

View File

@@ -0,0 +1,181 @@
# Config wrote by Dragyn, updated by M1cr0man
# Up to date as of Twilight Forest 1.20.5
Axes:
# Ironwood
X27982:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Steeleaf
X28006:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131
# Knightmetal
X28040:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Minotaur
X28008:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: false
Durability: 1561
Hoes:
# Ironwood
X27983:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Steeleaf
X28007:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131
Pickaxes:
# Ironwood
X27981:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Fiery
X27997:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27991
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 1024
# Steeleaf
X28005:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131
# Knightmetal
X28039:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
Shovels:
# Ironwood
X27980:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Steeleaf
X28004:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131
Swords:
# Ironwood
X27979:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27974
Repair_Material_Pretty_Name: "Ironwood Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512
# Fiery
X27996:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27991
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 1024
# Steeleaf
X28003:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X27998
Repair_Material_Pretty_Name: "Steeleaf"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 131
# Knightmetal
X28038:
XP_Modifier: 1.0
Ability_Enabled: true
Tier: 1
Repairable: true
Repair_Material: X28032
Repair_Material_Pretty_Name: "Knightmetal Ingot"
Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2
Durability: 512

View File

@@ -1,35 +1,35 @@
# Config created by Dragyn # Config created by joulesbeef
# Created For twilightforest-1.20.3 # Created For twilightforest-2.2.3
# #
# #
# Settings for Boots # Settings for Boots
### ###
Boots: Boots:
# Ironwood # Ironwood
X27978: TWILIGHTFOREST_ITEM_IRONWOODBOOTS:
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27995: TWILIGHTFOREST_ITEM_FIERYBOOTS:
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Stealeaf # Stealeaf
X28002: TWILIGHTFOREST_ITEM_STEELEAFBOOTS:
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28037: TWILIGHTFOREST_ITEM_KNIGHTLYBOOTS:
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
@@ -39,30 +39,30 @@ Boots:
### ###
Chestplates: Chestplates:
# Ironwood # Ironwood
X27976: TWILIGHTFOREST_ITEM_IRONWOODPLATE:
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27993: TWILIGHTFOREST_ITEM_FIERYPLATE:
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Stealeaf # Stealeaf
X28000: TWILIGHTFOREST_ITEM_STEELEAFPLATE:
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28035: TWILIGHTFOREST_ITEM_KNIGHTLYPLATE:
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
@@ -72,63 +72,61 @@ Chestplates:
### ###
Helmets: Helmets:
# Ironwood # Ironwood
X27975: TWILIGHTFOREST_ITEM_IRONWOODHELM:
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27992: TWILIGHTFOREST_ITEM_FIERYHELM:
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Stealeaf # Stealeaf
X27999: TWILIGHTFOREST_ITEM_STEELEAFHELM:
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28034: TWILIGHTFOREST_ITEM_KNIGHTLYHELM:
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 50
#
# Settings for Leggings # Settings for Leggings
### ###
Leggings: Leggings:
# Ironwood # Ironwood
X27977: TWILIGHTFOREST_ITEM_IRONWOODLEGS:
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27994: TWILIGHTFOREST_ITEM_FIERYLEGS:
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Stealeaf # Stealeaf
X28001: TWILIGHTFOREST_ITEM_STEELEAFLEGS:
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28036: TWILIGHTFOREST_ITEM_KNIGHTLYLEGS:
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500

View File

@@ -0,0 +1,116 @@
# Config created by joulesbeef
# Created For twilightforest-2.2.3
#
#
# Settings for Custom Herbalism Blocks
###
Herbalism:
# Mushgloom
TWILIGHTFOREST_TILE_TFLOG|9:
XP_Gain: 150
Double_Drops_Enabled: true
# Torchberry Plant
TWILIGHTFOREST_TILE_TFLOG|13:
XP_Gain: 20
Double_Drops_Enabled: true
# Mayapple
TWILIGHTFOREST_TILE_TFLOG|4:
XP_Gain: 30
Double_Drops_Enabled: true
# Fiddlehead
TWILIGHTFOREST_TILE_TFLOG|8:
XP_Gain: 35
Double_Drops_Enabled: true
#
# Settings for Custom Mining Blocks
###
Mining:
# Mazestone
TWILIGHTFOREST_TILE_TFMAZESTONE|0:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|1:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|2:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|3:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|4:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|5:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|6:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
TWILIGHTFOREST_TILE_TFMAZESTONE|7:
XP_Gain: 250
Double_Drops_Enabled: true
Is_Ore: false
#
# Settings for Custom Woodcutting Blocks
###
Woodcutting:
# Twilight Oak
TWILIGHTFOREST_TILE_TFLOG|0:
XP_Gain: 70
Double_Drops_Enabled: true
Is_Log: true
# Canopy
TWILIGHTFOREST_TILE_TFLOG|1:
XP_Gain: 80
Double_Drops_Enabled: true
Is_Log: true
# Mangrove
TWILIGHTFOREST_TILE_TFLOG|2:
XP_Gain: 90
Double_Drops_Enabled: true
Is_Log: true
# Darkwood
TWILIGHTFOREST_TILE_TFLOG|3:
XP_Gain: 100
Double_Drops_Enabled: true
Is_Log: true
# Roots
TWILIGHTFOREST_TILE_TFROOTS|0:
XP_Gain: 10
Double_Drops_Enabled: true
Is_Log: false
TWILIGHTFOREST_TILE_TFROOTS|1:
XP_Gain: 10
Double_Drops_Enabled: true
Is_Log: false
# Timewood
TWILIGHTFOREST_TILE_TFMAGICLOG|0:
XP_Gain: 1000
Double_Drops_Enabled: true
Is_Log: true
# Transwood
TWILIGHTFOREST_TILE_TFMAGICLOG|1:
XP_Gain: 1000
Double_Drops_Enabled: true
Is_Log: true
# Minewood
TWILIGHTFOREST_TILE_TFMAGICLOG|2:
XP_Gain: 1000
Double_Drops_Enabled: true
Is_Log: true
# Sortingwood
TWILIGHTFOREST_TILE_TFMAGICLOG|3:
XP_Gain: 1000
Double_Drops_Enabled: true
Is_Log: true

View File

@@ -0,0 +1,152 @@
# Config created by joulesbeef
# Created For twilightforest-2.2.3
#
# Settings for Custom Mobs
MoCreatures-Ogre:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-TwilightLich:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-HelmetCrab:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-SlimeBeetle:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-TwilightWraith:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-Naga:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
MoCreatures-Shark:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-TowerTermite:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
MoCreatures-SmallFish:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-Redcap:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-YetiBoss:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
MoCreatures-HellRat:
Class: Monster
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-Hydra:
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-Firefly:
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-KnightPhantom:
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
TwilightForest-TowerGolem:
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0
MoCreatures-FishBowl:
XP_Multiplier: 1.0
Tameable: false
Taming_XP: 0
CanBeSummoned: false
COTW_Material: ''
COTW_Material_Data: 0
COTW_Material_Amount: 0

View File

@@ -1,73 +1,71 @@
# Config created by Dragyn # Config created by joulesbeef
# Created For twilightforest-1.20.3 # Created For twilightforest-2.2.3
# #
# #
# Settings for Axes # Settings for Axes
### ###
Axes: Axes:
# Ironwood # Ironwood
X27982: TWILIGHTFOREST_ITEM_IRONWOODAXE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Steeleaf # Steeleaf
X31989: TWILIGHTFOREST_ITEM_STEELEAFAXE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28040: TWILIGHTFOREST_ITEM_KNIGHTLYAXE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Minotaur # Minotaur
X31984: TWILIGHTFOREST_ITEM_MINOTAURAXE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X264 Repair_Material: Diamond
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# #
# Settings for Hoes # Settings for Hoes
### ###
Hoes: Hoes:
# Ironwood # Ironwood
X27983: TWILIGHTFOREST_ITEM_IRONWOODHOE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Steeleaf # Steeleaf
X31988: TWILIGHTFOREST_ITEM_STEELEAFHOE:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
@@ -77,42 +75,42 @@ Hoes:
### ###
Pickaxes: Pickaxes:
# Ironwood # Ironwood
X27981: TWILIGHTFOREST_ITEM_IRONWOODPICK:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27997: TWILIGHTFOREST_ITEM_FIERYPICK:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Steeleaf # Steeleaf
X28005: TWILIGHTFOREST_ITEM_STEELEAFPICK:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28039: TWILIGHTFOREST_ITEM_KNIGHTLYPICK:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
@@ -121,22 +119,22 @@ Pickaxes:
### ###
Shovels: Shovels:
# Ironwood # Ironwood
X27980: TWILIGHTFOREST_ITEM_IRONWOODSHOVEL:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Steeleaf # Steeleaf
X28004: TWILIGHTFOREST_ITEM_STEELEAFSHOVEL:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
@@ -145,42 +143,42 @@ Shovels:
### ###
Swords: Swords:
# Ironwood # Ironwood
X27979: TWILIGHTFOREST_ITEM_IRONWOODSWORD:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27974 Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Fiery # Fiery
X27996: TWILIGHTFOREST_ITEM_FIERYSWORD:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27991 Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Steeleaf # Steeleaf
X28003: TWILIGHTFOREST_ITEM_STEELEAFSWORD:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X27998 Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500
# Knightmetal # Knightmetal
X28038: TWILIGHTFOREST_ITEM_KNIGHTLYSWORD:
XP_Modifer: 1.0 XP_Modifer: 1.0
Ability_Enabled: true Ability_Enabled: true
Tier: 1 Tier: 1
Repairable: true Repairable: true
Repair_Material: X28032 Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
Repair_Material_Data_Value: 0 Repair_Material_Data_Value: 0
Repair_Material_Quantity: 2 Repair_Material_Quantity: 2
Durability: 500 Durability: 500

View File

@@ -1,44 +0,0 @@
# 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

72
pom.xml
View File

@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<version>1.4.08-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<name>mcMMO</name> <name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url> <url>https://github.com/mcMMO-Dev/mcMMO</url>
<issueManagement> <issueManagement>
@@ -38,6 +38,14 @@
<include>*.yml</include> <include>*.yml</include>
</includes> </includes>
</resource> </resource>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}</directory>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources> </resources>
<plugins> <plugins>
<plugin> <plugin>
@@ -45,8 +53,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.6</source> <source>1.8</source>
<target>1.6</target> <target>1.8</target>
<excludes> <excludes>
</excludes> </excludes>
</configuration> </configuration>
@@ -71,17 +79,27 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>1.5</version> <version>3.1.1</version>
<configuration> <configuration>
<artifactSet> <artifactSet>
<includes> <includes>
<include>com.turt2live.metrics:MetricsExtension</include> <include>commons-logging:commons-logging</include>
<include>org.apache.tomcat:tomcat-jdbc</include>
<include>org.apache.tomcat:tomcat-juli</include>
</includes> </includes>
</artifactSet> </artifactSet>
<relocations> <relocations>
<relocation> <relocation>
<pattern>com.turt2live.metrics</pattern> <pattern>org.apache.commons.logging</pattern>
<shadedPattern>com.gmail.nossr50.metrics.mcstats</shadedPattern> <shadedPattern>com.gmail.nossr50.commons.logging</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.juli</pattern>
<shadedPattern>com.gmail.nossr50.database.tomcat.juli</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.tomcat</pattern>
<shadedPattern>com.gmail.nossr50.database.tomcat</shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
</configuration> </configuration>
@@ -103,27 +121,12 @@
</extension> </extension>
</extensions> </extensions>
</build> </build>
<repositories>
<repository>
<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>
</repository>
</repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.6.4-R2.0</version> <version>1.13.1-R0.1-SNAPSHOT</version>
<type>jar</type> <scope>provided</scope>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@@ -132,26 +135,13 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.turt2live.metrics</groupId> <groupId>org.apache.tomcat</groupId>
<artifactId>MetricsExtension</artifactId> <artifactId>tomcat-jdbc</artifactId>
<version>0.0.5-SNAPSHOT</version> <version>7.0.52</version>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<distributionManagement>
<repository>
<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> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<ciManagement>
<system>Jenkins</system>
<url>http://ci.ecocitycraft.com/job/mcMMO</url>
</ciManagement>
</project> </project>

View File

@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: com.gmail.nossr50.mcMMO

View File

@@ -1,9 +1,11 @@
package com.gmail.nossr50.api; package com.gmail.nossr50.api;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.AbilityType;
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
public final class AbilityAPI { public final class AbilityAPI {
@@ -80,4 +82,8 @@ public final class AbilityAPI {
public static void setTreeFellerCooldown(Player player, long cooldown) { public static void setTreeFellerCooldown(Player player, long cooldown) {
UserManager.getPlayer(player).setAbilityDATS(AbilityType.TREE_FELLER, cooldown); UserManager.getPlayer(player).setAbilityDATS(AbilityType.TREE_FELLER, cooldown);
} }
public static boolean isBleeding(LivingEntity entity) {
return BleedTimerTask.isBleeding(entity);
}
} }

View File

@@ -1,16 +1,23 @@
package com.gmail.nossr50.api; package com.gmail.nossr50.api;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.api.exceptions.InvalidFormulaTypeException;
import com.gmail.nossr50.api.exceptions.InvalidPlayerException; import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
import com.gmail.nossr50.api.exceptions.InvalidSkillException; import com.gmail.nossr50.api.exceptions.InvalidSkillException;
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
import com.gmail.nossr50.api.exceptions.McMMOPlayerNotFoundException;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.datatypes.experience.FormulaType;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.datatypes.skills.XPGainReason;
import com.gmail.nossr50.skills.child.FamilyTree; import com.gmail.nossr50.skills.child.FamilyTree;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
@@ -43,9 +50,7 @@ public final class ExperienceAPI {
public static boolean isNonChildSkill(String skillType) { public static boolean isNonChildSkill(String skillType) {
SkillType skill = SkillType.getSkill(skillType); SkillType skill = SkillType.getSkill(skillType);
if (skill == null) return false; return skill != null && !skill.isChildSkill();
return !skill.isChildSkill();
} }
@Deprecated @Deprecated
@@ -64,10 +69,59 @@ public final class ExperienceAPI {
* *
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
@Deprecated
public static void addRawXP(Player player, String skillType, float XP) { 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) {
addRawXP(player, skillType, XP, xpGainReason, false);
}
/**
* 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
* @param isUnshared true if the XP cannot be shared with party members
*
* @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, boolean isUnshared) {
if (isUnshared) {
getPlayer(player).beginUnsharedXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
return;
}
getPlayer(player).applyXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
}
/**
* Adds raw XP to an offline player.
* </br>
* This function is designed for API usage.
*
* @deprecated We're using float for our XP values now
* replaced by {@link #addRawXPOffline(String playerName, String skillType, float XP)}
*/
@Deprecated @Deprecated
public static void addRawXPOffline(String playerName, String skillType, int XP) { public static void addRawXPOffline(String playerName, String skillType, int XP) {
addRawXPOffline(playerName, skillType, (float) XP); addRawXPOffline(playerName, skillType, (float) XP);
@@ -78,6 +132,9 @@ public final class ExperienceAPI {
* </br> * </br>
* This function is designed for API usage. * This function is designed for API usage.
* *
* @deprecated We're using uuids to get an offline player
* replaced by {@link #addRawXPOffline(UUID uuid, String skillType, float XP)}
*
* @param playerName The player to add XP to * @param playerName The player to add XP to
* @param skillType The skill to add XP to * @param skillType The skill to add XP to
* @param XP The amount of XP to add * @param XP The amount of XP to add
@@ -85,10 +142,27 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static void addRawXPOffline(String playerName, String skillType, float XP) { public static void addRawXPOffline(String playerName, String skillType, float XP) {
addOfflineXP(playerName, getSkillType(skillType), (int) Math.floor(XP)); addOfflineXP(playerName, getSkillType(skillType), (int) Math.floor(XP));
} }
/**
* Adds raw XP to an offline player.
* </br>
* This function is designed for API usage.
*
* @param uuid The UUID of player to add XP to
* @param skillType The skill to add XP to
* @param XP The amount of XP to add
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
*/
public static void addRawXPOffline(UUID uuid, String skillType, float XP) {
addOfflineXP(uuid, getSkillType(skillType), (int) Math.floor(XP));
}
/** /**
* Adds XP to the player, calculates for XP Rate only. * Adds XP to the player, calculates for XP Rate only.
* </br> * </br>
@@ -100,8 +174,26 @@ public final class ExperienceAPI {
* *
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
@Deprecated
public static void addMultipliedXP(Player player, String skillType, int XP) { 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) {
getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
} }
/** /**
@@ -116,6 +208,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static void addMultipliedXPOffline(String playerName, String skillType, int XP) { public static void addMultipliedXPOffline(String playerName, String skillType, int XP) {
addOfflineXP(playerName, getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier())); addOfflineXP(playerName, getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
} }
@@ -131,10 +224,51 @@ public final class ExperienceAPI {
* *
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
@Deprecated
public static void addModifiedXP(Player player, String skillType, int XP) { 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) {
addModifiedXP(player, skillType, XP, xpGainReason, false);
}
/**
* 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
* @param isUnshared true if the XP cannot be shared with party members
*
* @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, boolean isUnshared) {
SkillType skill = getSkillType(skillType); SkillType skill = getSkillType(skillType);
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier())); if (isUnshared) {
getPlayer(player).beginUnsharedXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
return;
}
getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
} }
/** /**
@@ -149,6 +283,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static void addModifiedXPOffline(String playerName, String skillType, int XP) { public static void addModifiedXPOffline(String playerName, String skillType, int XP) {
SkillType skill = getSkillType(skillType); SkillType skill = getSkillType(skillType);
@@ -167,8 +302,51 @@ public final class ExperienceAPI {
* *
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
@Deprecated
public static void addXP(Player player, String skillType, int XP) { 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) {
addXP(player, skillType, XP, xpGainReason, false);
}
/**
* 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
* @param isUnshared true if the XP cannot be shared with party members
*
* @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, boolean isUnshared) {
if (isUnshared) {
getPlayer(player).beginUnsharedXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
return;
}
getPlayer(player).beginXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
} }
/** /**
@@ -184,7 +362,7 @@ public final class ExperienceAPI {
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
public static int getXP(Player player, String skillType) { public static int getXP(Player player, String skillType) {
return UserManager.getPlayer(player).getSkillXpLevel(getNonChildSkillType(skillType)); return getPlayer(player).getSkillXpLevel(getNonChildSkillType(skillType));
} }
/** /**
@@ -200,10 +378,28 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static int getOfflineXP(String playerName, String skillType) { public static int getOfflineXP(String playerName, String skillType) {
return getOfflineProfile(playerName).getSkillXpLevel(getNonChildSkillType(skillType)); return getOfflineProfile(playerName).getSkillXpLevel(getNonChildSkillType(skillType));
} }
/**
* Get the amount of XP an offline player has in a specific skill.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get XP for
* @param skillType The skill to get XP for
* @return the amount of XP in a given skill
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static int getOfflineXP(UUID uuid, String skillType) {
return getOfflineProfile(uuid).getSkillXpLevel(getNonChildSkillType(skillType));
}
/** /**
* Get the raw amount of XP a player has in a specific skill. * Get the raw amount of XP a player has in a specific skill.
* </br> * </br>
@@ -217,7 +413,7 @@ public final class ExperienceAPI {
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
public static float getXPRaw(Player player, String skillType) { public static float getXPRaw(Player player, String skillType) {
return UserManager.getPlayer(player).getSkillXpLevelRaw(getNonChildSkillType(skillType)); return getPlayer(player).getSkillXpLevelRaw(getNonChildSkillType(skillType));
} }
/** /**
@@ -233,10 +429,28 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static float getOfflineXPRaw(String playerName, String skillType) { public static float getOfflineXPRaw(String playerName, String skillType) {
return getOfflineProfile(playerName).getSkillXpLevelRaw(getNonChildSkillType(skillType)); return getOfflineProfile(playerName).getSkillXpLevelRaw(getNonChildSkillType(skillType));
} }
/**
* Get the raw amount of XP an offline player has in a specific skill.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get XP for
* @param skillType The skill to get XP for
* @return the amount of XP in a given skill
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static float getOfflineXPRaw(UUID uuid, String skillType) {
return getOfflineProfile(uuid).getSkillXpLevelRaw(getNonChildSkillType(skillType));
}
/** /**
* Get the total amount of XP needed to reach the next level. * Get the total amount of XP needed to reach the next level.
* </br> * </br>
@@ -250,7 +464,7 @@ public final class ExperienceAPI {
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
public static int getXPToNextLevel(Player player, String skillType) { public static int getXPToNextLevel(Player player, String skillType) {
return UserManager.getPlayer(player).getXpToLevel(getNonChildSkillType(skillType)); return getPlayer(player).getXpToLevel(getNonChildSkillType(skillType));
} }
/** /**
@@ -266,10 +480,28 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static int getOfflineXPToNextLevel(String playerName, String skillType) { public static int getOfflineXPToNextLevel(String playerName, String skillType) {
return getOfflineProfile(playerName).getXpToLevel(getNonChildSkillType(skillType)); return getOfflineProfile(playerName).getXpToLevel(getNonChildSkillType(skillType));
} }
/**
* Get the total amount of XP an offline player needs to reach the next level.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get XP for
* @param skillType The skill to get XP for
* @return the total amount of XP needed to reach the next level
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static int getOfflineXPToNextLevel(UUID uuid, String skillType) {
return getOfflineProfile(uuid).getXpToLevel(getNonChildSkillType(skillType));
}
/** /**
* Get the amount of XP remaining until the next level. * Get the amount of XP remaining until the next level.
* </br> * </br>
@@ -285,7 +517,7 @@ public final class ExperienceAPI {
public static int getXPRemaining(Player player, String skillType) { public static int getXPRemaining(Player player, String skillType) {
SkillType skill = getNonChildSkillType(skillType); SkillType skill = getNonChildSkillType(skillType);
PlayerProfile profile = UserManager.getPlayer(player).getProfile(); PlayerProfile profile = getPlayer(player).getProfile();
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill); return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
} }
@@ -303,14 +535,34 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static int getOfflineXPRemaining(String playerName, String skillType) { public static int getOfflineXPRemaining(String playerName, String skillType) {
SkillType skill = getNonChildSkillType(skillType); SkillType skill = getNonChildSkillType(skillType);
PlayerProfile profile = getOfflineProfile(playerName); PlayerProfile profile = getOfflineProfile(playerName);
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill); return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
} }
/**
* Get the amount of XP an offline player has left before leveling up.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get XP for
* @param skillType The skill to get XP for
* @return the amount of XP needed to reach the next level
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static float getOfflineXPRemaining(UUID uuid, String skillType) {
SkillType skill = getNonChildSkillType(skillType);
PlayerProfile profile = getOfflineProfile(uuid);
return profile.getXpToLevel(skill) - profile.getSkillXpLevelRaw(skill);
}
/** /**
* Add levels to a skill. * Add levels to a skill.
* </br> * </br>
@@ -323,7 +575,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
public static void addLevel(Player player, String skillType, int levels) { public static void addLevel(Player player, String skillType, int levels) {
UserManager.getPlayer(player).addLevels(getSkillType(skillType), levels); getPlayer(player).addLevels(getSkillType(skillType), levels);
} }
/** /**
@@ -338,6 +590,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static void addLevelOffline(String playerName, String skillType, int levels) { public static void addLevelOffline(String playerName, String skillType, int levels) {
PlayerProfile profile = getOfflineProfile(playerName); PlayerProfile profile = getOfflineProfile(playerName);
SkillType skill = getSkillType(skillType); SkillType skill = getSkillType(skillType);
@@ -349,12 +602,43 @@ public final class ExperienceAPI {
profile.addLevels(parentSkill, (levels / parentSkills.size())); profile.addLevels(parentSkill, (levels / parentSkills.size()));
} }
profile.save(); profile.scheduleAsyncSave();
return; return;
} }
profile.addLevels(skill, levels); profile.addLevels(skill, levels);
profile.save(); profile.scheduleAsyncSave();
}
/**
* Add levels to a skill for an offline player.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to add levels to
* @param skillType Type of skill to add levels to
* @param levels Number of levels to add
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
*/
public static void addLevelOffline(UUID uuid, String skillType, int levels) {
PlayerProfile profile = getOfflineProfile(uuid);
SkillType skill = getSkillType(skillType);
if (skill.isChildSkill()) {
Set<SkillType> parentSkills = FamilyTree.getParents(skill);
for (SkillType parentSkill : parentSkills) {
profile.addLevels(parentSkill, (levels / parentSkills.size()));
}
profile.scheduleAsyncSave();
return;
}
profile.addLevels(skill, levels);
profile.scheduleAsyncSave();
} }
/** /**
@@ -369,7 +653,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
public static int getLevel(Player player, String skillType) { public static int getLevel(Player player, String skillType) {
return UserManager.getPlayer(player).getSkillLevel(getSkillType(skillType)); return getPlayer(player).getSkillLevel(getSkillType(skillType));
} }
/** /**
@@ -384,10 +668,27 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static int getLevelOffline(String playerName, String skillType) { public static int getLevelOffline(String playerName, String skillType) {
return getOfflineProfile(playerName).getSkillLevel(getSkillType(skillType)); return getOfflineProfile(playerName).getSkillLevel(getSkillType(skillType));
} }
/**
* Get the level an offline player has in a specific skill.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get the level for
* @param skillType The skill to get the level for
* @return the level of a given skill
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
*/
public static int getLevelOffline(UUID uuid, String skillType) {
return getOfflineProfile(uuid).getSkillLevel(getSkillType(skillType));
}
/** /**
* Gets the power level of a player. * Gets the power level of a player.
* </br> * </br>
@@ -397,7 +698,7 @@ public final class ExperienceAPI {
* @return the power level of the player * @return the power level of the player
*/ */
public static int getPowerLevel(Player player) { public static int getPowerLevel(Player player) {
return UserManager.getPlayer(player).getPowerLevel(); return getPlayer(player).getPowerLevel();
} }
/** /**
@@ -410,6 +711,7 @@ public final class ExperienceAPI {
* *
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static int getPowerLevelOffline(String playerName) { public static int getPowerLevelOffline(String playerName) {
int powerLevel = 0; int powerLevel = 0;
PlayerProfile profile = getOfflineProfile(playerName); PlayerProfile profile = getOfflineProfile(playerName);
@@ -421,6 +723,27 @@ public final class ExperienceAPI {
return powerLevel; return powerLevel;
} }
/**
* Gets the power level of an offline player.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to get the power level for
* @return the power level of the player
*
* @throws InvalidPlayerException if the given player does not exist in the database
*/
public static int getPowerLevelOffline(UUID uuid) {
int powerLevel = 0;
PlayerProfile profile = getOfflineProfile(uuid);
for (SkillType type : SkillType.NON_CHILD_SKILLS) {
powerLevel += profile.getSkillLevel(type);
}
return powerLevel;
}
/** /**
* Get the level cap of a specific skill. * Get the level cap of a specific skill.
* </br> * </br>
@@ -460,10 +783,28 @@ public final class ExperienceAPI {
* *
* @return the position on the leaderboard * @return the position on the leaderboard
*/ */
@Deprecated
public static int getPlayerRankSkill(String playerName, String skillType) { public static int getPlayerRankSkill(String playerName, String skillType) {
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType)); return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType));
} }
/**
* Get the position on the leaderboard of a player.
* </br>
* This function is designed for API usage.
*
* @param uuid The name of the player to check
* @param skillType The skill to check
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*
* @return the position on the leaderboard
*/
public static int getPlayerRankSkill(UUID uuid, String skillType) {
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(getNonChildSkillType(skillType));
}
/** /**
* Get the position on the power level leaderboard of a player. * Get the position on the power level leaderboard of a player.
@@ -476,10 +817,26 @@ public final class ExperienceAPI {
* *
* @return the position on the power level leaderboard * @return the position on the power level leaderboard
*/ */
@Deprecated
public static int getPlayerRankOverall(String playerName) { public static int getPlayerRankOverall(String playerName) {
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null); return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null);
} }
/**
* Get the position on the power level leaderboard of a player.
* </br>
* This function is designed for API usage.
*
* @param uuid The name of the player to check
*
* @throws InvalidPlayerException if the given player does not exist in the database
*
* @return the position on the power level leaderboard
*/
public static int getPlayerRankOverall(UUID uuid) {
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(null);
}
/** /**
* Sets the level of a player in a specific skill type. * Sets the level of a player in a specific skill type.
* </br> * </br>
@@ -492,7 +849,7 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
*/ */
public static void setLevel(Player player, String skillType, int skillLevel) { public static void setLevel(Player player, String skillType, int skillLevel) {
UserManager.getPlayer(player).modifySkill(getSkillType(skillType), skillLevel); getPlayer(player).modifySkill(getSkillType(skillType), skillLevel);
} }
/** /**
@@ -507,10 +864,27 @@ public final class ExperienceAPI {
* @throws InvalidSkillException if the given skill is not valid * @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
*/ */
@Deprecated
public static void setLevelOffline(String playerName, String skillType, int skillLevel) { public static void setLevelOffline(String playerName, String skillType, int skillLevel) {
getOfflineProfile(playerName).modifySkill(getSkillType(skillType), skillLevel); getOfflineProfile(playerName).modifySkill(getSkillType(skillType), skillLevel);
} }
/**
* Sets the level of an offline player in a specific skill type.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to set the level of
* @param skillType The skill to set the level for
* @param skillLevel The value to set the level to
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
*/
public static void setLevelOffline(UUID uuid, String skillType, int skillLevel) {
getOfflineProfile(uuid).modifySkill(getSkillType(skillType), skillLevel);
}
/** /**
* Sets the XP of a player in a specific skill type. * Sets the XP of a player in a specific skill type.
* </br> * </br>
@@ -524,7 +898,7 @@ public final class ExperienceAPI {
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
public static void setXP(Player player, String skillType, int newValue) { public static void setXP(Player player, String skillType, int newValue) {
UserManager.getPlayer(player).setSkillXpLevel(getNonChildSkillType(skillType), newValue); getPlayer(player).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
} }
/** /**
@@ -540,10 +914,28 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static void setXPOffline(String playerName, String skillType, int newValue) { public static void setXPOffline(String playerName, String skillType, int newValue) {
getOfflineProfile(playerName).setSkillXpLevel(getNonChildSkillType(skillType), newValue); getOfflineProfile(playerName).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
} }
/**
* Sets the XP of an offline player in a specific skill type.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to set the XP of
* @param skillType The skill to set the XP for
* @param newValue The value to set the XP to
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static void setXPOffline(UUID uuid, String skillType, int newValue) {
getOfflineProfile(uuid).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
}
/** /**
* Removes XP from a player in a specific skill type. * Removes XP from a player in a specific skill type.
* </br> * </br>
@@ -557,7 +949,7 @@ public final class ExperienceAPI {
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
public static void removeXP(Player player, String skillType, int xp) { public static void removeXP(Player player, String skillType, int xp) {
UserManager.getPlayer(player).removeXp(getNonChildSkillType(skillType), xp); getPlayer(player).removeXp(getNonChildSkillType(skillType), xp);
} }
/** /**
@@ -573,21 +965,85 @@ public final class ExperienceAPI {
* @throws InvalidPlayerException if the given player does not exist in the database * @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill * @throws UnsupportedOperationException if the given skill is a child skill
*/ */
@Deprecated
public static void removeXPOffline(String playerName, String skillType, int xp) { public static void removeXPOffline(String playerName, String skillType, int xp) {
getOfflineProfile(playerName).removeXp(getNonChildSkillType(skillType), xp); getOfflineProfile(playerName).removeXp(getNonChildSkillType(skillType), xp);
} }
// Utility methods follow. /**
* Removes XP from an offline player in a specific skill type.
* </br>
* This function is designed for API usage.
*
* @param uuid The player to change the XP of
* @param skillType The skill to change the XP for
* @param xp The amount of XP to remove
*
* @throws InvalidSkillException if the given skill is not valid
* @throws InvalidPlayerException if the given player does not exist in the database
* @throws UnsupportedOperationException if the given skill is a child skill
*/
public static void removeXPOffline(UUID uuid, String skillType, int xp) {
getOfflineProfile(uuid).removeXp(getNonChildSkillType(skillType), xp);
}
private static void addOfflineXP(String playerName, SkillType skill, int XP) { /**
PlayerProfile profile = getOfflineProfile(playerName); * Check how much XP is needed for a specific level with the selected level curve.
* </br>
* This function is designed for API usage.
*
* @param level The level to get the amount of XP for
*
* @throws InvalidFormulaTypeException if the given formulaType is not valid
*/
public static int getXpNeededToLevel(int level) {
return mcMMO.getFormulaManager().getCachedXpToLevel(level, ExperienceConfig.getInstance().getFormulaType());
}
/**
* Check how much XP is needed for a specific level with the provided level curve.
* </br>
* This function is designed for API usage.
*
* @param level The level to get the amount of XP for
* @param formulaType The formula type to get the amount of XP for
*
* @throws InvalidFormulaTypeException if the given formulaType is not valid
*/
public static int getXpNeededToLevel(int level, String formulaType) {
return mcMMO.getFormulaManager().getCachedXpToLevel(level, getFormulaType(formulaType));
}
// Utility methods follow.
private static void addOfflineXP(UUID playerUniqueId, SkillType skill, int XP) {
PlayerProfile profile = getOfflineProfile(playerUniqueId);
profile.addXp(skill, XP); profile.addXp(skill, XP);
profile.save(); profile.save();
} }
@Deprecated
private static void addOfflineXP(String playerName, SkillType skill, int XP) {
PlayerProfile profile = getOfflineProfile(playerName);
profile.addXp(skill, XP);
profile.scheduleAsyncSave();
}
private static PlayerProfile getOfflineProfile(UUID uuid) {
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid);
if (!profile.isLoaded()) {
throw new InvalidPlayerException();
}
return profile;
}
@Deprecated
private static PlayerProfile getOfflineProfile(String playerName) { private static PlayerProfile getOfflineProfile(String playerName) {
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); UUID uuid = mcMMO.p.getServer().getOfflinePlayer(playerName).getUniqueId();
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid);
if (!profile.isLoaded()) { if (!profile.isLoaded()) {
throw new InvalidPlayerException(); throw new InvalidPlayerException();
@@ -615,4 +1071,32 @@ public final class ExperienceAPI {
return skill; return skill;
} }
private static XPGainReason getXPGainReason(String reason) throws InvalidXPGainReasonException {
XPGainReason xpGainReason = XPGainReason.getXPGainReason(reason);
if (xpGainReason == null) {
throw new InvalidXPGainReasonException();
}
return xpGainReason;
}
private static FormulaType getFormulaType(String formula) throws InvalidFormulaTypeException {
FormulaType formulaType = FormulaType.getFormulaType(formula);
if (formulaType == null) {
throw new InvalidFormulaTypeException();
}
return formulaType;
}
private static McMMOPlayer getPlayer(Player player) throws McMMOPlayerNotFoundException {
if (!UserManager.hasPlayerDataKey(player)) {
throw new McMMOPlayerNotFoundException(player);
}
return UserManager.getPlayer(player);
}
} }

View File

@@ -1,14 +1,17 @@
package com.gmail.nossr50.api; package com.gmail.nossr50.api;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.party.Party; import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.datatypes.party.PartyLeader;
import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
@@ -79,7 +82,7 @@ public final class PartyAPI {
Party party = PartyManager.getParty(partyName); Party party = PartyManager.getParty(partyName);
if (party == null) { if (party == null) {
party = new Party(player.getName(), partyName); party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName);
} }
PartyManager.addToParty(UserManager.getPlayer(player), party); PartyManager.addToParty(UserManager.getPlayer(player), party);
@@ -105,7 +108,7 @@ public final class PartyAPI {
* @return the leader of the party * @return the leader of the party
*/ */
public static String getPartyLeader(String partyName) { public static String getPartyLeader(String partyName) {
return PartyManager.getPartyLeader(partyName); return PartyManager.getPartyLeaderName(partyName);
} }
/** /**
@@ -114,10 +117,11 @@ public final class PartyAPI {
* This function is designed for API usage. * This function is designed for API usage.
* *
* @param partyName The name of the party to set the leader of * @param partyName The name of the party to set the leader of
* @param player The player to set as leader * @param playerName The playerName to set as leader
*/ */
public static void setPartyLeader(String partyName, String player) { @Deprecated
PartyManager.setPartyLeader(player, PartyManager.getParty(partyName)); public static void setPartyLeader(String partyName, String playerName) {
PartyManager.setPartyLeader(mcMMO.p.getServer().getOfflinePlayer(playerName).getUniqueId(), PartyManager.getParty(partyName));
} }
/** /**
@@ -132,8 +136,8 @@ public final class PartyAPI {
public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) { public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) {
List<OfflinePlayer> members = new ArrayList<OfflinePlayer>(); List<OfflinePlayer> members = new ArrayList<OfflinePlayer>();
for (String memberName : PartyManager.getAllMembers(player)) { for (UUID memberUniqueId : PartyManager.getAllMembers(player).keySet()) {
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberName); OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberUniqueId);
members.add(member); members.add(member);
} }
return members; return members;
@@ -147,7 +151,20 @@ public final class PartyAPI {
* @param player The player to check * @param player The player to check
* @return all the player names in the player's party * @return all the player names in the player's party
*/ */
@Deprecated
public static LinkedHashSet<String> getMembers(Player player) { public static LinkedHashSet<String> getMembers(Player player) {
return (LinkedHashSet<String>) PartyManager.getAllMembers(player).values();
}
/**
* Get a list of all player names and uuids in this player's party.
* </br>
* This function is designed for API usage.
*
* @param player The player to check
* @return all the player names and uuids in the player's party
*/
public static LinkedHashMap<UUID, String> getMembersMap(Player player) {
return PartyManager.getAllMembers(player); return PartyManager.getAllMembers(player);
} }
@@ -176,7 +193,7 @@ public final class PartyAPI {
} }
public static boolean hasAlly(String partyName) { public static boolean hasAlly(String partyName) {
return PartyManager.getParty(partyName).getAlly() != null; return getAllyName(partyName) != null;
} }
public static String getAllyName(String partyName) { public static String getAllyName(String partyName) {

View File

@@ -0,0 +1,93 @@
package com.gmail.nossr50.api;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.gmail.nossr50.datatypes.skills.SkillType;
public final class SkillAPI {
private SkillAPI() {}
/**
* Returns a list of strings with mcMMO's skills
* This includes parent and child skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getSkills() {
return getListFromEnum(Arrays.asList(SkillType.values()));
}
/**
* Returns a list of strings with mcMMO's skills
* This only includes parent skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getNonChildSkills() {
return getListFromEnum(SkillType.NON_CHILD_SKILLS);
}
/**
* Returns a list of strings with mcMMO's skills
* This only includes child skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getChildSkills() {
return getListFromEnum(SkillType.CHILD_SKILLS);
}
/**
* Returns a list of strings with mcMMO's skills
* This only includes combat skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getCombatSkills() {
return getListFromEnum(SkillType.COMBAT_SKILLS);
}
/**
* Returns a list of strings with mcMMO's skills
* This only includes gathering skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getGatheringSkills() {
return getListFromEnum(SkillType.GATHERING_SKILLS);
}
/**
* Returns a list of strings with mcMMO's skills
* This only includes misc skills
* </br>
* This function is designed for API usage.
*
* @return a list of strings with valid skill names
*/
public static List<String> getMiscSkills() {
return getListFromEnum(SkillType.MISC_SKILLS);
}
private static List<String> getListFromEnum(List<SkillType> skillsTypes) {
List<String> skills = new ArrayList<String>();
for (SkillType skillType : skillsTypes) {
skills.add(skillType.name());
}
return skills;
}
}

View File

@@ -0,0 +1,9 @@
package com.gmail.nossr50.api.exceptions;
public class InvalidFormulaTypeException extends RuntimeException {
private static final long serialVersionUID = 3368670229490121886L;
public InvalidFormulaTypeException() {
super("That is not a valid FormulaType.");
}
}

View File

@@ -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.");
}
}

View File

@@ -0,0 +1,11 @@
package com.gmail.nossr50.api.exceptions;
import org.bukkit.entity.Player;
public class McMMOPlayerNotFoundException extends RuntimeException {
private static final long serialVersionUID = 761917904993202836L;
public McMMOPlayerNotFoundException(Player player) {
super("McMMOPlayer object was not found for: " + player.getName() + " " + player.getUniqueId());
}
}

View File

@@ -1,16 +1,11 @@
package com.gmail.nossr50.chat; package com.gmail.nossr50.chat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.party.Party; import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent; import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.runnables.party.PartyChatTask;
public class PartyChatManager extends ChatManager { public class PartyChatManager extends ChatManager {
private Party party; private Party party;
@@ -30,21 +25,6 @@ public class PartyChatManager extends ChatManager {
@Override @Override
protected void sendMessage() { protected void sendMessage() {
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) { new PartyChatTask(plugin, party, senderName, displayName, message).runTask(plugin);
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);
} }
} }

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -30,6 +29,10 @@ public class KrakenCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
UserManager.getPlayer(sender.getName()).getFishingManager().unleashTheKraken(); UserManager.getPlayer(sender.getName()).getFishingManager().unleashTheKraken();
return true; return true;
@@ -58,7 +61,7 @@ public class KrakenCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default: default:
return ImmutableList.of(); return ImmutableList.of();

View File

@@ -0,0 +1,46 @@
package com.gmail.nossr50.commands;
import java.util.List;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.database.FlatfileDatabaseManager;
import com.gmail.nossr50.database.SQLDatabaseManager;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList;
public class MHDCommand implements TabExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (mcMMO.getDatabaseManager() instanceof SQLDatabaseManager) {
SQLDatabaseManager m = (SQLDatabaseManager) mcMMO.getDatabaseManager();
m.resetMobHealthSettings();
for (McMMOPlayer player : UserManager.getPlayers()) {
player.getProfile().setMobHealthbarType(Config.getInstance().getMobHealthbarDefault());
}
sender.sendMessage("Mob health reset");
return true;
}
if (mcMMO.getDatabaseManager() instanceof FlatfileDatabaseManager) {
FlatfileDatabaseManager m = (FlatfileDatabaseManager) mcMMO.getDatabaseManager();
m.resetMobHealthSettings();
for (McMMOPlayer player : UserManager.getPlayers()) {
player.getProfile().setMobHealthbarType(Config.getInstance().getMobHealthbarDefault());
}
sender.sendMessage("Mob health reset");
return true;
}
return false;
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
return ImmutableList.of();
}
}

View File

@@ -0,0 +1,351 @@
package com.gmail.nossr50.commands;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.skills.ModConfigType;
import com.gmail.nossr50.util.Misc;
public class McImportCommand implements CommandExecutor {
int fileAmount;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
switch (args.length) {
case 0:
importModConfig();
return true;
default:
return false;
}
}
public boolean importModConfig() {
String importFilePath = mcMMO.getModDirectory() + File.separator + "import";
File importFile = new File(importFilePath, "import.log");
mcMMO.p.getLogger().info("Starting import of mod materials...");
fileAmount = 0;
HashMap<ModConfigType, ArrayList<String>> materialNames = new HashMap<ModConfigType, ArrayList<String>>();
BufferedReader in = null;
try {
// Open the file
in = new BufferedReader(new FileReader(importFile));
String line;
String materialName;
String modName;
// While not at the end of the file
while ((line = in.readLine()) != null) {
String[] split1 = line.split("material ");
if (split1.length != 2) {
continue;
}
String[] split2 = split1[1].split(" with");
if (split2.length != 2) {
continue;
}
materialName = split2[0];
// Categorise each material under a mod config type
ModConfigType type = ModConfigType.getModConfigType(materialName);
if (!materialNames.containsKey(type)) {
materialNames.put(type, new ArrayList<String>());
}
materialNames.get(type).add(materialName);
continue;
}
}
catch (FileNotFoundException e) {
mcMMO.p.getLogger().warning("Could not find " + importFile.getAbsolutePath() + " ! (No such file or directory)");
mcMMO.p.getLogger().warning("Copy and paste latest.log to " + importFile.getParentFile().getAbsolutePath() + " and rename it to import.log");
return false;
}
catch (Exception e) {
e.printStackTrace();
return false;
}
finally {
tryClose(in);
}
createOutput(materialNames);
mcMMO.p.getLogger().info("Import finished! Created " + fileAmount + " files!");
return true;
}
private void createOutput(HashMap<ModConfigType, ArrayList<String>> materialNames) {
for (ModConfigType modConfigType : materialNames.keySet()) {
HashMap<String, ArrayList<String>> materialNamesType = new HashMap<String, ArrayList<String>>();
for (String materialName : materialNames.get(modConfigType)) {
String modName = Misc.getModName(materialName);
if (!materialNamesType.containsKey(modName)) {
materialNamesType.put(modName, new ArrayList<String>());
}
materialNamesType.get(modName).add(materialName);
}
createOutput(modConfigType, materialNamesType);
}
}
private void tryClose(Closeable c) {
if (c == null) {
return;
}
try {
c.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
private void createOutput(ModConfigType modConfigType, HashMap<String, ArrayList<String>> materialNames) {
File outputFilePath = new File(mcMMO.getModDirectory() + File.separator + "output");
if (!outputFilePath.exists() && !outputFilePath.mkdirs()) {
mcMMO.p.getLogger().severe("Could not create output directory! " + outputFilePath.getAbsolutePath());
}
FileWriter out = null;
String type = modConfigType.name().toLowerCase();
for (String modName : materialNames.keySet()) {
File outputFile = new File(outputFilePath, modName + "." + type + ".yml");
mcMMO.p.getLogger().info("Creating " + outputFile.getName());
try {
if (outputFile.exists() && !outputFile.delete()) {
mcMMO.p.getLogger().severe("Not able to delete old output file! " + outputFile.getAbsolutePath());
}
if (!outputFile.createNewFile()) {
mcMMO.p.getLogger().severe("Could not create output file! " + outputFile.getAbsolutePath());
continue;
}
StringBuilder writer = new StringBuilder();
HashMap<String, ArrayList<String>> configSections = getConfigSections(modConfigType, modName, materialNames);
if (configSections == null) {
mcMMO.p.getLogger().severe("Something went wrong!! type is " + type);
return;
}
// Write the file, go through each skill and write all the materials
for (String configSection : configSections.keySet()) {
if (configSection.equals("UNIDENTIFIED")) {
writer.append("# This isn't a valid config section and all materials in this category need to be").append("\r\n");
writer.append("# copy and pasted to a valid section of this config file.").append("\r\n");
}
writer.append(configSection).append(":").append("\r\n");
for (String line : configSections.get(configSection)) {
writer.append(line).append("\r\n");
}
writer.append("\r\n");
}
out = new FileWriter(outputFile);
out.write(writer.toString());
}
catch (IOException e) {
e.printStackTrace();
return;
}
catch (Exception e) {
e.printStackTrace();
return;
}
finally {
tryClose(out);
fileAmount++;
}
}
}
private HashMap<String, ArrayList<String>> getConfigSections(ModConfigType type, String modName, HashMap<String, ArrayList<String>> materialNames) {
switch (type) {
case BLOCKS:
return getConfigSectionsBlocks(modName, materialNames);
case TOOLS:
return getConfigSectionsTools(modName, materialNames);
case ARMOR:
return getConfigSectionsArmor(modName, materialNames);
case UNKNOWN:
return getConfigSectionsUnknown(modName, materialNames);
}
return null;
}
private HashMap<String, ArrayList<String>> getConfigSectionsBlocks(String modName, HashMap<String, ArrayList<String>> materialNames) {
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
// Go through all the materials and categorise them under a skill
for (String materialName : materialNames.get(modName)) {
String skillName = "UNIDENTIFIED";
if (materialName.contains("ORE")) {
skillName = "Mining";
}
else if (materialName.contains("LOG") || materialName.contains("LEAVES")) {
skillName = "Woodcutting";
}
else if (materialName.contains("GRASS") || materialName.contains("FLOWER") || materialName.contains("CROP")) {
skillName = "Herbalism";
}
else if (materialName.contains("DIRT") || materialName.contains("SAND")) {
skillName = "Excavation";
}
if (!configSections.containsKey(skillName)) {
configSections.put(skillName, new ArrayList<String>());
}
ArrayList<String> skillContents = configSections.get(skillName);
skillContents.add(" " + materialName + "|0:");
skillContents.add(" " + " " + "XP_Gain: 99");
skillContents.add(" " + " " + "Double_Drops_Enabled: true");
if (skillName.equals("Mining")) {
skillContents.add(" " + " " + "Smelting_XP_Gain: 9");
}
else if (skillName.equals("Woodcutting")) {
skillContents.add(" " + " " + "Is_Log: " + materialName.contains("LOG"));
}
}
return configSections;
}
private HashMap<String, ArrayList<String>> getConfigSectionsTools(String modName, HashMap<String, ArrayList<String>> materialNames) {
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
// Go through all the materials and categorise them under a tool type
for (String materialName : materialNames.get(modName)) {
String toolType = "UNIDENTIFIED";
if (materialName.contains("PICKAXE")) {
toolType = "Pickaxes";
}
else if (materialName.contains("AXE")) {
toolType = "Axes";
}
else if (materialName.contains("BOW")) {
toolType = "Bows";
}
else if (materialName.contains("HOE")) {
toolType = "Hoes";
}
else if (materialName.contains("SHOVEL") || materialName.contains("SPADE")) {
toolType = "Shovels";
}
else if (materialName.contains("SWORD")) {
toolType = "Swords";
}
if (!configSections.containsKey(toolType)) {
configSections.put(toolType, new ArrayList<String>());
}
ArrayList<String> skillContents = configSections.get(toolType);
skillContents.add(" " + materialName + ":");
skillContents.add(" " + " " + "XP_Modifier: 1.0");
skillContents.add(" " + " " + "Tier: 1");
skillContents.add(" " + " " + "Ability_Enabled: true");
addRepairableLines(materialName, skillContents);
}
return configSections;
}
private HashMap<String, ArrayList<String>> getConfigSectionsArmor(String modName, HashMap<String, ArrayList<String>> materialNames) {
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
// Go through all the materials and categorise them under an armor type
for (String materialName : materialNames.get(modName)) {
String toolType = "UNIDENTIFIED";
if (materialName.contains("BOOT") || materialName.contains("SHOE")) {
toolType = "Boots";
}
else if (materialName.contains("CHESTPLATE") || materialName.contains("CHEST")) {
toolType = "Chestplates";
}
else if (materialName.contains("HELM") || materialName.contains("HAT")) {
toolType = "Helmets";
}
else if (materialName.contains("LEGGINGS") || materialName.contains("LEGS") || materialName.contains("PANTS")) {
toolType = "Leggings";
}
if (!configSections.containsKey(toolType)) {
configSections.put(toolType, new ArrayList<String>());
}
ArrayList<String> skillContents = configSections.get(toolType);
skillContents.add(" " + materialName + ":");
addRepairableLines(materialName, skillContents);
}
return configSections;
}
private void addRepairableLines(String materialName, ArrayList<String> skillContents) {
skillContents.add(" " + " " + "Repairable: true");
skillContents.add(" " + " " + "Repair_Material: REPAIR_MATERIAL_NAME");
skillContents.add(" " + " " + "Repair_Material_Data_Value: 0");
skillContents.add(" " + " " + "Repair_Material_Quantity: 9");
skillContents.add(" " + " " + "Repair_Material_Pretty_Name: Repair Item Name");
skillContents.add(" " + " " + "Repair_MinimumLevel: 0");
skillContents.add(" " + " " + "Repair_XpMultiplier: 1.0");
Material material = Material.matchMaterial(materialName);
short durability = (material == null) ? (short) 9999 : material.getMaxDurability();
skillContents.add(" " + " " + "Durability: " + ((durability > 0) ? durability : (short) 9999));
}
private HashMap<String, ArrayList<String>> getConfigSectionsUnknown(String modName, HashMap<String, ArrayList<String>> materialNames) {
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
// Go through all the materials and print them
for (String materialName : materialNames.get(modName)) {
String configKey = "UNIDENTIFIED";
if (!configSections.containsKey(configKey)) {
configSections.put(configKey, new ArrayList<String>());
}
ArrayList<String> skillContents = configSections.get(configKey);
skillContents.add(" " + materialName);
}
return configSections;
}
}

View File

@@ -27,7 +27,7 @@ public class McmmoCommand implements CommandExecutor {
if (Config.getInstance().getDonateMessageEnabled()) { if (Config.getInstance().getDonateMessageEnabled()) {
sender.sendMessage(LocaleLoader.getString("MOTD.Donate")); sender.sendMessage(LocaleLoader.getString("MOTD.Donate"));
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "nossr50@gmail.com" + ChatColor.GOLD + " Paypal");
} }
if (Permissions.showversion(sender)) { if (Permissions.showversion(sender)) {

View File

@@ -37,6 +37,10 @@ public class MobhealthCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
switch (args.length) { switch (args.length) {
case 1: case 1:
try { try {

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -29,6 +28,10 @@ public abstract class ToggleCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
applyCommandAction(UserManager.getPlayer(sender.getName())); applyCommandAction(UserManager.getPlayer(sender.getName()));
return true; return true;
@@ -62,7 +65,7 @@ public abstract class ToggleCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default: default:
return ImmutableList.of(); return ImmutableList.of();

View File

@@ -9,12 +9,12 @@ import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.chat.ChatManager; import com.gmail.nossr50.chat.ChatManager;
import com.gmail.nossr50.chat.ChatManagerFactory; import com.gmail.nossr50.chat.ChatManagerFactory;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.chat.ChatMode; import com.gmail.nossr50.datatypes.chat.ChatMode;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
@@ -41,6 +41,10 @@ public abstract class ChatCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
mcMMOPlayer = UserManager.getPlayer(sender.getName()); mcMMOPlayer = UserManager.getPlayer(sender.getName());
if (mcMMOPlayer.isChatEnabled(chatMode)) { if (mcMMOPlayer.isChatEnabled(chatMode)) {
@@ -53,6 +57,10 @@ public abstract class ChatCommand implements TabExecutor {
return true; return true;
case 1: case 1:
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
if (CommandUtils.shouldEnableToggle(args[0])) { if (CommandUtils.shouldEnableToggle(args[0])) {
if (CommandUtils.noConsoleUsage(sender)) { if (CommandUtils.noConsoleUsage(sender)) {
return true; return true;

View File

@@ -12,6 +12,7 @@ import com.gmail.nossr50.datatypes.database.DatabaseType;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.runnables.database.DatabaseConversionTask; import com.gmail.nossr50.runnables.database.DatabaseConversionTask;
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
public class ConvertDatabaseCommand implements CommandExecutor { public class ConvertDatabaseCommand implements CommandExecutor {
@@ -55,13 +56,13 @@ public class ConvertDatabaseCommand implements CommandExecutor {
UserManager.clearAll(); UserManager.clearAll();
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) { for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getName(), false); PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getUniqueId());
if (profile.isLoaded()) { if (profile.isLoaded()) {
mcMMO.getDatabaseManager().saveUser(profile); mcMMO.getDatabaseManager().saveUser(profile);
} }
UserManager.addUser(player); new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
} }
new DatabaseConversionTask(oldDatabase, sender, previousType.toString(), newType.toString()).runTaskAsynchronously(mcMMO.p); new DatabaseConversionTask(oldDatabase, sender, previousType.toString(), newType.toString()).runTaskAsynchronously(mcMMO.p);

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.database;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -23,7 +22,7 @@ public class McremoveCommand implements TabExecutor {
case 1: case 1:
String playerName = CommandUtils.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; return true;
} }
@@ -45,7 +44,7 @@ public class McremoveCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default: default:
return ImmutableList.of(); return ImmutableList.of();

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.datatypes.skills.XPGainReason;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.EventUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@@ -26,11 +27,11 @@ public class AddlevelsCommand extends ExperienceCommand {
profile.addLevels(skill, value); profile.addLevels(skill, value);
if (player == null) { if (player == null) {
profile.save(); profile.scheduleAsyncSave();
return; return;
} }
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true); EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true, XPGainReason.COMMAND);
} }
@Override @Override

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.datatypes.skills.XPGainReason;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
@@ -23,11 +24,11 @@ public class AddxpCommand extends ExperienceCommand {
@Override @Override
protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) { protected void handleCommand(Player player, PlayerProfile profile, SkillType skill, int value) {
if (player != null) { if (player != null) {
UserManager.getPlayer(player).applyXpGain(skill, value); UserManager.getPlayer(player).applyXpGain(skill, value, XPGainReason.COMMAND);
} }
else { else {
profile.addXp(skill, value); profile.addXp(skill, value);
profile.save(); profile.scheduleAsyncSave();
} }
} }

View File

@@ -9,6 +9,7 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.experience.FormulaType; import com.gmail.nossr50.datatypes.experience.FormulaType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.runnables.database.FormulaConversionTask; import com.gmail.nossr50.runnables.database.FormulaConversionTask;
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
public class ConvertExperienceCommand implements CommandExecutor { public class ConvertExperienceCommand implements CommandExecutor {
@@ -37,7 +38,7 @@ public class ConvertExperienceCommand implements CommandExecutor {
new FormulaConversionTask(sender, newType).runTaskLater(mcMMO.p, 1); new FormulaConversionTask(sender, newType).runTaskLater(mcMMO.p, 1);
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) { for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
UserManager.addUser(player); new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
} }
return true; return true;

View File

@@ -2,8 +2,9 @@ package com.gmail.nossr50.commands.experience;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.UUID;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor; import org.bukkit.command.TabExecutor;
@@ -17,7 +18,6 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
public abstract class ExperienceCommand implements TabExecutor { public abstract class ExperienceCommand implements TabExecutor {
@@ -46,6 +46,12 @@ public abstract class ExperienceCommand implements TabExecutor {
skill = null; skill = null;
} }
if (skill != null && skill.isChildSkill())
{
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
return true;
}
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill, Integer.parseInt(args[1])); editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill, Integer.parseInt(args[1]));
return true; return true;
@@ -65,14 +71,25 @@ public abstract class ExperienceCommand implements TabExecutor {
skill = null; skill = null;
} }
if (skill != null && skill.isChildSkill())
{
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
return true;
}
int value = Integer.parseInt(args[2]); int value = Integer.parseInt(args[2]);
String playerName = CommandUtils.getMatchedPlayerName(args[0]); String playerName = CommandUtils.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true); 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 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) { if (mcMMOPlayer == null) {
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); UUID uuid = null;
OfflinePlayer player = mcMMO.p.getServer().getOfflinePlayer(playerName);
if (player != null) {
uuid = player.getUniqueId();
}
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, uuid, false);
if (CommandUtils.unloadedProfile(sender, profile)) { if (CommandUtils.unloadedProfile(sender, profile)) {
return true; return true;
@@ -96,7 +113,7 @@ public abstract class ExperienceCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
case 2: case 2:
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size())); return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.datatypes.skills.XPGainReason;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.EventUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@@ -28,7 +29,7 @@ public class MmoeditCommand extends ExperienceCommand {
profile.modifySkill(skill, value); profile.modifySkill(skill, value);
if (player == null) { if (player == null) {
profile.save(); profile.scheduleAsyncSave();
return; return;
} }
@@ -36,7 +37,7 @@ public class MmoeditCommand extends ExperienceCommand {
return; return;
} }
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel); EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel, XPGainReason.COMMAND);
} }
@Override @Override

View File

@@ -2,8 +2,9 @@ package com.gmail.nossr50.commands.experience;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.UUID;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor; import org.bukkit.command.TabExecutor;
@@ -14,12 +15,12 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.datatypes.skills.XPGainReason;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.EventUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
/** /**
@@ -29,6 +30,7 @@ import com.google.common.collect.ImmutableList;
public class SkillresetCommand implements TabExecutor { public class SkillresetCommand implements TabExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
SkillType skill;
switch (args.length) { switch (args.length) {
case 1: case 1:
if (CommandUtils.noConsoleUsage(sender)) { if (CommandUtils.noConsoleUsage(sender)) {
@@ -44,7 +46,14 @@ public class SkillresetCommand implements TabExecutor {
return true; return true;
} }
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0])); if (args[0].equalsIgnoreCase("all")) {
skill = null;
}
else {
skill = SkillType.getSkill(args[1]);
}
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill);
return true; return true;
case 2: case 2:
@@ -57,7 +66,6 @@ public class SkillresetCommand implements TabExecutor {
return true; return true;
} }
SkillType skill;
if (args[1].equalsIgnoreCase("all")) { if (args[1].equalsIgnoreCase("all")) {
skill = null; skill = null;
} }
@@ -66,11 +74,16 @@ public class SkillresetCommand implements TabExecutor {
} }
String playerName = CommandUtils.getMatchedPlayerName(args[0]); String playerName = CommandUtils.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true); 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 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) { if (mcMMOPlayer == null) {
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); UUID uuid = null;
OfflinePlayer player = mcMMO.p.getServer().getOfflinePlayer(playerName);
if (player != null) {
uuid = player.getUniqueId();
}
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, uuid, false);
if (CommandUtils.unloadedProfile(sender, profile)) { if (CommandUtils.unloadedProfile(sender, profile)) {
return true; return true;
@@ -94,7 +107,7 @@ public class SkillresetCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
case 2: case 2:
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size())); return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
@@ -110,11 +123,11 @@ public class SkillresetCommand implements TabExecutor {
profile.modifySkill(skill, 0); profile.modifySkill(skill, 0);
if (player == null) { if (player == null) {
profile.save(); profile.scheduleAsyncSave();
return; return;
} }
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false); EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false, XPGainReason.COMMAND);
} }
protected boolean permissionsCheckSelf(CommandSender sender) { protected boolean permissionsCheckSelf(CommandSender sender) {
@@ -134,7 +147,7 @@ public class SkillresetCommand implements TabExecutor {
} }
private boolean validateArguments(CommandSender sender, String skillName) { private boolean validateArguments(CommandSender sender, String skillName) {
return !(CommandUtils.isInvalidSkill(sender, skillName) && !skillName.equalsIgnoreCase("all")); return skillName.equalsIgnoreCase("all") || !CommandUtils.isInvalidSkill(sender, skillName);
} }
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) { protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {

View File

@@ -1,10 +1,12 @@
package com.gmail.nossr50.commands.party; package com.gmail.nossr50.commands.party;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.party.Party; import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.PartyManager;
@@ -18,13 +20,14 @@ public class PartyChangeOwnerCommand implements CommandExecutor {
case 2: case 2:
Party playerParty = UserManager.getPlayer((Player) sender).getParty(); Party playerParty = UserManager.getPlayer((Player) sender).getParty();
String targetName = CommandUtils.getMatchedPlayerName(args[1]); String targetName = CommandUtils.getMatchedPlayerName(args[1]);
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
if (!playerParty.getMembers().contains(targetName)) { if (!playerParty.hasMember(target.getUniqueId())) {
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName)); sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
return true; return true;
} }
PartyManager.setPartyLeader(targetName, playerParty); PartyManager.setPartyLeader(target.getUniqueId(), playerParty);
return true; return true;
default: default:

View File

@@ -1,6 +1,9 @@
package com.gmail.nossr50.commands.party; package com.gmail.nossr50.commands.party;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
@@ -9,10 +12,10 @@ import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.commands.chat.PartyChatCommand; import com.gmail.nossr50.commands.chat.PartyChatCommand;
import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand; import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand;
import com.gmail.nossr50.commands.party.teleport.PtpCommand; 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.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@@ -52,7 +55,7 @@ public class PartyCommand implements TabExecutor {
private CommandExecutor partyRenameCommand = new PartyRenameCommand(); private CommandExecutor partyRenameCommand = new PartyRenameCommand();
private CommandExecutor partyInfoCommand = new PartyInfoCommand(); private CommandExecutor partyInfoCommand = new PartyInfoCommand();
private CommandExecutor partyHelpCommand = new PartyHelpCommand(); 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 partyChatCommand = new PartyChatCommand();
private CommandExecutor partyAllianceCommand = new PartyAllianceCommand(); private CommandExecutor partyAllianceCommand = new PartyAllianceCommand();
@@ -68,6 +71,11 @@ public class PartyCommand implements TabExecutor {
} }
Player player = (Player) sender; Player player = (Player) sender;
if (!UserManager.hasPlayerDataKey(player)) {
return true;
}
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (args.length < 1) { if (args.length < 1) {
@@ -126,7 +134,7 @@ public class PartyCommand implements TabExecutor {
} }
// Party leader commands // Party leader commands
if (!mcMMOPlayer.getParty().getLeader().equalsIgnoreCase(player.getName())) { if (!mcMMOPlayer.getParty().getLeader().getUniqueId().equals(player.getUniqueId())) {
sender.sendMessage(LocaleLoader.getString("Party.NotOwner")); sender.sendMessage(LocaleLoader.getString("Party.NotOwner"));
return true; return true;
} }
@@ -175,7 +183,7 @@ public class PartyCommand implements TabExecutor {
case INVITE: case INVITE:
case KICK: case KICK:
case OWNER: case OWNER:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
case XPSHARE: case XPSHARE:
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size())); return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
@@ -190,7 +198,10 @@ public class PartyCommand implements TabExecutor {
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size())); List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
if (matches.size() == 0) { 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())); return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
} }

View File

@@ -18,7 +18,7 @@ public class PartyInviteCommand implements CommandExecutor {
switch (args.length) { switch (args.length) {
case 2: case 2:
String targetName = CommandUtils.getMatchedPlayerName(args[1]); String targetName = CommandUtils.getMatchedPlayerName(args[1]);
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true); McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) { if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
return false; return false;

View File

@@ -11,6 +11,7 @@ import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason; import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
public class PartyKickCommand implements CommandExecutor { public class PartyKickCommand implements CommandExecutor {
@@ -19,13 +20,15 @@ public class PartyKickCommand implements CommandExecutor {
switch (args.length) { switch (args.length) {
case 2: case 2:
Party playerParty = UserManager.getPlayer((Player) sender).getParty(); Party playerParty = UserManager.getPlayer((Player) sender).getParty();
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]); String targetName = CommandUtils.getMatchedPlayerName(args[1]);
if (!playerParty.getMembers().contains(target.getName())) { if (!playerParty.hasMember(targetName)) {
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName())); sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
return true; return true;
} }
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
if (target.isOnline()) { if (target.isOnline()) {
Player onlineTarget = target.getPlayer(); Player onlineTarget = target.getPlayer();
String partyName = playerParty.getName(); String partyName = playerParty.getName();

View File

@@ -36,7 +36,7 @@ public class PartyRenameCommand implements CommandExecutor {
return true; return true;
} }
String leaderName = playerParty.getLeader(); String leaderName = playerParty.getLeader().getPlayerName();
for (Player member : playerParty.getOnlineMembers()) { for (Player member : playerParty.getOnlineMembers()) {
if (!PartyManager.handlePartyChangeEvent(member, oldPartyName, newPartyName, EventReason.CHANGED_PARTIES)) { if (!PartyManager.handlePartyChangeEvent(member, oldPartyName, newPartyName, EventReason.CHANGED_PARTIES)) {

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.alliance;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@@ -111,7 +110,7 @@ public class PartyAllianceCommand implements TabExecutor {
List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size())); List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size()));
if (matches.size() == 0) { if (matches.size() == 0) {
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(commandSender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
} }

View File

@@ -18,7 +18,7 @@ public class PartyAllianceInviteCommand implements CommandExecutor {
switch (args.length) { switch (args.length) {
case 3: case 3:
String targetName = CommandUtils.getMatchedPlayerName(args[2]); String targetName = CommandUtils.getMatchedPlayerName(args[2]);
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true); McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) { if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
return false; return false;
@@ -44,7 +44,7 @@ public class PartyAllianceInviteCommand implements CommandExecutor {
return true; return true;
} }
if (!mcMMOTarget.getParty().getLeader().equalsIgnoreCase(targetName)) { if (!mcMMOTarget.getParty().getLeader().getUniqueId().equals(target.getUniqueId())) {
player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName)); player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
return true; return true;
} }

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.teleport;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
@@ -11,10 +10,10 @@ import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord; import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
@@ -43,7 +42,18 @@ public class PtpCommand implements TabExecutor {
} }
Player player = (Player) sender; Player player = (Player) sender;
if (!UserManager.hasPlayerDataKey(player)) {
return true;
}
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (!mcMMOPlayer.inParty()) {
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
return true;
}
Party party = mcMMOPlayer.getParty(); Party party = mcMMOPlayer.getParty();
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.TELEPORT)) { if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(PartyFeature.TELEPORT)) {
@@ -109,7 +119,14 @@ public class PtpCommand implements TabExecutor {
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size())); List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
if (matches.size() == 0) { 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())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
} }

View File

@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -29,12 +28,16 @@ public class InspectCommand implements TabExecutor {
switch (args.length) { switch (args.length) {
case 1: case 1:
String playerName = CommandUtils.getMatchedPlayerName(args[0]); String playerName = CommandUtils.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true); 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 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) { if (mcMMOPlayer == null) {
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); // Temporary Profile PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); // Temporary Profile
if (!CommandUtils.isLoaded(sender, profile)) {
return true;
}
if (CommandUtils.inspectOffline(sender, profile, Permissions.inspectOffline(sender))) { if (CommandUtils.inspectOffline(sender, profile, Permissions.inspectOffline(sender))) {
return true; return true;
} }
@@ -104,7 +107,7 @@ public class InspectCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default: default:
return ImmutableList.of(); return ImmutableList.of();

View File

@@ -24,6 +24,10 @@ public class MccooldownCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
switch (args.length) { switch (args.length) {
case 0: case 0:
Player player = (Player) sender; Player player = (Player) sender;

View File

@@ -2,12 +2,12 @@ package com.gmail.nossr50.commands.player;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor; import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
@@ -15,7 +15,6 @@ import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask; import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
@@ -36,6 +35,10 @@ public class McrankCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
display(sender, sender.getName()); display(sender, sender.getName());
return true; return true;
@@ -46,8 +49,12 @@ public class McrankCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
String playerName = CommandUtils.getMatchedPlayerName(args[0]); String playerName = CommandUtils.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true); McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
if (mcMMOPlayer != null) { if (mcMMOPlayer != null) {
Player player = mcMMOPlayer.getPlayer(); Player player = mcMMOPlayer.getPlayer();
@@ -73,7 +80,7 @@ public class McrankCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) { switch (args.length) {
case 1: case 1:
Set<String> playerNames = UserManager.getPlayerNames(); List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size())); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default: default:
return ImmutableList.of(); return ImmutableList.of();
@@ -83,12 +90,20 @@ public class McrankCommand implements TabExecutor {
private void display(CommandSender sender, String playerName) { private void display(CommandSender sender, String playerName) {
if (sender instanceof Player) { if (sender instanceof Player) {
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName()); 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")); sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
return; return;
} }
if (((Player) sender).hasMetadata(mcMMO.databaseCommandKey)) {
sender.sendMessage(LocaleLoader.getString("Commands.Database.Processing"));
return;
} else {
((Player) sender).setMetadata(mcMMO.databaseCommandKey, new FixedMetadataValue(mcMMO.p, null));
}
mcMMOPlayer.actualizeDatabaseATS(); mcMMOPlayer.actualizeDatabaseATS();
} }

View File

@@ -22,6 +22,10 @@ public class McstatsCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
switch (args.length) { switch (args.length) {
case 0: case 0:
Player player = (Player) sender; Player player = (Player) sender;

View File

@@ -1,27 +1,25 @@
package com.gmail.nossr50.commands.player; package com.gmail.nossr50.commands.player;
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.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask; import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.StringUtils; import com.gmail.nossr50.util.StringUtils;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
public class MctopCommand implements TabExecutor { public class MctopCommand implements TabExecutor {
@Override @Override
@@ -84,13 +82,30 @@ public class MctopCommand implements TabExecutor {
} }
if (sender instanceof Player) { if (sender instanceof Player) {
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName()); if (!CommandUtils.hasPlayerDataKey(sender)) {
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
return; return;
} }
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
double seconds = ((mcMMOPlayer.getDatabaseATS() + cooldownMillis) - System.currentTimeMillis()) / 1000;
if (seconds < 1) {
seconds = 1;
}
sender.sendMessage(LocaleLoader.formatString(LocaleLoader.getString("Commands.Database.Cooldown"), seconds));
return;
}
if (((Player) sender).hasMetadata(mcMMO.databaseCommandKey)) {
sender.sendMessage(LocaleLoader.getString("Commands.Database.Processing"));
return;
} else {
((Player) sender).setMetadata(mcMMO.databaseCommandKey, new FixedMetadataValue(mcMMO.p, null));
}
mcMMOPlayer.actualizeDatabaseATS(); mcMMOPlayer.actualizeDatabaseATS();
} }

View File

@@ -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;
}
}

View File

@@ -65,7 +65,7 @@ public class ArcheryCommand extends SkillCommand {
} }
if (canDaze) { if (canDaze) {
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier))); messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeBonusDamage)));
} }
if (canRetrieve) { if (canRetrieve) {

View File

@@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@@ -51,7 +50,6 @@ public class FishingCommand extends SkillCommand {
@Override @Override
protected void dataCalculations(Player player, float skillValue, boolean isLucky) { protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager(); FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
boolean isStorming = player.getWorld().hasStorm();
// TREASURE HUNTER // TREASURE HUNTER
if (canTreasureHunt) { if (canTreasureHunt) {
@@ -70,7 +68,7 @@ public class FishingCommand extends SkillCommand {
double totalEnchantChance = 0; double totalEnchantChance = 0;
for (Rarity rarity : Rarity.values()) { for (Rarity rarity : Rarity.values()) {
if (rarity != Rarity.TRAP || rarity != Rarity.RECORD) { if (rarity != Rarity.TRAP && rarity != Rarity.RECORD) {
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity); totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
} }
} }
@@ -92,16 +90,14 @@ public class FishingCommand extends SkillCommand {
// MASTER ANGLER // MASTER ANGLER
if (canMasterAngler) { if (canMasterAngler) {
double rawBiteChance = 1.0 / (isStorming ? 300 : 500); double rawBiteChance = 1.0 / (player.getWorld().hasStorm() ? 300 : 500);
Location location = fishingManager.getHookLocation(); Location location = fishingManager.getHookLocation();
if (location == null) { if (location == null) {
location = player.getLocation(); location = player.getLocation();
} }
Biome biome = location.getBlock().getBiome(); if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier(); rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
} }

View File

@@ -1,16 +1,15 @@
package com.gmail.nossr50.commands.skills; 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.datatypes.skills.SecondaryAbility; import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.herbalism.Herbalism; import com.gmail.nossr50.skills.herbalism.Herbalism;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class HerbalismCommand extends SkillCommand { public class HerbalismCommand extends SkillCommand {
private String greenTerraLength; private String greenTerraLength;
@@ -87,8 +86,8 @@ public class HerbalismCommand extends SkillCommand {
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HYLIAN_LUCK); hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HYLIAN_LUCK);
canGreenTerra = Permissions.greenTerra(player); canGreenTerra = Permissions.greenTerra(player);
canGreenThumbPlants = Permissions.greenThumbPlant(player, Material.CROPS) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.NETHER_WARTS) || Permissions.greenThumbPlant(player, Material.COCOA); canGreenThumbPlants = Permissions.greenThumbPlant(player, Material.WHEAT) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.BEETROOT) || Permissions.greenThumbPlant(player, Material.NETHER_WART) || Permissions.greenThumbPlant(player, Material.COCOA);
canGreenThumbBlocks = Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLE_WALL) || Permissions.greenThumbBlock(player, Material.SMOOTH_BRICK); canGreenThumbBlocks = Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLESTONE_WALL) || Permissions.greenThumbBlock(player, Material.STONE_BRICKS);
canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FARMERS_DIET); canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FARMERS_DIET);
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled(); canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB); canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);

View File

@@ -9,6 +9,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.skills.SecondaryAbility; import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.mining.BlastMining;
import com.gmail.nossr50.skills.mining.BlastMining.Tier; import com.gmail.nossr50.skills.mining.BlastMining.Tier;
import com.gmail.nossr50.skills.mining.MiningManager; import com.gmail.nossr50.skills.mining.MiningManager;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@@ -126,7 +127,7 @@ public class MiningCommand extends SkillCommand {
} }
if (canBiggerBombs) { if (canBiggerBombs) {
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.TWO); int unlockLevel = BlastMining.getBiggerBombsUnlockLevel();
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
messages.add(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)));
@@ -137,7 +138,7 @@ public class MiningCommand extends SkillCommand {
} }
if (canDemoExpert) { if (canDemoExpert) {
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.FOUR); int unlockLevel = BlastMining.getDemolitionExpertUnlockLevel();
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
messages.add(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)));

View File

@@ -1,15 +1,10 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import java.util.ArrayList; import com.gmail.nossr50.datatypes.skills.MaterialType;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.skills.SecondaryAbility; import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.ArcaneForging; import com.gmail.nossr50.skills.repair.ArcaneForging;
import com.gmail.nossr50.skills.repair.ArcaneForging.Tier; import com.gmail.nossr50.skills.repair.ArcaneForging.Tier;
import com.gmail.nossr50.skills.repair.Repair; import com.gmail.nossr50.skills.repair.Repair;
@@ -17,6 +12,11 @@ import com.gmail.nossr50.skills.repair.RepairManager;
import com.gmail.nossr50.skills.repair.repairables.Repairable; import com.gmail.nossr50.skills.repair.repairables.Repairable;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class RepairCommand extends SkillCommand { public class RepairCommand extends SkillCommand {
private String repairMasteryBonus; private String repairMasteryBonus;
@@ -26,7 +26,6 @@ public class RepairCommand extends SkillCommand {
private boolean canSuperRepair; private boolean canSuperRepair;
private boolean canMasterRepair; private boolean canMasterRepair;
private boolean canArcaneForge; private boolean canArcaneForge;
private boolean canSalvage;
private boolean canRepairStone; private boolean canRepairStone;
private boolean canRepairIron; private boolean canRepairIron;
private boolean canRepairGold; private boolean canRepairGold;
@@ -49,7 +48,7 @@ public class RepairCommand extends SkillCommand {
protected void dataCalculations(Player player, float skillValue, boolean isLucky) { protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
// We're using pickaxes here, not the best but it works // We're using pickaxes here, not the best but it works
Repairable diamondRepairable = mcMMO.getRepairableManager().getRepairable(Material.DIAMOND_PICKAXE); Repairable diamondRepairable = mcMMO.getRepairableManager().getRepairable(Material.DIAMOND_PICKAXE);
Repairable goldRepairable = mcMMO.getRepairableManager().getRepairable(Material.GOLD_PICKAXE); Repairable goldRepairable = mcMMO.getRepairableManager().getRepairable(Material.GOLDEN_PICKAXE);
Repairable ironRepairable = mcMMO.getRepairableManager().getRepairable(Material.IRON_PICKAXE); Repairable ironRepairable = mcMMO.getRepairableManager().getRepairable(Material.IRON_PICKAXE);
Repairable stoneRepairable = mcMMO.getRepairableManager().getRepairable(Material.STONE_PICKAXE); Repairable stoneRepairable = mcMMO.getRepairableManager().getRepairable(Material.STONE_PICKAXE);
@@ -77,14 +76,13 @@ public class RepairCommand extends SkillCommand {
canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SUPER_REPAIR); canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SUPER_REPAIR);
canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.REPAIR_MASTERY); canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.REPAIR_MASTERY);
canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_FORGING); canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ARCANE_FORGING);
canSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SALVAGE); canRepairDiamond = Permissions.repairMaterialType(player, MaterialType.DIAMOND);
canRepairDiamond = Permissions.repairDiamond(player); canRepairGold = Permissions.repairMaterialType(player, MaterialType.GOLD);
canRepairGold = Permissions.repairGold(player); canRepairIron = Permissions.repairMaterialType(player, MaterialType.IRON);
canRepairIron = Permissions.repairIron(player); canRepairStone = Permissions.repairMaterialType(player, MaterialType.STONE);
canRepairStone = Permissions.repairStone(player); canRepairString = Permissions.repairMaterialType(player, MaterialType.STRING);
canRepairString = Permissions.repairString(player); canRepairLeather = Permissions.repairMaterialType(player, MaterialType.LEATHER);
canRepairLeather = Permissions.repairLeather(player); canRepairWood = Permissions.repairMaterialType(player, MaterialType.WOOD);
canRepairWood = Permissions.repairWood(player);
arcaneBypass = Permissions.arcaneBypass(player); arcaneBypass = Permissions.arcaneBypass(player);
} }
@@ -122,10 +120,6 @@ public class RepairCommand extends SkillCommand {
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7"))); messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7")));
} }
if (canSalvage && Repair.salvageUnlockLevel > 0) {
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.16", Repair.salvageUnlockLevel), LocaleLoader.getString("Repair.Effect.17")));
}
if (canArcaneForge) { if (canArcaneForge) {
messages.add(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")));
} }

View File

@@ -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;
}
}

View File

@@ -4,7 +4,6 @@ import java.text.DecimalFormat;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.gmail.nossr50.util.Motd;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -18,6 +17,7 @@ import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.child.FamilyTree; import com.gmail.nossr50.skills.child.FamilyTree;
import com.gmail.nossr50.util.Motd;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.StringUtils; import com.gmail.nossr50.util.StringUtils;
import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.commands.CommandUtils;
@@ -48,6 +48,10 @@ public abstract class SkillCommand implements TabExecutor {
return true; return true;
} }
if (!CommandUtils.hasPlayerDataKey(sender)) {
return true;
}
switch (args.length) { switch (args.length) {
case 0: case 0:
Player player = (Player) sender; Player player = (Player) sender;

View File

@@ -12,6 +12,7 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.taming.Taming; import com.gmail.nossr50.skills.taming.Taming;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.StringUtils;
public class TamingCommand extends SkillCommand { public class TamingCommand extends SkillCommand {
private String goreChance; private String goreChance;
@@ -44,7 +45,7 @@ public class TamingCommand extends SkillCommand {
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
canBeastLore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BEAST_LORE); canBeastLore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.BEAST_LORE);
canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT); canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT);
canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ENVIROMENTALLY_AWARE); canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.ENVIRONMENTALLY_AWARE);
canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FAST_FOOD); canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.FAST_FOOD);
canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GORE); canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GORE);
canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHARPENED_CLAWS); canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHARPENED_CLAWS);
@@ -91,9 +92,13 @@ public class TamingCommand extends SkillCommand {
if (canCallWild) { if (canCallWild) {
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13"))); messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWOcelotCost())); int costOcelot = Config.getInstance().getTamingCOTWCost(EntityType.OCELOT);
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWWolfCost())); String itemOcelot = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT));
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWHorseCost())); int costWolf = Config.getInstance().getTamingCOTWCost(EntityType.WOLF);
String itemWolf = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF));
int costHorse = Config.getInstance().getTamingCOTWCost(EntityType.HORSE);
String itemHorse = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE));
messages.add(LocaleLoader.getString("Taming.Effect.14", costOcelot, itemOcelot, costWolf, itemWolf, costHorse, itemHorse));
} }
return messages; return messages;

View File

@@ -57,7 +57,7 @@ public class UnarmedCommand extends SkillCommand {
// IRON ARM // IRON ARM
if (canIronArm) { if (canIronArm) {
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage); ironArmBonus = Math.min(Unarmed.ironArmMinBonusDamage + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
} }
// IRON GRIP // IRON GRIP

Some files were not shown because too many files have changed in this diff Show More