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

Compare commits

..

165 Commits

Author SHA1 Message Date
nossr50
46e285bf44 Merge branch 'configurable' of github.com:mcMMO-Dev/mcmmo into configurable 2020-03-18 17:09:05 -07:00
nossr50
9a72af12b3 Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-03-18 17:05:08 -07:00
nossr50
f8dbace9f0 add comment 2020-03-17 16:00:32 -07:00
nossr50
58174d3391 dev mode 2020-03-17 15:42:25 -07:00
nossr50
7865ad8934 2.1.123 2020-03-13 15:15:00 -07:00
nossr50
d525f754a7 Add nether gold ore 2020-03-11 17:53:36 -07:00
nossr50
fd1b1fe124 treat new vines as multi block plants 2020-03-11 17:52:35 -07:00
nossr50
de71c60d6b Weeping vines fix / twisted vines added 2020-03-11 17:47:00 -07:00
nossr50
5609f1cdde update changelog 2020-03-11 17:45:18 -07:00
Shane Freeder
1bd4454a6b Show correct minimum level in adept salvage message 2020-03-07 23:20:18 +00:00
nossr50
8f8dfcf556 Update ability black lists 2020-03-03 22:32:24 -08:00
nossr50
ce1051c364 2.1.122 2020-03-03 22:24:35 -08:00
nossr50
b9d05d8d67 Move roots to herbalism xp tables 2020-03-03 22:13:34 -08:00
nossr50
3aa9f385e5 Wart blocks are now treated like leaves 2020-03-03 22:09:57 -08:00
nossr50
ff8c94bf44 2.1.121 2020-03-03 18:14:56 -08:00
nossr50
51e80f40dd sigh 2020-03-03 17:57:51 -08:00
nossr50
a7d2c901df 2.1.120 2020-03-03 17:52:18 -08:00
nossr50
325cbcad9d 2.1.120 2020-03-03 17:52:02 -08:00
nossr50
2644de5ab4 2.1.119 - 1.16 Support 2020-03-03 17:19:46 -08:00
nossr50
3a81d94b32 1.16 support part 5 2020-03-03 17:14:57 -08:00
nossr50
89a990f0cb Another dupe fix + 1.16 support part 4 2020-03-03 16:37:13 -08:00
nossr50
d585b1c2f7 1.16 support part 3 2020-03-02 14:52:51 -08:00
nossr50
1101815f18 1.16 Support part 2 2020-02-28 16:44:37 -08:00
nossr50
efea1c5d33 1.16 Support part 1 2020-02-28 16:29:11 -08:00
Shane Freeder
33e0b40e19 Merge remote-tracking branch 'origin/master' into configurable 2020-02-29 00:21:37 +00:00
nossr50
31a98791f3 dev mode 2020-02-28 15:48:48 -08:00
nossr50
c2bbe33fe8 2.1.118 2020-02-28 15:44:22 -08:00
nossr50
12abd68add Rupture fires a FakeEntityDamageByEntityEvent fixes #4122 2020-02-28 15:43:32 -08:00
nossr50
326ff1cd70 Update blast mining info in /mining 2020-02-28 15:27:57 -08:00
nossr50
9f0fe26778 Blast Mining Tweaks 2020-02-27 12:45:35 -08:00
nossr50
0a59b79ef9 Dev mode 2020-02-27 10:50:56 -08:00
nossr50
441125dbd1 2.1.117 2020-02-27 07:36:41 -08:00
nossr50
27b1c6b094 null check on player debug command 2020-02-24 17:08:23 -08:00
nossr50
db70d56493 Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-02-24 16:05:34 -08:00
nossr50
eff1ce102f Merge branch 'master' of github.com:mcMMO-Dev/mcmmo 2020-02-24 16:01:18 -08:00
nossr50
705b57a30b dev mode 2020-02-24 16:01:10 -08:00
Shane Freeder
d4ba9d7605 Reduce mojang profile API call limit (Fixes #4121) 2020-02-22 11:12:52 +00:00
nossr50
3b3396ce2c Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-02-20 17:43:58 -08:00
nossr50
4cd91350db 2.1.116 2020-02-20 17:35:33 -08:00
nossr50
b3bea7833f Merge me daddy 2020-02-20 16:22:46 -08:00
nossr50
b0c7e0368a merge master + singleton removal on ParticleEffectUtils 2020-02-20 16:15:38 -08:00
nossr50
4e895b7361 Some kyori/text stuff 2020-02-20 15:23:58 -08:00
nossr50
6168309ec9 2.1.115 2020-02-19 17:41:47 -08:00
nossr50
95c403a467 More tweaks to GT 2020-02-19 17:31:00 -08:00
nossr50
a598796c99 More tweaks to GT 2020-02-19 17:20:05 -08:00
nossr50
a333f36fd8 Fix sneak check on GT 2020-02-19 16:19:19 -08:00
nossr50
7c6d5c476d Green Thumb requires a hoe, sneak to break with a hoe 2020-02-19 16:14:21 -08:00
nossr50
e2073ff9f7 Immature crop replanting, green thumb tweaks, replant accidental break
protection
2020-02-19 15:58:53 -08:00
nossr50
8f26544188 Immature plants will be replanted if weilding a hoe 2020-02-19 13:51:10 -08:00
nossr50
4e21f1a200 tweak and fix salvage result chance 2020-02-19 13:27:21 -08:00
nossr50
ab6dbe306d Fix potential NPE for salvage 2020-02-19 11:38:48 -08:00
nossr50
19a4c0238f add sonatype 2020-02-17 19:34:10 -08:00
nossr50
c071471bdf update for text libs 2020-02-17 19:27:21 -08:00
nossr50
85550c5750 Add kashike's text lib to dependencies 2020-02-17 18:46:48 -08:00
nossr50
3c382a11ed Add showtags subcommand to nbttools 2020-02-17 18:30:09 -08:00
nossr50
f45c70b694 More work on ACF integration 2020-02-12 15:20:21 -08:00
Shane Freeder
38d64f207d Fix default permission for Critical Strikes 2020-02-12 02:06:49 +00:00
nossr50
2d342f8a3d Missing default tag 2020-02-11 15:44:52 -08:00
nossr50
3b276b59cf Merge branch 'nbt' of github.com:mcMMO-Dev/mcmmo into configurable 2020-02-10 13:20:05 -08:00
nossr50
4ff4def56a Optimize imports 2020-02-10 13:19:14 -08:00
nossr50
63de093ebb Remove debug on swing 2020-02-10 13:18:42 -08:00
nossr50
b34f0d62d6 Fixing shadow dependencies (I hope) 2020-02-10 13:13:29 -08:00
nossr50
a74f33c96d Latest changes 2020-02-09 16:06:28 -08:00
Shane Freeder
8e8024e3e1 update changelog 2020-02-09 22:50:28 +00:00
Shane Freeder
4f161812aa Use minimum level of salvagable properly 2020-02-09 22:47:20 +00:00
nossr50
24ba3b1a01 New command 'nbttools' also integrating ACF 2020-02-07 15:06:00 -08:00
nossr50
359e3e34ad Unused import 2020-02-07 13:28:17 -08:00
nossr50
ab0fc06dc2 Merge branch 'configurable' of github.com:mcMMO-Dev/mcmmo into nbt 2020-02-07 11:32:26 -08:00
Shane Freeder
11ca0d9ff1 Fix 1.13.x archery compat 2020-02-04 23:36:54 +00:00
Shane Freeder
4eef4a3e41 Fix CCE from spectral arrows (Fixes #4114) 2020-02-04 23:29:51 +00:00
Shane Freeder
816b64cb70 Track spectral arrows for combat 2020-01-28 16:37:02 +00:00
Shane Freeder
dceee5554d Fix CombatUtils NPE due to arrows from unloaded players 2020-01-28 16:33:30 +00:00
nossr50
e3edc9a18f Fix faulty WG logic 2020-01-27 20:38:52 -08:00
nossr50
aaffafb88b No more Standard or Retro, use cosmetic scale modifier setting instead 2020-01-27 20:13:36 -08:00
nossr50
2e5a12a72b Add new Cosmetic Level Scaling setting to the leveling config 2020-01-27 19:11:00 -08:00
nossr50
769a26a911 Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-01-27 19:03:24 -08:00
nossr50
8094be46c8 Dev mode 2020-01-27 19:01:08 -08:00
nossr50
2525ce9abe 2.1.114 2020-01-27 18:53:39 -08:00
nossr50
47bcd1223b Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-01-27 18:47:06 -08:00
nossr50
ea70c937f2 Fix rank for new versions of MySQL 2020-01-27 18:45:19 -08:00
nossr50
3eb160a794 Missed a few merges 2020-01-27 18:40:46 -08:00
nossr50
4b6e2c35b2 Merge branch 'master' of github.com:mcMMO-Dev/mcmmo into configurable 2020-01-27 18:36:32 -08:00
Shane Freeder
550a3df616 place SnowGolemExcavation exploit fix under the correct section 2020-01-28 00:12:50 +00:00
apachezy
657abb76a7 "EndermanEndermiteFarms" does not work. (#4111)
This error causes the "ExploitFix.EndermanEndermiteFarms" option in ExperienceConfig to not work.
2020-01-28 00:11:57 +00:00
Shane Freeder
0ffcff53b3 Further address locale issues (Targets #4083) 2020-01-26 17:48:14 +00:00
nossr50
33f4ac14b5 Add toggle for snow golem exploit to experience.yml - SnowGolemExcavation 2020-01-24 18:28:41 -08:00
nossr50
15d3119627 Berserk now breaks a soft block if it was used to activate it 2020-01-24 01:25:55 -08:00
nossr50
4fd94bfe29 2.1.113 2020-01-24 01:11:23 -08:00
nossr50
ac731258c7 Berserk now breaks glass and makes noise when doing so 2020-01-24 01:09:19 -08:00
nossr50
7b8c90d362 BlockCracker fix for infested stone bricks 2020-01-24 00:56:16 -08:00
nossr50
055391e908 Hacky fix for spigot bug 2020-01-24 00:43:18 -08:00
nossr50
cd6ce5a19d Correct changelog 2020-01-23 20:34:54 -08:00
nossr50
7441d2d8d6 Merge branch 'master' of github.com:mcMMO-Dev/mcmmo 2020-01-23 20:34:13 -08:00
nossr50
7b941baa1c Update changelog 2020-01-23 20:34:00 -08:00
Lane
0c1fa07079 Fixed typo in config for potato (#4096) 2020-01-17 07:23:28 +00:00
andrewkm
539cd7290e Retro mode documentation. (#4104)
This commit will save lives, believe me.
2020-01-17 07:21:31 +00:00
Shane Freeder
406429f4e3 Use ThreadedLocalRandom for RNG utils 2020-01-16 18:21:35 +00:00
Shane Freeder
40802e6bae Merge branch 'master' into configurable 2020-01-16 04:50:50 +00:00
t00thpick1
421a394f68 Another check for PTP exploit 2020-01-15 13:49:11 -08:00
t00thpick1
d4adb490e2 Fixing PTP exploit 2020-01-15 13:32:10 -08:00
nossr50
de5a8babc5 dev mode 2020-01-15 13:21:33 -08:00
nossr50
d892bfe83a 2.1.112 2020-01-14 20:10:33 -08:00
nossr50
ceaff0c862 SkillShot tweaks 2020-01-14 20:09:41 -08:00
nossr50
a118d8465e Sweet Berry Bush nerf 2020-01-14 19:57:38 -08:00
nossr50
7c156319be Skill Shot is now multiplicative instead of additive 2020-01-14 19:53:37 -08:00
nossr50
24b3bf1100 NPE fix for combat on unloaded profiles 2020-01-14 19:44:17 -08:00
nossr50
41bdca948a Update POM for 1.15.1 2020-01-13 19:28:28 -08:00
Shane Freeder
5441a7eb96 Add doTranslation script for easing repetative migrations 2020-01-11 16:56:39 +00:00
Shane Freeder
c45f2ce406 Merge branch 'master' into configurable 2020-01-11 16:51:38 +00:00
Shane Freeder
3cbbf1bee0 Move valid check higher up, no need to set additional metadata 2019-12-31 12:17:03 +00:00
Shane Freeder
8fd1af4cbf Don't cache mob infomation in the updater task 2019-12-31 12:16:12 +00:00
Shane Freeder
601297799f Enforce locale usage for enums to ensure correct casing (Fixes #4086) 2019-12-16 01:05:47 +00:00
nossr50
da98be88ad Update changelog 2019-12-10 21:51:41 -08:00
nossr50
1104f48ad5 2.1.111 2019-12-10 21:46:09 -08:00
nossr50
af50699de1 1.15 changes 2019-12-10 21:35:44 -08:00
Shane Freeder
1c71f1daf5 Update changelog 2019-11-13 19:56:07 +00:00
Shane Freeder
b7dd491c01 Prevent nesting of bleed damage
This commit prevents the nesting of damage event processing in general in
regards to bleed, health related stuff will need a further glance over down
the line, however; This will fix a major problematic area
2019-11-13 19:53:02 +00:00
nossr50
3ce0d7b972 dev mode 2019-11-10 19:51:47 -08:00
Robert Alan Chapton
9dcbccb010 Merge pull request #4078 from Ineusia/master
Missing Section Error Messages (Repair & Salvage Config)
2019-11-10 18:18:12 -08:00
Ineusia
c5cbab39b6 Update RepairConfig.java
Removed accidental whitespace
2019-11-10 11:56:32 -06:00
Ineusia
ca1906fbc5 Added error message for missing Salvageables section (rather than throw NPE) 2019-11-08 01:15:32 -06:00
Ineusia
7eab20ef56 Added error message for missing Repairables section (rather than throw NPE) 2019-11-08 01:11:29 -06:00
nossr50
25a9c75a5a Flesh out NBT types 2019-10-31 20:15:36 -07:00
nossr50
9911c406f8 Refactor some Type names and javadocs 2019-10-30 14:56:30 -07:00
nossr50
fdb900ec5d PlatformManager to manage the platform adapters 2019-10-30 14:38:02 -07:00
nossr50
bf94073935 Work on NBT adapters 2019-10-29 19:00:16 -07:00
nossr50
bfcc167862 Flesh out NBT types 2019-10-29 12:23:39 -07:00
nossr50
2a606b1ed1 Our own basic NBT types 2019-10-28 19:47:38 -07:00
nossr50
edc8701e35 Some JavaDocs 2019-10-22 16:13:53 -07:00
nossr50
188b0f9813 2.1.110 2019-10-18 15:48:53 -07:00
nossr50
e6c9cc6fdd Actually fixed BlockCracker + One more type of block can be cracked 2019-10-18 15:48:12 -07:00
nossr50
76ca7cc88f Additional dupe failsafes 2019-10-18 15:37:36 -07:00
nossr50
335d708848 Bump version 2019-10-18 15:24:46 -07:00
nossr50
b4179cb9a6 Fixed a dupe bug 2019-10-18 15:23:15 -07:00
Robert Alan Chapton
8bbf95e9da Merge pull request #4065 from Vyciokazz/master
locale_lt_LT.properties
2019-10-18 01:10:09 -07:00
nossr50
dc805825de 2.1.109 2019-10-17 20:16:01 -07:00
Robert Alan Chapton
871ca744d9 Merge pull request #4070 from Fabrimat/patch-4
Update locale_it.properties
2019-10-17 10:01:26 -07:00
Fabrizio La Rosa
1b091bdbd5 Update locale_it.properties
Fixed definetly /mctop and fixed special characters.
2019-10-17 13:37:00 +02:00
Robert Alan Chapton
31dc7bf03f Update build.gradle.kts 2019-10-09 12:46:04 -07:00
Shane Freeder
7be849da2a Fix compilation warnings 2019-10-06 01:16:27 +01:00
Shane Freeder
b572494c9c Remove the other deprecated PlayerProfile constructor 2019-10-06 01:07:01 +01:00
Shane Freeder
143714c9eb Remove deprecated PlayerProfile constructor 2019-10-06 01:03:07 +01:00
Robert Alan Chapton
110d9a633b Update FUNDING.yml 2019-10-02 13:26:34 -07:00
Robert Alan Chapton
584859318b Create FUNDING.yml 2019-10-02 13:06:56 -07:00
nossr50
4bff07bd2b Target the tag compound 2019-10-01 16:52:35 -07:00
nossr50
365938f351 ItemMeta needed? 2019-10-01 16:33:31 -07:00
nossr50
7f6bbadc1c Less error prone Kappa 2019-10-01 16:28:46 -07:00
nossr50
ec1fdea40d Progress??? 2019-10-01 16:23:59 -07:00
nossr50
8febe2d0bd Progress?? 2019-10-01 16:19:15 -07:00
nossr50
6e0f8f99fa Progress? 2019-10-01 15:44:58 -07:00
Robert A. C
1eb2c7b2d7 Merge pull request #4068 from ethernetcat/master
Update locale_ja_JP.properties
2019-10-01 14:37:21 -04:00
SNAKE
3310a12a95 Update locale_ja_JP.properties 2019-10-02 01:43:51 +09:00
nossr50
433f6d085d Time for a break 2019-09-30 17:53:57 -07:00
nossr50
0509f4f63e Starting work on reading NBT 2019-09-30 16:47:47 -07:00
nossr50
d2028321d4 Fixing SuperAbility strings 2019-09-30 16:11:06 -07:00
nossr50
4437f419cb Fix our TamingSummon serializer 2019-09-30 15:44:22 -07:00
nossr50
a58d875d74 Cleaning up more runtime errors during load 2019-09-30 15:28:51 -07:00
nossr50
154d0a8d50 Completely disable all Repair code pending rewrite
Repair code will be handled in a sep branch, this is being done so the
configurable branch can compile and be semi-playable for testing
important in development features.
2019-09-30 15:10:59 -07:00
nossr50
9e01a07542 Removing the hocon package 2019-09-30 14:34:38 -07:00
nossr50
f13364eb04 You missed some stuff catboy :) 2019-09-30 14:18:59 -07:00
nossr50
b763a56d75 Ignore bash scripts + Update Changelog 2019-09-30 13:59:38 -07:00
Shane Freeder
c7d2631a79 Add maven central repo 2019-09-30 21:37:33 +01:00
Shane Freeder
0cea66a084 Set version back to 2.2.0-SNAPSHOT 2019-09-30 21:26:30 +01:00
Shane Freeder
6125b3fbd2 Don't spam incompatible WG error 2019-09-27 18:57:25 +01:00
Vyciokazz
1b889b8177 locale_lt_LT.properties
I translated in Lithuanian language manny required info for player and player skils, in time i update this translation.
2019-09-18 00:14:14 +03:00
390 changed files with 6845 additions and 3215 deletions

1
.gitattributes vendored
View File

@@ -2,3 +2,4 @@
*.png binary
*.wav binary
p

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [nossr50] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: nossr50 # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://paypal.me/nossr50 # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

4
.gitignore vendored
View File

@@ -9,6 +9,10 @@ dist/
nbdist/
.nb-gradle/
### Bash Scripts
*.sh
!mcmmo-core/src/main/resources/com/gmail/nossr50/locale/doTranslation.sh
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

View File

@@ -5,6 +5,9 @@ Version 2.2.0
!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!
mcMMO's config system has been rewritten
Retro and Standard mode have been removed, now levels are based around 1-1000 and are changed based on a new setting
Added Cosmetic Level Scaling setting to the leveling config, you can use this to for example, make the max level 100 instead of 1000
mcMMO build management is now handled by Gradle (KTS) instead of Maven
Nearly every config setting has been renamed and most have brand new comments
You can now add an unlimited number of custom XP perks with custom defined XP boosts
Added new subskill to Fishing named 'Inner Peace'
@@ -199,8 +202,164 @@ Version 2.2.0
Added API method to grab the level cap of a skill by its PrimarySkillType ENUM definition
Added API method to check if a skill was being level capped
Added 'UndefinedSkillBehaviour' for trying to use a method that has no behaviour defined for the provided skill
Version 2.1.123
Added 'Nether_Gold_Ore' to Mining XP tables in experience.yml with a value of 1300
Adept Salvage message will now show the correct minimum level
'Weeping_Vines' renamed to 'Weeping_Vines_Plant' in experience.yml (no edits necessary)
'Twisted_Vines_Plant' added to Herbalism XP tables in experience.yml with a value of 10
Weeping_Vines_Plant and Twisted_Vines_Plant are now flagged as multi-block plants in Herbalism
Version 2.1.122
Changed the xp values for Nether_Wart_Block and Warped_Wart_Block from 20 to 1 for Woodcutting
Changed the xp values for Nether_Wart_Block and Warped_Wart_Block from 20 to 3 for Herbalism
mcMMO now treats Nether_Wart_Block and Warped_Wart_Block as leaves
Removed Crimson_Roots and Warped_Roots from Woodcutting XP tables in experience.yml
Added Crimson_Roots and Warped_Roots to Herbalism XP tables in experience.yml with a value of 6 XP
Fixed some start up bugs for salvage/repair
You can either edit experience.yml yourself or delete it to regenerate a new one to get the new changes
Version 2.1.121
Fixed a netherite related bug that prevented mcMMO from functioning correctly
Version 2.1.120
Fixed a bug involving the new netherite equipment
Version 2.1.119
1.16 Support
Fixed another dupe bug
Fixed a bug that can cause blast mining to give out more rewards than intended
Blast Mining rewards are now randomized but still influenced by your blast mining rank
mcMMO is now aware of turtle shell and treats it appropriately
mcMMO is now aware of chainmail armor and treats it appropriately
Calculations which change depend on the quality of your tool or armor has had netherrack support coded in
All excavation drops that can drop from soul_sand now also drop from soul_soil (edited treasures.yml)
Added netherite armor/weapons/tools to repair.vanilla.yml
Added netherite armor/weapons/tools to salvage.vanilla.yml
Added 'Bamboo_Sapling' to bonus drops for Herbalism in experience.yml
Added 'Ancient_Debris' with a value of 7777 to Mining experience tables in experience.yml
Added 'Basalt' with a value of 40 to Mining experience tables in experience.yml
Added 'Crimson_Fungus' with a value of 50 to Herbalism experience tables in experience.yml
Added 'Warped_Fungus' with a value of 50 to Herbalism experience tables in experience.yml
Added 'Warped_Nylium' with a value of 5 to Mining experience tables in experience.yml
Added 'Crimson_Nylium' with a value of 5 to Mining experience tables in experience.yml
Added 'Crimson_Stem' with a value of 35 to Woodcutting experience tables in experience.yml
Added 'Crimson_Roots' with a value of 35 to Woodcutting experience tables in experience.yml
Added 'Warped_Stem' with a value of 35 to Woodcutting experience tables in experience.yml
Added 'Warped_Roots' with a value of 35 to Woodcutting experience tables in experience.yml
Added 'Ancient_Debris' with a value of 200 to Smelting experience tables in experience.yml
Added 'Nether_Sprouts' with a value of 10 to Herbalism experience tables in experience.yml
Added 'Shroomlight' with a value of 100 to Woodcutting experience tables in experience.yml
Added 'Soul_Soil' with a value of 50 to Excavation experience tables in experience.yml
Added 'Nether_Wart_Block' with a value of 20 to Woodcutting experience tables in experience.yml
Added 'Nether_Wart_Block' with a value of 20 to Herbalism experience tables in experience.yml
Added 'Warped_Wart_Block' with a value of 20 to Woodcutting experience tables in experience.yml
Added 'Warped_Wart_Block' with a value of 20 to Herbalism experience tables in experience.yml
Added 'Weeping_Vines' with a value of 10 to Herbalism experience tables in experience.yml
Added 'Ancient_Debris' to bonus drops for Mining in config.yml
Added 'Netherite_Scrap' to bonus drops for Mining in config.yml
Added 'Crimson_Fungus' to bonus drops for Herbalism in config.yml
Added 'Warped_Fungus' to bonus drops for Herbalism in config.yml
Added 'Warped_Nylium' to bonus drops for Mining in config.yml
Added 'Crimson_Nylium' to bonus drops for Mining in config.yml
Added 'Crimson_Stem' to bonus drops for Woodcutting in config.yml
Added 'Warped_Stem' to bonus drops for Woodcutting in config.yml
Added 'Shroomlight' to bonus drops for Woodcutting in config.yml
NOTES: You will likely need to update repair.vanilla.yml, salvage.vanilla.yml and treasures.yml
You can just delete those config files to regenerate them fresh which is much faster if you don't have any custom settings in those files
Here are the default configuration files if you wish to compare them to your own servers settings while updating your configs.
https://paste.gg/p/anonymous/bf8ba1a24c8c4f188da5f8b8ebfc2b35 (Keep scrolling)
Netherrack is repaired using netherrack scraps for now, wait for 2.2 for a better version of repair.
Netherrack salvages into netherrack scraps for now, wait for 2.2 for a better version of salvage.
Repairing chainmail/etc will be tackled in 2.2 so don't expect that in this version
Version 2.1.118
Fixed another dupe bug
Blast Mining no longer reduces debris from explosions due to some issues with the Bukkit API
Modified locale string 'Mining.Blast.Effect' to remove debris reduction mention
Rupture now fires a FakeEntityDamageByEntityEvent before damaging its victims (cancelling it will be ignored)
Version 2.1.117
Fixed a rare http error when polling Mojang for UUIDs
Fixed a bug that allowed duping
Version 2.1.116
Fixed directional plants not maintaining their direction when replanted
Version 2.1.115
Green Thumb now requires a hoe to activate
Hoes no longer give free replants
You can sneak to break plants with a hoe in your hand (or just put the hoe away)
Using a hoe on non-fully grown crops will replant them as a convenience feature
New sound option in sounds.yml called 'ITEM_CONSUMED', plays when eating seeds for Green Thumb
Cocoa plants now require GT of at least 2 to start at the second stage of growth
Green Terra now boosts growth on Green Thumb by 1 stage (doesn't go above the maximum value though)
There is now a feature in place to prevent breaking a newly automatically replanted (via green thumb) crop from being breakable for a few seconds after it appears
Fixed a bug where Salvage always gave the best results
Fixed an issue with arrows causing exceptions with players not yet having data loaded
Spectral arrows are now tracked by mcMMO
Use minimum level of salvageable properly
Fix Axes Critical Strikes default permissions ( new fixed permission: mcmmo.ability.axes.criticalstrikes )
Fix potential null pointer exception for salvage
Updated locale entry 'Herbalism.SubSkill.GreenTerra.Description'
Version 2.1.114
Fix some more locale usages, should aim to further prevent issues with oddball locales
Fixed a bug where newer versions of MySQL did not like our rank command
Added a new setting to turn off the Snow Golem Exploit prevention to experience.yml next to the other exploit fixes
Fixed a bug which stopped the optional Endermite XP exploit fix from working
Version 2.1.113
Activating Berserk on a soft block (glass, snow, dirts) will break that material right away instead of only breaking subsequent blocks hit by the player
Berserk will now break glass and glass pane blocks
Hitting glass with berserk readied will activate it
Added GLASS settings to sounds.yml for Berserk
Fixed bug where BlockCracker didn't work on infested_stone_bricks
Fixed a bug where beacons could be duplicated
Check player's PTP world permissions before executing a party teleport
Improved how mcMMO handles randomness
Version 2.1.112
Correct locale usage for enum access, now enforces using the english locale to prevent issues with oddball locales for configs/commands
Fixed a NPE that can occur if a player engages in combat with specific skills before their profile is loaded
mcMMO is now more compatible with certain mob stacking plugins
Improved behaviour for mob health bars
Archery's Skill Shot bonus damage is now multiplicative instead of additive (nerfing early game skill shot ranks)
Sweet Berry Bush's default Herbalism XP is now 50 instead of 300 (Update your experience.yml or delete it to generate a new one)
Version 2.1.111
mcMMO is compatible with the following versions of MC: 1.15 / 1.14.4 / 1.14.3 / 1.14.2 / 1.14.1 / 1.14 / 1.13.2
Further prevent nesting of bleed damage calls
Warn about reparable/salvage configs with missing sections
Added Bee combat experience modifier to experience.yml (Update your experience.yml file, see notes)
Breaking a Bee Nest will result in Herbalism XP (Update your experience.yml file, see notes)
Breeding bees will now result in Taming XP (Update your experience.yml file, see notes)
NOTES:
You will need to update your experience.yml by hand or delete it to get XP from new things in 1.15
The default version of mcMMO's experience.yml looks like this: https://paste.gg/p/anonymous/15c34df6e60d45d9a3508b379a5e6514
You'll want to add Bee to combat XP section, and Bee_Nest to Herbalism XP, and Bee to Taming XP section.
Version 2.1.110
Fixed a dupe bug
Actually fixed Block Cracker
You can now crack Infested Stone Bricks with Block Cracker
Added Lithuanian locale (thanks Vyciokazz)
Version 2.1.109
Block Cracker will now correctly crack stone_bricks during Berserk again
Added Lily_Of_The_Valley to the Bonus Drops list in config.yml (you'll probably want to add this manually) which enables it to double drop
Added missing 1.14 blocks to ability/tool activation blacklists
Fixed spamming of incompatible worldguard version message
Updated Italian locale (thanks Fabrimat)
Version 2.1.108
Fixed an amusing exploit for easy leveling in Acrobatics

View File

@@ -5,11 +5,15 @@ subprojects {
repositories {
mavenLocal()
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.spongepowered.org/maven")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshoits")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
maven("https://repo.codemc.org/repository/maven-public")
maven("https://maven.sk89q.com/repo")
maven("https://mvnrepository.com/artifact/org.jetbrains/annotations")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
}
tasks {
@@ -23,4 +27,4 @@ subprojects {
sourceCompatibility = JavaVersion.VERSION_1_8
}
}
}

View File

@@ -1,4 +1,4 @@
version=2.3.0-SNAPSHOT
version=2.2.0-SNAPSHOT
group=com.gmail.nossr50.mcMMO
artifactId=mcMMO
name=mcMMO

View File

@@ -1,3 +1,4 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
@@ -7,10 +8,6 @@ plugins {
tasks {
build {
dependsOn(shadowJar)
}
shadowJar {
dependencies {
include(dependency("org.spongepowered:configurate-yaml"))
@@ -20,12 +17,24 @@ tasks {
include(dependency("org.apache.tomcat:tomcat-jdbc"))
include(dependency("org.apache.tomcat:tomcat-juli"))
include(dependency("com.typesafe:config"))
include(dependency("co.aikar:acf-core"))
include(dependency("co.aikar:acf-bukkit"))
include(dependency("net.kyori:text-api"))
include(dependency("net.kyori:text-adapter-bukkit"))
include(dependency("net.kyori:text-serializer-gson"))
exclude(dependency("org.spigotmc:spigot"))
}
relocate("org.apache.commons.logging", "com.gmail.nossr50.commons.logging")
relocate("org.apache.juli", "com.gmail.nossr50.database.tomcat.juli")
relocate("org.apache.tomcat", "com.gmail.nossr50.database.tomcat")
relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
relocate("co.aikar.commands", "com.gmail.nossr50.aikar.commands")
relocate("co.aikar.locales", "com.gmail.nossr50.aikar.locales")
relocate("co.aikar.table", "com.gmail.nossr50.aikar.table")
relocate("net.jodah.expiringmap", "com.gmail.nossr50.expiringmap")
relocate("net.kyori.text", "com.gmail.nossr50.kyoripowered.text")
mergeServiceFiles()
}
processResources {
@@ -34,6 +43,16 @@ tasks {
}
}
build {
dependsOn(shadowJar)
}
}
tasks.named<ShadowJar>("shadowJar") {
dependencies{
include { true }
}
}
@@ -43,6 +62,11 @@ dependencies {
api("org.spongepowered:configurate-core:3.7-SNAPSHOT")
api("org.spongepowered:configurate-yaml:3.7-SNAPSHOT")
api("org.spongepowered:configurate-hocon:3.7-SNAPSHOT")
api("co.aikar:acf-core:0.5.0-SNAPSHOT") //Don't change without updating the artifacts for its dependencies (see the other comments)
api("co.aikar:acf-paper:0.5.0-SNAPSHOT") //Don't change without updating the artifacts for its dependencies (see the other comments)
api("net.kyori:text-api:3.0.2")
api("net.kyori:text-serializer-gson:3.0.2")
api("net.kyori:text-adapter-bukkit:3.0.4-SNAPSHOT")
implementation("org.jetbrains:annotations:17.0.0")
implementation("org.apache.maven.scm:maven-scm-provider-gitexe:1.8.1")
implementation("org.bstats:bstats-bukkit:1.4")

View File

@@ -1,26 +1,26 @@
package com.gmail.nossr50.bukkit;
import com.gmail.nossr50.datatypes.items.BukkitMMOItem;
import com.gmail.nossr50.datatypes.items.MMOItem;
import com.gmail.nossr50.util.nbt.NBTManager;
import com.gmail.nossr50.util.nbt.RawNBT;
import org.bukkit.inventory.ItemStack;
/**
* Used to convert or construct platform independent types into Bukkit types
*/
public class BukkitFactory {
/**
* Creates a BukkitMMOItem which contains Bukkit implementations for the type MMOItem
* @return a new BukkitMMOItem
*/
public static MMOItem<?> createItem(String namespaceKey, int amount, RawNBT rawNBT) {
return new BukkitMMOItem(namespaceKey, amount, rawNBT);
}
public static MMOItem<?> createItem(ItemStack itemStack) {
return createItem(itemStack.getType().getKey().toString(), itemStack.getAmount(), new RawNBT(NBTManager.getNBT(itemStack).toString()));
}
}
//package com.gmail.nossr50.bukkit;
//
//import com.gmail.nossr50.datatypes.items.BukkitMMOItem;
//import com.gmail.nossr50.datatypes.items.MMOItem;
//import com.gmail.nossr50.util.nbt.NBTManager;
//import com.gmail.nossr50.util.nbt.RawNBT;
//import org.bukkit.inventory.ItemStack;
//
///**
// * Used to convert or construct platform independent types into Bukkit types
// */
//public class BukkitFactory {
//
// /**
// * Creates a BukkitMMOItem which contains Bukkit implementations for the type MMOItem
// * @return a new BukkitMMOItem
// */
// public static MMOItem<?> createItem(String namespaceKey, int amount, RawNBT rawNBT) {
// return new BukkitMMOItem(namespaceKey, amount, rawNBT);
// }
//
// public static MMOItem<?> createItem(ItemStack itemStack) {
// return createItem(itemStack.getType().getKey().toString(), itemStack.getAmount(), new RawNBT(NBTManager.getNBT(itemStack).toString()));
// }
//
//}

View File

@@ -0,0 +1,93 @@
package com.gmail.nossr50.commands.admin;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.*;
import com.gmail.nossr50.mcMMO;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.bukkit.TextAdapter;
import net.kyori.text.format.TextColor;
import net.kyori.text.serializer.gson.GsonComponentSerializer;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@CommandAlias("nbttools")
@Description("Read or Modify values of NBT on an item in-hand")
public class NBTToolsCommand extends BaseCommand {
public static final String STYLE_TEXT_1 = "//////////";
@Dependency
private mcMMO plugin;
@Default
@CommandPermission("mcmmo.commands.nbttools")
public void onCommand(Player player) {
//TODO: Add some help messages
player.sendMessage("hi");
}
/**
* Show the NBT tags of an item in hand
*/
@Subcommand("tags show")
public void onShowTags(Player player) {
final TextComponent textComponent = TextComponent.builder()
.content(plugin.getLocaleManager().getString("mcMMO.Template.Prefix"))
.append("NBT Tools")
.color(TextColor.GOLD)
.append(" - ")
.append("Showing NBT Tags (")
.append(player.getInventory().getItemInMainHand().getType().getKey().toString())
.color(TextColor.GREEN)
.append(")")
.color(TextColor.GOLD)
.append(TextComponent.newline())
.build();
String json = GsonComponentSerializer.INSTANCE.serialize(textComponent);
TextAdapter.sendMessage(player, textComponent);
//Show NBT tags to player
player.sendMessage(STYLE_TEXT_1 + " NBT TOOLS " + STYLE_TEXT_1);
player.sendMessage("NBT Analysis: " + player.getInventory().getItemInMainHand().getType().getKey().toString());
player.sendMessage(STYLE_TEXT_1 + STYLE_TEXT_1);
plugin.getNbtManager().printNBT(player.getInventory().getItemInMainHand(), player);
player.sendMessage(ChatColor.GRAY + "NBT Analysis completed!");
}
@Subcommand("tags set")
public void onAddTags(Player player, String[] args) {
if(args.length == 0) {
player.sendMessage("No arguments provided!");
} else if(args.length == 1) {
player.sendMessage("Not enough arguments provided!");
} else {
player.sendMessage("Modifying NBT on item in hand...");
String targetTag = args[0];
//Check for the tag
}
}
@Subcommand("tags remove")
public void onRemoveTags(Player player, String[] args) {
if(args.length == 0) {
player.sendMessage("No arguments provided!");
} else if(args.length == 1) {
player.sendMessage("Not enough arguments provided!");
} else {
player.sendMessage("Modifying NBT on item in hand...");
String targetTag = args[0];
//Check for the tag
}
}
@Subcommand("tags clear")
public void onClearTags(Player player) {
//Clear all NBT tags that fall under "tag" on the item
player.sendMessage("Clearing NBT on item...");
}
}

View File

@@ -1,20 +0,0 @@
package com.gmail.nossr50.commands.admin;
import com.gmail.nossr50.mcMMO;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
public class PlayerDebug implements CommandExecutor {
private final mcMMO pluginRef;
public PlayerDebug(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
return false;
}
}

View File

@@ -1,29 +1,36 @@
package com.gmail.nossr50.commands.admin;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.CommandAlias;
import co.aikar.commands.annotation.Default;
import co.aikar.commands.annotation.Dependency;
import co.aikar.commands.annotation.Description;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.mcMMO;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class PlayerDebugCommand implements CommandExecutor {
private final mcMMO pluginRef;
@CommandAlias("mmodebug")
@Description("Puts the player into debug mode, which helps problem solve bugs in mcMMO.")
public class PlayerDebugCommand extends BaseCommand {
public PlayerDebugCommand(mcMMO pluginRef) {
this.pluginRef = pluginRef;
}
@Dependency
private mcMMO plugin;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
@Default
public void onCommand(CommandSender sender) {
if(sender instanceof Player) {
McMMOPlayer mcMMOPlayer = pluginRef.getUserManager().getPlayer((Player) sender);
McMMOPlayer mcMMOPlayer = plugin.getUserManager().getPlayer((Player) sender);
if(mcMMOPlayer == null)
return;
mcMMOPlayer.toggleDebugMode(); //Toggle debug mode
pluginRef.getNotificationManager().sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.Mmodebug.Toggle", String.valueOf(mcMMOPlayer.isDebugMode()));
return true;
plugin.getNotificationManager().sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.Mmodebug.Toggle", String.valueOf(mcMMOPlayer.isDebugMode()));
} else {
return false;
//TODO: Localize
sender.sendMessage("Players only");
}
}

View File

@@ -11,6 +11,8 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Locale;
public class PartyItemShareCommand implements CommandExecutor {
private final mcMMO pluginRef;
@@ -35,7 +37,7 @@ public class PartyItemShareCommand implements CommandExecutor {
switch (args.length) {
case 2:
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase(Locale.ENGLISH));
if (mode == null) {
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "party", "itemshare", "<NONE | EQUAL | RANDOM>"));
@@ -58,7 +60,7 @@ public class PartyItemShareCommand implements CommandExecutor {
}
try {
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase()), toggle);
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase(Locale.ENGLISH)), toggle);
} catch (IllegalArgumentException ex) {
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
}

View File

@@ -7,6 +7,7 @@ import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.mcMMO;
import com.google.common.collect.ImmutableList;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -159,6 +160,22 @@ public class PtpCommand implements TabExecutor {
McMMOPlayer mcMMOTarget = pluginRef.getUserManager().getPlayer(targetName);
Player target = mcMMOTarget.getPlayer();
if (pluginRef.getConfigManager().getConfigParty().getPTP().isPtpWorldBasedPermissions()) {
World targetWorld = target.getWorld();
World playerWorld = player.getWorld();
if (!pluginRef.getPermissionTools().partyTeleportAllWorlds(player)) {
if (!pluginRef.getPermissionTools().partyTeleportWorld(target, targetWorld)) {
player.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
return;
}
else if (targetWorld != playerWorld && !pluginRef.getPermissionTools().partyTeleportWorld(player, targetWorld)) {
player.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
return;
}
}
}
PartyTeleportRecord ptpRecord = mcMMOTarget.getPartyTeleportRecord();
if (!ptpRecord.isConfirmRequired()) {

View File

@@ -20,7 +20,7 @@ public class MiningCommand extends SkillCommand {
private int bonusTNTDrops;
private double blastRadiusIncrease;
private String oreBonus;
private String debrisReduction;
// private String debrisReduction;
private String blastDamageDecrease;
private boolean canSuperBreaker;
@@ -42,7 +42,7 @@ public class MiningCommand extends SkillCommand {
blastMiningRank = miningManager.getBlastMiningTier();
bonusTNTDrops = miningManager.getDropMultiplier();
oreBonus = percent.format(miningManager.getOreBonus() / 30.0D); // Base received in TNT is 30%
debrisReduction = percent.format(miningManager.getDebrisReduction() / 30.0D); // Base received in TNT is 30%
// debrisReduction = percent.format(miningManager.getDebrisReduction() / 30.0D); // Base received in TNT is 30%
blastDamageDecrease = percent.format(miningManager.getBlastDamageModifier() / 100.0D);
blastRadiusIncrease = miningManager.getBlastRadiusModifier();
}
@@ -81,8 +81,7 @@ public class MiningCommand extends SkillCommand {
}
if (canBlast) {
messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(pluginRef.getRankTools().getHighestRank(SubSkillType.MINING_BLAST_MINING)), pluginRef.getLocaleManager().getString("SuperAbility.BlastMining.Effect", oreBonus, debrisReduction, bonusTNTDrops)));
//messages.add(pluginRef.getLocaleManager().getString("SuperAbility.BlastMining.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), pluginRef.getLocaleManager().getString("SuperAbility.BlastMining.Effect", oreBonus, debrisReduction, bonusTNTDrops)));
messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(pluginRef.getRankTools().getHighestRank(SubSkillType.MINING_BLAST_MINING)), pluginRef.getLocaleManager().getString("SuperAbility.BlastMining.Effect", oreBonus, bonusTNTDrops)));
}
if (canDemoExpert) {

View File

@@ -19,6 +19,7 @@ import org.bukkit.entity.Player;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Set;
public abstract class SkillCommand implements TabExecutor {
@@ -131,7 +132,7 @@ public abstract class SkillCommand implements TabExecutor {
}
}
player.sendMessage(pluginRef.getLocaleManager().getString("Guides.Available", skillName, skillName.toLowerCase()));
player.sendMessage(pluginRef.getLocaleManager().getString("Guides.Available", skillName, skillName.toLowerCase(Locale.ENGLISH)));
}
private void sendSkillCommandHeader(Player player, McMMOPlayer mcMMOPlayer, int skillValue) {
@@ -223,10 +224,10 @@ public abstract class SkillCommand implements TabExecutor {
String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription(pluginRef) : subSkillType.getLocaleKeyStatExtraDescription(pluginRef);
if (isCustom)
return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, vars));
return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, (Object[]) vars));
else {
String[] mergedList = pluginRef.getNotificationManager().addItemToFirstPositionOfArray(pluginRef.getLocaleManager().getString(statDescriptionKey), vars);
return pluginRef.getLocaleManager().getString(templateKey, mergedList);
return pluginRef.getLocaleManager().getString(templateKey, (Object[]) mergedList);
}
}

View File

@@ -17,10 +17,10 @@ public class SkillGuideCommand implements CommandExecutor {
private final mcMMO pluginRef;
public SkillGuideCommand(PrimarySkillType primarySkillType, mcMMO pluginRef) {
this.pluginRef = pluginRef;
header = pluginRef.getLocaleManager().getString("Guides.Header", pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType));
guide = getGuide(primarySkillType);
invalidPage = pluginRef.getLocaleManager().getString("Guides.Page.Invalid");
this.pluginRef = pluginRef;
}
@Override

View File

@@ -1,68 +1,60 @@
package com.gmail.nossr50.config;
import com.gmail.nossr50.config.hocon.SerializedConfigLoader;
import com.gmail.nossr50.config.hocon.admin.ConfigAdmin;
import com.gmail.nossr50.config.hocon.antiexploit.ConfigExploitPrevention;
import com.gmail.nossr50.config.hocon.backup.ConfigAutomatedBackups;
import com.gmail.nossr50.config.hocon.commands.ConfigCommands;
import com.gmail.nossr50.config.hocon.database.ConfigDatabase;
import com.gmail.nossr50.config.hocon.donation.ConfigAuthorAdvertisements;
import com.gmail.nossr50.config.hocon.event.ConfigEvent;
import com.gmail.nossr50.config.hocon.experience.ConfigExperience;
import com.gmail.nossr50.config.hocon.hardcore.ConfigHardcore;
import com.gmail.nossr50.config.hocon.items.ConfigItems;
import com.gmail.nossr50.config.hocon.language.ConfigLanguage;
import com.gmail.nossr50.config.hocon.metrics.ConfigMetrics;
import com.gmail.nossr50.config.hocon.mobs.ConfigMobs;
import com.gmail.nossr50.config.hocon.motd.ConfigMOTD;
import com.gmail.nossr50.config.hocon.notifications.ConfigNotifications;
import com.gmail.nossr50.config.hocon.notifications.PlayerNotificationSettings;
import com.gmail.nossr50.config.hocon.particles.ConfigParticles;
import com.gmail.nossr50.config.hocon.party.ConfigParty;
import com.gmail.nossr50.config.hocon.party.data.ConfigPartyData;
import com.gmail.nossr50.config.hocon.playerleveling.ConfigLeveling;
import com.gmail.nossr50.config.hocon.scoreboard.ConfigScoreboard;
import com.gmail.nossr50.config.hocon.serializers.*;
import com.gmail.nossr50.config.hocon.skills.acrobatics.ConfigAcrobatics;
import com.gmail.nossr50.config.hocon.skills.alchemy.ConfigAlchemy;
import com.gmail.nossr50.config.hocon.skills.archery.ConfigArchery;
import com.gmail.nossr50.config.hocon.skills.axes.ConfigAxes;
import com.gmail.nossr50.config.hocon.skills.coreskills.ConfigCoreSkills;
import com.gmail.nossr50.config.hocon.skills.exampleconfigs.ConfigNameRegisterDefaults;
import com.gmail.nossr50.config.hocon.skills.exampleconfigs.MinecraftMaterialWrapper;
import com.gmail.nossr50.config.hocon.skills.excavation.ConfigExcavation;
import com.gmail.nossr50.config.hocon.skills.fishing.ConfigFishing;
import com.gmail.nossr50.config.hocon.skills.herbalism.ConfigHerbalism;
import com.gmail.nossr50.config.hocon.skills.mining.ConfigMining;
import com.gmail.nossr50.config.hocon.skills.ranks.ConfigRanks;
import com.gmail.nossr50.config.hocon.skills.ranks.SkillRankProperty;
import com.gmail.nossr50.config.hocon.skills.repair.ConfigRepair;
import com.gmail.nossr50.config.hocon.skills.salvage.ConfigSalvage;
import com.gmail.nossr50.config.hocon.skills.smelting.ConfigSmelting;
import com.gmail.nossr50.config.hocon.skills.swords.ConfigSwords;
import com.gmail.nossr50.config.hocon.skills.taming.ConfigTaming;
import com.gmail.nossr50.config.hocon.skills.unarmed.ConfigUnarmed;
import com.gmail.nossr50.config.hocon.skills.woodcutting.ConfigWoodcutting;
import com.gmail.nossr50.config.hocon.sound.ConfigSound;
import com.gmail.nossr50.config.hocon.sound.SoundSetting;
import com.gmail.nossr50.config.hocon.superabilities.ConfigSuperAbilities;
import com.gmail.nossr50.config.hocon.worldblacklist.ConfigWorldBlacklist;
import com.gmail.nossr50.config.admin.ConfigAdmin;
import com.gmail.nossr50.config.antiexploit.ConfigExploitPrevention;
import com.gmail.nossr50.config.backup.ConfigAutomatedBackups;
import com.gmail.nossr50.config.commands.ConfigCommands;
import com.gmail.nossr50.config.database.ConfigDatabase;
import com.gmail.nossr50.config.donation.ConfigAuthorAdvertisements;
import com.gmail.nossr50.config.event.ConfigEvent;
import com.gmail.nossr50.config.experience.ConfigExperience;
import com.gmail.nossr50.config.hardcore.ConfigHardcore;
import com.gmail.nossr50.config.items.ConfigItems;
import com.gmail.nossr50.config.language.ConfigLanguage;
import com.gmail.nossr50.config.metrics.ConfigMetrics;
import com.gmail.nossr50.config.mobs.ConfigMobs;
import com.gmail.nossr50.config.motd.ConfigMOTD;
import com.gmail.nossr50.config.notifications.ConfigNotifications;
import com.gmail.nossr50.config.notifications.PlayerNotificationSettings;
import com.gmail.nossr50.config.particles.ConfigParticles;
import com.gmail.nossr50.config.party.ConfigParty;
import com.gmail.nossr50.config.party.data.ConfigPartyData;
import com.gmail.nossr50.config.playerleveling.ConfigLeveling;
import com.gmail.nossr50.config.scoreboard.ConfigScoreboard;
import com.gmail.nossr50.config.serializers.*;
import com.gmail.nossr50.config.skills.acrobatics.ConfigAcrobatics;
import com.gmail.nossr50.config.skills.alchemy.ConfigAlchemy;
import com.gmail.nossr50.config.skills.archery.ConfigArchery;
import com.gmail.nossr50.config.skills.axes.ConfigAxes;
import com.gmail.nossr50.config.skills.coreskills.ConfigCoreSkills;
import com.gmail.nossr50.config.skills.exampleconfigs.ConfigNameRegisterDefaults;
import com.gmail.nossr50.config.skills.exampleconfigs.MinecraftMaterialWrapper;
import com.gmail.nossr50.config.skills.excavation.ConfigExcavation;
import com.gmail.nossr50.config.skills.fishing.ConfigFishing;
import com.gmail.nossr50.config.skills.herbalism.ConfigHerbalism;
import com.gmail.nossr50.config.skills.mining.ConfigMining;
import com.gmail.nossr50.config.skills.ranks.ConfigRanks;
import com.gmail.nossr50.config.skills.ranks.SkillRankProperty;
import com.gmail.nossr50.config.skills.repair.ConfigRepair;
import com.gmail.nossr50.config.skills.salvage.ConfigSalvage;
import com.gmail.nossr50.config.skills.smelting.ConfigSmelting;
import com.gmail.nossr50.config.skills.swords.ConfigSwords;
import com.gmail.nossr50.config.skills.taming.ConfigTaming;
import com.gmail.nossr50.config.skills.unarmed.ConfigUnarmed;
import com.gmail.nossr50.config.skills.woodcutting.ConfigWoodcutting;
import com.gmail.nossr50.config.sound.ConfigSound;
import com.gmail.nossr50.config.sound.SoundSetting;
import com.gmail.nossr50.config.superabilities.ConfigSuperAbilities;
import com.gmail.nossr50.config.worldblacklist.ConfigWorldBlacklist;
import com.gmail.nossr50.datatypes.experience.CustomXPPerk;
import com.gmail.nossr50.datatypes.experience.FormulaType;
import com.gmail.nossr50.datatypes.items.ItemMatch;
import com.gmail.nossr50.datatypes.items.ItemWildcards;
import com.gmail.nossr50.datatypes.items.MMOItem;
import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.properties.DamageProperty;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
import com.gmail.nossr50.datatypes.skills.subskills.taming.TamingSummon;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.RepairTransaction;
import com.gmail.nossr50.skills.repair.SimpleRepairCost;
import com.gmail.nossr50.skills.repair.repairables.Repairable;
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
import com.gmail.nossr50.util.nbt.RawNBT;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializerCollection;
@@ -259,25 +251,25 @@ public final class ConfigManager {
customSerializers.registerType(new TypeToken<Material>() {}, new CustomEnumValueSerializer());
customSerializers.registerType(new TypeToken<PartyFeature>() {}, new CustomEnumValueSerializer());
customSerializers.registerType(new TypeToken<FormulaType>() {}, new CustomEnumValueSerializer());
customSerializers.registerType(new TypeToken<MMOItem<?>>() {}, new ItemStackSerializer());
customSerializers.registerType(new TypeToken<CallOfTheWildType>() {}, new CustomEnumValueSerializer());
// customSerializers.registerType(new TypeToken<MMOItem<?>>() {}, new ItemStackSerializer());
customSerializers.registerType(new TypeToken<Set<?>>() {}, new SetSerializer());
customSerializers.registerType(new TypeToken<ItemMatch<?>>() {}, new CustomItemTargetSerializer());
customSerializers.registerType(new TypeToken<SimpleRepairCost>() {}, new SimpleRepairCostSerializer());
// customSerializers.registerType(new TypeToken<ItemMatch<?>>() {}, new CustomItemTargetSerializer());
// customSerializers.registerType(new TypeToken<SimpleRepairCost>() {}, new SimpleRepairCostSerializer());
customSerializers.registerType(TypeToken.of(TamingSummon.class), new TamingSummonSerializer());
customSerializers.registerType(TypeToken.of(Repairable.class), new RepairableSerializer());
// customSerializers.registerType(TypeToken.of(Repairable.class), new RepairableSerializer());
customSerializers.registerType(TypeToken.of(Salvageable.class), new SalvageableSerializer());
customSerializers.registerType(TypeToken.of(MinecraftMaterialWrapper.class), new MinecraftMaterialWrapperSerializer());
customSerializers.registerType(TypeToken.of(CustomXPPerk.class), new CustomXPPerkSerializer());
customSerializers.registerType(TypeToken.of(DamageProperty.class), new DamagePropertySerializer());
customSerializers.registerType(TypeToken.of(SkillRankProperty.class), new SkillRankPropertySerializer());
customSerializers.registerType(TypeToken.of(MaxBonusLevel.class), new MaxBonusLevelSerializer());
customSerializers.registerType(TypeToken.of(PlayerNotificationSettings.class), new PlayerNotificationSerializer());
customSerializers.registerType(TypeToken.of(SoundSetting.class), new SoundSettingSerializer());
customSerializers.registerType(TypeToken.of(ItemWildcards.class), new ItemWildcardSerializer());
customSerializers.registerType(TypeToken.of(RepairTransaction.class), new RepairTransactionSerializer());
customSerializers.registerType(TypeToken.of(RawNBT.class), new RawNBTSerializer());
// customSerializers.registerType(TypeToken.of(ItemWildcards.class), new ItemWildcardSerializer());
// customSerializers.registerType(TypeToken.of(RepairTransaction.class), new RepairTransactionSerializer());
// customSerializers.registerType(TypeToken.of(RawNBT.class), new RawNBTSerializer());
}
/**
@@ -489,17 +481,6 @@ public final class ConfigManager {
return configRanks.getRootNode();
}
/**
* Checks if this plugin is using retro mode
* Retro mode is a 0-1000 skill system
* Standard mode is scaled for 1-100
*
* @return true if retro mode is enabled
*/
public boolean isRetroMode() {
return getConfigLeveling().getConfigSectionLevelingGeneral().getConfigSectionLevelScaling().isRetroModeEnabled();
}
public ConfigExperience getConfigExperience() {
return configExperience.getConfig();
}

View File

@@ -1,9 +1,8 @@
package com.gmail.nossr50.config.hocon;
package com.gmail.nossr50.config;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class General {
}

View File

@@ -1,7 +1,9 @@
package com.gmail.nossr50.config.hocon;
package com.gmail.nossr50.config;
import com.gmail.nossr50.util.StringUtils;
import java.util.Locale;
public final class HOCONUtil {
public static String serializeENUMName(String hyphenedString) {
@@ -24,7 +26,7 @@ public final class HOCONUtil {
for (int x = 0; x < split.length; x++) {
if (x + 1 >= split.length)
formattedString.append(split[x].toUpperCase());
formattedString.append(split[x].toUpperCase(Locale.ENGLISH));
else
formattedString.append(split[x]).append('_');
}

View File

@@ -1,6 +1,5 @@
package com.gmail.nossr50.config.hocon;
package com.gmail.nossr50.config;
import com.gmail.nossr50.config.ConfigConstants;
import com.gmail.nossr50.mcMMO;
import ninja.leaping.configurate.ConfigurationOptions;
import ninja.leaping.configurate.ValueType;

View File

@@ -1,15 +1,16 @@
package com.gmail.nossr50.config;
import com.gmail.nossr50.config.hocon.SerializedConfigLoader;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.StringUtils;
import java.util.Locale;
public class SkillConfigFactory {
protected static SerializedConfigLoader initSkillConfig(mcMMO pluginRef, PrimarySkillType primarySkillType, Class<?> clazz) {
return new SerializedConfigLoader(pluginRef, clazz,
primarySkillType.toString().toLowerCase() + ".conf",
primarySkillType.toString().toLowerCase(Locale.ENGLISH) + ".conf",
StringUtils.getCapitalized(primarySkillType.toString()),
null);
}

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.admin;
package com.gmail.nossr50.config.admin;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.admin;
package com.gmail.nossr50.config.admin;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -119,4 +119,8 @@ public class ConfigExploitPrevention {
public ConfigSectionExploitTaming getConfigSectionExploitTaming() {
return configSectionExploitSkills.getConfigSectionExploitTaming();
}
public boolean isSnowGolemExploitPrevented() {
return configSectionExploitSkills.isSnowGolemExploitPrevented();
}
}

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -0,0 +1,17 @@
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionExploitExcavation {
public static final boolean DEFAULT_SNOW_GOLEM = true;
@Setting(value = "Snow-Golem-Exploit", comment = "If set to true, the snow made by snow golems will not reward XP." +
"\nDefault value: "+DEFAULT_SNOW_GOLEM)
private boolean snowGolemExploit = DEFAULT_SNOW_GOLEM;
public boolean isSnowGolemExploitPrevented() {
return snowGolemExploit;
}
}

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -26,6 +26,9 @@ public class ConfigSectionExploitSkills {
@Setting(value = "Taming", comment = "Exploit settings related to Taming")
private ConfigSectionExploitTaming configSectionExploitTaming = new ConfigSectionExploitTaming();
@Setting(value = "Excavation", comment = "Exploit settings related to Excavation.")
private ConfigSectionExploitExcavation configSectionExploitExcavation = new ConfigSectionExploitExcavation();
public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() {
return configSectionExploitAcrobatics;
}
@@ -46,6 +49,10 @@ public class ConfigSectionExploitSkills {
return configSectionExploitMining.isPreventCobblestoneStoneGeneratorXP();
}
public boolean isSnowGolemExploitPrevented() {
return configSectionExploitExcavation.isSnowGolemExploitPrevented();
}
public boolean areSummonsBreedable() {
return configSectionExploitTaming.areSummonsBreedable();
}

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.antiexploit;
package com.gmail.nossr50.config.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.backup;
package com.gmail.nossr50.config.backup;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.commands;
package com.gmail.nossr50.config.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.commands;
package com.gmail.nossr50.config.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.commands;
package com.gmail.nossr50.config.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.commands;
package com.gmail.nossr50.config.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.commands;
package com.gmail.nossr50.config.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import com.gmail.nossr50.datatypes.database.PoolIdentifier;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.database;
package com.gmail.nossr50.config.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.donation;
package com.gmail.nossr50.config.donation;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.event;
package com.gmail.nossr50.config.event;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.event;
package com.gmail.nossr50.config.event;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.experience.CustomXPPerk;
import com.gmail.nossr50.datatypes.experience.SpecialXPKey;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.experience.SpecialXPKey;
import ninja.leaping.configurate.objectmapping.Setting;
@@ -15,7 +15,7 @@ public class ConfigExperienceCombat {
static {
COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();
// TODO: namespace
COMBAT_EXPERIENCE_DEFAULT.put("creeper", 4.0);
COMBAT_EXPERIENCE_DEFAULT.put("cat", 1.0);
COMBAT_EXPERIENCE_DEFAULT.put("fox", 1.0);
@@ -74,6 +74,7 @@ public class ConfigExperienceCombat {
COMBAT_EXPERIENCE_DEFAULT.put("dolphin", 1.0);
COMBAT_EXPERIENCE_DEFAULT.put("phantom", 4.0);
COMBAT_EXPERIENCE_DEFAULT.put("wandering_trader", 1.0);
COMBAT_EXPERIENCE_DEFAULT.put("bee", 1.5);
//SPECIAL
SPECIAL_COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.experience.CustomXPPerk;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -84,8 +84,9 @@ public class ConfigExperienceHerbalism {
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:dead_bush", 30);
/* MISC */
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:bee_nest", 200);
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:lily_pad", 100);
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:sweet_berry_bush", 300);
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:sweet_berry_bush", 50);
/* MUSHROOMS */
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:red_mushroom", 150);

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.skills.ItemMaterialCategory;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.datatypes.experience.SpecialXPKey;
import com.gmail.nossr50.datatypes.skills.ItemMaterialCategory;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -12,7 +12,7 @@ public class ConfigExperienceTaming {
static {
TAMING_EXPERIENCE_DEFAULT = new HashMap<>();
// TODO: namespace
TAMING_EXPERIENCE_DEFAULT.put("wolf", 250);
TAMING_EXPERIENCE_DEFAULT.put("ocelot", 500);
TAMING_EXPERIENCE_DEFAULT.put("cat", 500);
@@ -25,6 +25,7 @@ public class ConfigExperienceTaming {
TAMING_EXPERIENCE_DEFAULT.put("parrot", 1100);
TAMING_EXPERIENCE_DEFAULT.put("fox", 1000);
TAMING_EXPERIENCE_DEFAULT.put("panda", 1000);
TAMING_EXPERIENCE_DEFAULT.put("bee", 100);
}
@Setting(value = "Taming-XP-Values")

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.experience;
package com.gmail.nossr50.config.experience;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.hardcore;
package com.gmail.nossr50.config.hardcore;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.hardcore;
package com.gmail.nossr50.config.hardcore;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.hardcore;
package com.gmail.nossr50.config.hardcore;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,28 +0,0 @@
package com.gmail.nossr50.config.hocon.playerleveling;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionLevelScaling {
/* DEFAULT VALUES */
public static final boolean USE_RETRO_MODE_DEFAULT = true;
/*
* CONFIG NODES
*/
@Setting(value = "Use-Retro-Mode",
comment = "Enables 1-1000 Level Scaling" +
"\nIf set to false, Standard Scaling is used instead (1-100 Level Scaling)")
private boolean useRetroMode = USE_RETRO_MODE_DEFAULT;
/*
* GETTER BOILERPLATE
*/
public boolean isRetroModeEnabled() {
return useRetroMode;
}
}

View File

@@ -1,47 +0,0 @@
package com.gmail.nossr50.config.hocon.playerleveling;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionLevelingGeneral {
/* DEFAULT VALUES */
private static final int STARTING_LEVEL_DEFAULT = 1;
/*
* CONFIG NODES
*/
@Setting(value = "Player-Level-Scaling",
comment = "Level Scaling is a new feature of mcMMO." +
"\nServer admins can choose between two level scaling modes." +
"\nEach mode is meant to be identical to each other in terms of the speed of progression." +
"\nIn Retro player skills and levels scale the way they always have, on a 1-1000 scale." +
"\nIn Standard player skills scale instead from 1-100." +
"\nAs an example, reaching level 10 in Standard will take the same amount of time as reaching level 100 in Retro" +
"\n\nTo make upgrading mcMMO easier for the vast majority of existing servers, RetroMode will be turned on by default in the following circumstances" +
"\n1) That your server has a config.yml file that does not yet have a RetroMode setting (this means your server has not yet updated from the old system which did not have two level scaling options)" +
"\n2) You are already using RetroMode in your old YAML config files" +
"\n\nIf either of these is true, RetroMode will be turned on by default. If for some reason you had wiped your config files, you will need to come in here and turn RetroMode back on." +
"\nNOTE: RetroMode and Standard use the EXACT same DB, it does not alter any information within that DB. It is not dangerous to switch between Standard and Retro.")
private ConfigSectionLevelScaling configSectionLevelScaling = new ConfigSectionLevelScaling();
@Setting(value = "Player-Starting-Level",
comment = "\nPlayers will start at this level in all skills if they aren't already saved in the database." +
"\nHistorically this number has been 0, but this was changed in 2.1.X to 1 as I felt it was better to start from 1 than 0." +
"\nDefault value: " + STARTING_LEVEL_DEFAULT)
private int startingLevel = STARTING_LEVEL_DEFAULT;
/*
* GETTER BOILERPLATE
*/
public int getStartingLevel() {
return startingLevel;
}
public ConfigSectionLevelScaling getConfigSectionLevelScaling() {
return configSectionLevelScaling;
}
}

View File

@@ -1,43 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.items.ItemMatch;
import com.gmail.nossr50.datatypes.items.ItemMatchProperty;
import com.gmail.nossr50.datatypes.items.MMOItem;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ValueType;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.HashSet;
public class CustomItemTargetSerializer implements TypeSerializer<ItemMatch<?>> {
private static final String ITEM_CONSUMED_FOR_REPAIR = "Target-Item";
private static final String NBT_REQUIREMENTS = "NBT-Requirements";
@Nullable
@Override
public ItemMatch deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
MMOItem<?> mmoItem = value.getNode(ITEM_CONSUMED_FOR_REPAIR).getValue(new TypeToken<MMOItem<?>>() {});
if(value.getNode(NBT_REQUIREMENTS).getValueType() != ValueType.NULL)
{
HashSet<ItemMatchProperty> itemMatchProperties = value.getNode(NBT_REQUIREMENTS).getValue(new TypeToken<HashSet<ItemMatchProperty>>() {});
return new ItemMatch(mmoItem, itemMatchProperties);
}
return new ItemMatch(mmoItem, null);
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable ItemMatch<?> obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
value.getNode(ITEM_CONSUMED_FOR_REPAIR).setValue(obj.getItem());
if(obj.getItemMatchProperties().size() > 0) {
value.getNode(NBT_REQUIREMENTS).setValue(obj.getItemMatchProperties());
SerializerUtil.addCommentIfCompatible(value.getNode(NBT_REQUIREMENTS), "List optional NBT that is required here, you write it the same way you do in vanilla commands.");
}
}
}

View File

@@ -1,60 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.items.BukkitMMOItem;
import com.gmail.nossr50.datatypes.items.MMOItem;
import com.gmail.nossr50.util.nbt.RawNBT;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ValueType;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.bukkit.Material;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class ItemStackSerializer implements TypeSerializer<MMOItem<?>> {
private static final String ITEM_MINECRAFT_NAME = "Item-Name";
private static final String AMOUNT = "Amount";
private static final String NBT = "NBT";
@Nullable
@Override
public MMOItem<?> deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
String itemIdentifier = value.getNode(ITEM_MINECRAFT_NAME).getValue(TypeToken.of(String.class));
Material itemMatch = Material.matchMaterial(itemIdentifier);
if(itemMatch == null) {
System.out.println("[mcMMO Deserializer Debug] Could not find a match for "+itemIdentifier);
return null;
}
ConfigurationNode itemNode = value.getNode(ITEM_MINECRAFT_NAME);
Integer amount;
//Get the amount of items in the stack
if(itemNode.getNode(AMOUNT).getValueType() != ValueType.NULL) {
amount = itemNode.getNode(AMOUNT).getValue(TypeToken.of(Integer.class));
} else {
amount = 1;
}
RawNBT rawNBT = null;
if(itemNode.getNode(NBT).getValueType() != ValueType.NULL) {
rawNBT = value.getNode(NBT).getValue(TypeToken.of(RawNBT.class));
}
return new BukkitMMOItem(itemIdentifier, amount, rawNBT);
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable MMOItem<?> obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
ConfigurationNode itemNode = value.getNode(ITEM_MINECRAFT_NAME);
value.getNode(ITEM_MINECRAFT_NAME).setValue(obj.getNamespaceKey());
itemNode.getNode(AMOUNT).setValue(obj.getItemAmount());
itemNode.getNode(NBT).setValue(obj.getRawNBT());
}
}

View File

@@ -1,42 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.items.ItemMatch;
import com.gmail.nossr50.datatypes.items.ItemWildcards;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ValueType;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.HashSet;
import java.util.Set;
public class ItemWildcardSerializer implements TypeSerializer<ItemWildcards> {
private static final String WILDCARD_IDENTIFIER_NAME = "Wildcard-Identifier-Name";
private static final String MATCHING_ITEMS = "Matching-Items";
@Nullable
@Override
public ItemWildcards deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
String wildCardName = value.getNode(WILDCARD_IDENTIFIER_NAME).getValue(TypeToken.of(String.class));
if(value.getNode(WILDCARD_IDENTIFIER_NAME).getNode(MATCHING_ITEMS).getValueType() != ValueType.NULL) {
Set<ItemMatch> matchCandidates = value.getNode(WILDCARD_IDENTIFIER_NAME).getNode(MATCHING_ITEMS).getValue(new TypeToken<Set<ItemMatch>>() {});
return new ItemWildcards(wildCardName, new HashSet<>(matchCandidates));
}
return null;
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable ItemWildcards obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
value.getNode(WILDCARD_IDENTIFIER_NAME).setValue(obj.getWildcardName());
value.getNode(WILDCARD_IDENTIFIER_NAME).getNode(MATCHING_ITEMS).setValue(obj.getItemTargets());
}
}

View File

@@ -1,33 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class MaxBonusLevelSerializer implements TypeSerializer<MaxBonusLevel> {
public static final String STANDARD_NODE = "Standard-Max-Bonus-Level";
public static final String RETRO_NODE = "Retro-Max-Bonus-Level";
@Nullable
@Override
public MaxBonusLevel deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
int standard = value.getNode(STANDARD_NODE).getValue(TypeToken.of(Integer.class));
int retro = value.getNode(RETRO_NODE).getValue(TypeToken.of(Integer.class));
AbstractMaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(standard, retro);
return maxBonusLevel;
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable MaxBonusLevel obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
value.getNode(STANDARD_NODE).setValue(obj.getStandardScaleValue());
value.getNode(RETRO_NODE).setValue(obj.getRetroScaleValue());
}
}

View File

@@ -1,27 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.util.nbt.RawNBT;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class RawNBTSerializer implements TypeSerializer<RawNBT> {
private static final String NBT = "NBT";
@Nullable
@Override
public RawNBT deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
String nbtString = value.getNode(NBT).getValue(TypeToken.of(String.class));
return new RawNBT(nbtString);
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable RawNBT obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
value.getNode(NBT).setValue(obj.getNbtContents());
}
}

View File

@@ -1,22 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.skills.repair.RepairTransaction;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class RepairTransactionSerializer implements TypeSerializer<RepairTransaction> {
@Nullable
@Override
public RepairTransaction deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
return null;
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable RepairTransaction obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
}
}

View File

@@ -1,79 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.items.ItemMatch;
import com.gmail.nossr50.datatypes.permissions.PermissionWrapper;
import com.gmail.nossr50.skills.repair.RepairTransaction;
import com.gmail.nossr50.skills.repair.repairables.Repairable;
import com.gmail.nossr50.skills.repair.repairables.RepairableBuilder;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ValueType;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
public class RepairableSerializer implements TypeSerializer<Repairable> {
private static final String REPAIRABLE_ITEM = "Repairable-Item";
private static final String MAXIMUM_DURABILITY = "Maximum-Durability";
private static final String ITEMS_REQUIRED_TO_REPAIR = "Items-Required-To-Repair";
private static final String SKILL_LEVEL_REQUIRED_TO_REPAIR = "Skill-Level-Required-To-Repair";
private static final String BASE_XP_REWARD = "Base-XP-Reward";
private static final String BASE_REPAIR_COUNT = "Base-Repair-Count";
private static final String REQUIRED_PERMISSION_NODE = "Required-Permission-Node";
@Override
public Repairable deserialize(TypeToken<?> type, ConfigurationNode value) throws ObjectMappingException {
/* Necessary fields */
ItemMatch itemMatch = value.getNode(REPAIRABLE_ITEM).getValue(TypeToken.of(ItemMatch.class));
Short maximumDurability = value.getNode(MAXIMUM_DURABILITY).getValue(TypeToken.of(Short.class));
RepairTransaction repairTransaction = value.getNode(ITEMS_REQUIRED_TO_REPAIR).getValue(TypeToken.of(RepairTransaction.class));
RepairableBuilder repairableBuilder = new RepairableBuilder(itemMatch, maximumDurability, repairTransaction);
if(value.getNode(SKILL_LEVEL_REQUIRED_TO_REPAIR).getValueType() != ValueType.NULL) {
repairableBuilder.addMinLevel(value.getNode(SKILL_LEVEL_REQUIRED_TO_REPAIR).getInt());
}
if(value.getNode(BASE_XP_REWARD).getValueType() != ValueType.NULL) {
repairableBuilder.setBaseXP(value.getNode(BASE_XP_REWARD).getInt());
}
if(value.getNode(BASE_REPAIR_COUNT).getValueType() != ValueType.NULL) {
repairableBuilder.setRepairCount(value.getNode(BASE_REPAIR_COUNT).getInt());
}
if(value.getNode(REQUIRED_PERMISSION_NODE).getValueType() != ValueType.NULL) {
repairableBuilder.addPermissionWrapper(value.getNode(REQUIRED_PERMISSION_NODE).getValue(TypeToken.of(PermissionWrapper.class)));
}
return repairableBuilder.build();
}
@Override
public void serialize(TypeToken<?> type, Repairable obj, ConfigurationNode value) {
value.getNode(REPAIRABLE_ITEM).setValue(obj.getItemMatch());
value.getNode(MAXIMUM_DURABILITY).setValue(obj.getMaximumDurability());
value.getNode(ITEMS_REQUIRED_TO_REPAIR).setValue(obj.getRepairTransaction());
if(obj.getMinimumLevel() > 0) {
value.getNode(SKILL_LEVEL_REQUIRED_TO_REPAIR).setValue(obj.getMinimumLevel());
}
if(obj.getBaseXP() != 0) {
value.getNode(BASE_XP_REWARD).setValue(obj.getBaseXP());
SerializerUtil.addCommentIfCompatible(value.getNode(BASE_XP_REWARD), "The minimum amount of XP to reward a player when they repair this item.");
}
if(obj.getRepairCount() != 0) {
value.getNode(BASE_REPAIR_COUNT).setValue(obj.getRepairCount());
SerializerUtil.addCommentIfCompatible(value.getNode(BASE_REPAIR_COUNT), "How many times it should take a player to repair this item from fully damaged to brand new without any skill in Repair." +
"\nThis value is used in calculating how much damage to remove from an item, typically you want this to be at least equal to the number of mats used to craft the item.");
}
if(obj.getPermissionWrapper() != null) {
value.getNode(REQUIRED_PERMISSION_NODE).setValue(obj.getPermissionWrapper());
SerializerUtil.addCommentIfCompatible(value.getNode(REQUIRED_PERMISSION_NODE), "A custom permission node required to repair this item." +
"\nThis setting is optional.");
}
}
}

View File

@@ -1,28 +0,0 @@
package com.gmail.nossr50.config.hocon.serializers;
import com.gmail.nossr50.datatypes.items.ItemMatch;
import com.gmail.nossr50.skills.repair.SimpleRepairCost;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class SimpleRepairCostSerializer implements TypeSerializer<SimpleRepairCost> {
private static final String ITEM_MATCH = "Item-Match";
@Nullable
@Override
public SimpleRepairCost deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
ItemMatch<?> itemMatch = value.getNode(ITEM_MATCH).getValue(new TypeToken<ItemMatch<?>>() {});
SimpleRepairCost<?> simpleRepairCost = new SimpleRepairCost<>(itemMatch);
return simpleRepairCost;
}
@Override
public void serialize(@NonNull TypeToken<?> type, @Nullable SimpleRepairCost obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
value.getNode(ITEM_MATCH).setValue(obj.getItemMatch());
}
}

View File

@@ -1,49 +0,0 @@
package com.gmail.nossr50.config.hocon.skills.acrobatics.dodge;
import com.gmail.nossr50.config.ConfigConstants;
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigDodge {
public static final double DAMAGE_REDUCTION_DIVISOR_DEFAULT = 2.0D;
public static final String FIFTY_PERCENT_EXAMPLE = "50";
public static final String MAX_BONUS_LEVEL_EXAMPLE = "100";
public static final String ODDS_PERCENTAGE_EXAMPLE = "25%";
public static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
@Setting(value = "Damage-Reduction-Divisor", comment = "If a player successfully dodges the incoming damage will be divided by this value." +
"\nPlayers can dodge almost all types of damage from other entities, such as player damage, monster damage, etc." +
"\nAs an example, a value of 2.0 for this setting would result in the player taking half damage." +
"\nHigher values would further decrease the amount of damage the player takes after a successful dodge." +
"\nDefault value: " + DAMAGE_REDUCTION_DIVISOR_DEFAULT)
private double damageReductionDivisor = DAMAGE_REDUCTION_DIVISOR_DEFAULT;
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
"\nA value of 100.0 would be equivalent to 100% chance of success." +
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
public MaxBonusLevel getMaxBonusLevel() {
return maxBonusLevel;
}
public double getChanceAtMaxSkill() {
return chanceAtMaxSkill;
}
public double getDamageReductionDivisor() {
return damageReductionDivisor;
}
}

View File

@@ -1,47 +0,0 @@
package com.gmail.nossr50.config.hocon.skills.acrobatics.roll;
import com.gmail.nossr50.config.ConfigConstants;
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigRoll {
public static final double ROLL_DAMAGE_THRESHOLD_DEFAULT = 7.0D;
public static final String FIFTY_PERCENT_EXAMPLE = "50";
public static final String MAX_BONUS_LEVEL_EXAMPLE = "100";
public static final String ODDS_PERCENTAGE_EXAMPLE = "25%";
public static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
@Setting(value = "Damage-Threshold", comment = "Rolling will reduce up to this much damage." +
"\nGraceful Rolls will reduce twice this value." +
"\nDefault value: " + ROLL_DAMAGE_THRESHOLD_DEFAULT)
private double damageTheshold = ROLL_DAMAGE_THRESHOLD_DEFAULT;
public double getDamageTheshold() {
return damageTheshold;
}
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
"\nA value of 100.0 would be equivalent to 100% chance of success." +
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
public MaxBonusLevel getMaxBonusLevel() {
return maxBonusLevel;
}
public double getChanceAtMaxSkill() {
return chanceAtMaxSkill;
}
}

View File

@@ -1,103 +0,0 @@
package com.gmail.nossr50.config.hocon.skills.ranks;
import com.gmail.nossr50.api.exceptions.MissingSkillPropertyDefinition;
import com.gmail.nossr50.datatypes.skills.properties.SkillProperty;
import java.util.HashMap;
public class SkillRankProperty implements SkillProperty {
private HashMap<Integer, Integer> standardRanks;
private HashMap<Integer, Integer> retroRanks;
public SkillRankProperty(Integer... rankDefinitions) {
initRankMaps();
for(int x = 0; x < rankDefinitions.length; x++) {
int curRank = x+1;
addStandardAndRetroRank(curRank, rankDefinitions[x]);
}
}
public SkillRankProperty(HashMap<Integer, Integer> standardRanks, HashMap<Integer, Integer> retroRanks) {
this.standardRanks = standardRanks;
this.retroRanks = retroRanks;
}
/**
* Convenience method to add Standard and Retro at the same time for default initialization of values
* Only requires standard values be passed
* @param curRank the rank to fill in the value for
* @param standardValue the value of the rank in Standard
*/
private void addStandardAndRetroRank(int curRank, int standardValue) {
//Retro will be equal to standards rank requirement multiplied by 10 unless that value is 1, in which case it will also be 1
int retroValue = standardValue == 1 ? 1 : standardValue * 10;
//Avoid negative numbers
if(standardValue < 0) {
standardRanks.put(curRank, 0);
retroRanks.put(curRank, 0);
} else {
standardRanks.put(curRank, standardValue);
retroRanks.put(curRank, retroValue);
}
}
/**
* Convenience method to add Standard and Retro at the same time
* @param curRank the rank to fill in the value for
* @param standardValue the value of the rank in Standard
* @param retroValue the value of the rank in Retro
*/
private void addStandardAndRetroRank(int curRank, int standardValue, int retroValue) {
//Avoid negative numbers
standardValue = Math.max(0, standardValue);
retroValue = Math.max(0, retroValue);
standardRanks.put(curRank, standardValue);
retroRanks.put(curRank, retroValue);
}
private void initRankMaps() {
standardRanks = new HashMap<>();
retroRanks = new HashMap<>();
}
/**
* Gets the unlock level for this skill as defined by this SkillRankProperty
* @param retroMode whether or not mcMMO is using RetroMode, true for if it is
* @param targetRank the rank to get the unlock level for
* @return the unlock level for target rank
*/
public int getUnlockLevel(boolean retroMode, int targetRank) throws MissingSkillPropertyDefinition {
if(retroMode) {
if(retroRanks.get(targetRank) == null) {
throw new MissingSkillPropertyDefinition("No definition found for rank:"+targetRank+" using Retro scaling");
}
return retroRanks.get(targetRank);
} else {
if(standardRanks.get(targetRank) == null) {
throw new MissingSkillPropertyDefinition("No definition found for rank:"+targetRank+" using Standard scaling");
}
return standardRanks.get(targetRank);
}
}
public void setStandardRanks(HashMap<Integer, Integer> standardRanks) {
this.standardRanks = standardRanks;
}
public void setRetroRanks(HashMap<Integer, Integer> retroRanks) {
this.retroRanks = retroRanks;
}
public HashMap<Integer, Integer> getStandardRanks() {
return standardRanks;
}
public HashMap<Integer, Integer> getRetroRanks() {
return retroRanks;
}
}

View File

@@ -1,30 +0,0 @@
package com.gmail.nossr50.config.hocon.skills.repair;
import com.gmail.nossr50.config.ConfigConstants;
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigRepairSuperRepair {
private static final String FIFTY_PERCENT_EXAMPLE = "50";
private static final String MAX_BONUS_LEVEL_EXAMPLE = "100";
private static final String ODDS_PERCENTAGE_EXAMPLE = "25%";
private static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
"\nA value of 100.0 would be equivalent to 100% chance of success." +
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
}

View File

@@ -1,25 +0,0 @@
package com.gmail.nossr50.config.hocon.skills.repair.repairmastery;
import com.gmail.nossr50.config.ConfigConstants;
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigRepairRepairMastery {
@Setting(value = ConfigConstants.MAX_BONUS_PERCENTAGE_FIELD_NAME)
private double maxBonusPercentage = 200.0D;
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
public double getMaxBonusPercentage() {
return maxBonusPercentage;
}
public MaxBonusLevel getMaxBonusLevel() {
return maxBonusLevel;
}
}

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.items;
package com.gmail.nossr50.config.items;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.items;
package com.gmail.nossr50.config.items;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.items;
package com.gmail.nossr50.config.items;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.language;
package com.gmail.nossr50.config.language;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.metrics;
package com.gmail.nossr50.config.metrics;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.mobs;
package com.gmail.nossr50.config.mobs;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.mobs;
package com.gmail.nossr50.config.mobs;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.mobs;
package com.gmail.nossr50.config.mobs;
import com.gmail.nossr50.datatypes.MobHealthbarType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.motd;
package com.gmail.nossr50.config.motd;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.notifications;
package com.gmail.nossr50.config.notifications;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.notifications;
package com.gmail.nossr50.config.notifications;
import com.gmail.nossr50.datatypes.interactions.NotificationType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.notifications;
package com.gmail.nossr50.config.notifications;
import com.gmail.nossr50.datatypes.interactions.NotificationType;
import ninja.leaping.configurate.objectmapping.Setting;

View File

@@ -1,4 +1,4 @@
package com.gmail.nossr50.config.hocon.notifications;
package com.gmail.nossr50.config.notifications;
public class PlayerNotificationSettings {

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