mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
165 Commits
gradlelize
...
configurab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46e285bf44 | ||
|
|
9a72af12b3 | ||
|
|
f8dbace9f0 | ||
|
|
58174d3391 | ||
|
|
7865ad8934 | ||
|
|
d525f754a7 | ||
|
|
fd1b1fe124 | ||
|
|
de71c60d6b | ||
|
|
5609f1cdde | ||
|
|
1bd4454a6b | ||
|
|
8f8dfcf556 | ||
|
|
ce1051c364 | ||
|
|
b9d05d8d67 | ||
|
|
3aa9f385e5 | ||
|
|
ff8c94bf44 | ||
|
|
51e80f40dd | ||
|
|
a7d2c901df | ||
|
|
325cbcad9d | ||
|
|
2644de5ab4 | ||
|
|
3a81d94b32 | ||
|
|
89a990f0cb | ||
|
|
d585b1c2f7 | ||
|
|
1101815f18 | ||
|
|
efea1c5d33 | ||
|
|
33e0b40e19 | ||
|
|
31a98791f3 | ||
|
|
c2bbe33fe8 | ||
|
|
12abd68add | ||
|
|
326ff1cd70 | ||
|
|
9f0fe26778 | ||
|
|
0a59b79ef9 | ||
|
|
441125dbd1 | ||
|
|
27b1c6b094 | ||
|
|
db70d56493 | ||
|
|
eff1ce102f | ||
|
|
705b57a30b | ||
|
|
d4ba9d7605 | ||
|
|
3b3396ce2c | ||
|
|
4cd91350db | ||
|
|
b3bea7833f | ||
|
|
b0c7e0368a | ||
|
|
4e895b7361 | ||
|
|
6168309ec9 | ||
|
|
95c403a467 | ||
|
|
a598796c99 | ||
|
|
a333f36fd8 | ||
|
|
7c6d5c476d | ||
|
|
e2073ff9f7 | ||
|
|
8f26544188 | ||
|
|
4e21f1a200 | ||
|
|
ab6dbe306d | ||
|
|
19a4c0238f | ||
|
|
c071471bdf | ||
|
|
85550c5750 | ||
|
|
3c382a11ed | ||
|
|
f45c70b694 | ||
|
|
38d64f207d | ||
|
|
2d342f8a3d | ||
|
|
3b276b59cf | ||
|
|
4ff4def56a | ||
|
|
63de093ebb | ||
|
|
b34f0d62d6 | ||
|
|
a74f33c96d | ||
|
|
8e8024e3e1 | ||
|
|
4f161812aa | ||
|
|
24ba3b1a01 | ||
|
|
359e3e34ad | ||
|
|
ab0fc06dc2 | ||
|
|
11ca0d9ff1 | ||
|
|
4eef4a3e41 | ||
|
|
816b64cb70 | ||
|
|
dceee5554d | ||
|
|
e3edc9a18f | ||
|
|
aaffafb88b | ||
|
|
2e5a12a72b | ||
|
|
769a26a911 | ||
|
|
8094be46c8 | ||
|
|
2525ce9abe | ||
|
|
47bcd1223b | ||
|
|
ea70c937f2 | ||
|
|
3eb160a794 | ||
|
|
4b6e2c35b2 | ||
|
|
550a3df616 | ||
|
|
657abb76a7 | ||
|
|
0ffcff53b3 | ||
|
|
33f4ac14b5 | ||
|
|
15d3119627 | ||
|
|
4fd94bfe29 | ||
|
|
ac731258c7 | ||
|
|
7b8c90d362 | ||
|
|
055391e908 | ||
|
|
cd6ce5a19d | ||
|
|
7441d2d8d6 | ||
|
|
7b941baa1c | ||
|
|
0c1fa07079 | ||
|
|
539cd7290e | ||
|
|
406429f4e3 | ||
|
|
40802e6bae | ||
|
|
421a394f68 | ||
|
|
d4adb490e2 | ||
|
|
de5a8babc5 | ||
|
|
d892bfe83a | ||
|
|
ceaff0c862 | ||
|
|
a118d8465e | ||
|
|
7c156319be | ||
|
|
24b3bf1100 | ||
|
|
41bdca948a | ||
|
|
5441a7eb96 | ||
|
|
c45f2ce406 | ||
|
|
3cbbf1bee0 | ||
|
|
8fd1af4cbf | ||
|
|
601297799f | ||
|
|
da98be88ad | ||
|
|
1104f48ad5 | ||
|
|
af50699de1 | ||
|
|
1c71f1daf5 | ||
|
|
b7dd491c01 | ||
|
|
3ce0d7b972 | ||
|
|
9dcbccb010 | ||
|
|
c5cbab39b6 | ||
|
|
ca1906fbc5 | ||
|
|
7eab20ef56 | ||
|
|
25a9c75a5a | ||
|
|
9911c406f8 | ||
|
|
fdb900ec5d | ||
|
|
bf94073935 | ||
|
|
bfcc167862 | ||
|
|
2a606b1ed1 | ||
|
|
edc8701e35 | ||
|
|
188b0f9813 | ||
|
|
e6c9cc6fdd | ||
|
|
76ca7cc88f | ||
|
|
335d708848 | ||
|
|
b4179cb9a6 | ||
|
|
8bbf95e9da | ||
|
|
dc805825de | ||
|
|
871ca744d9 | ||
|
|
1b091bdbd5 | ||
|
|
31dc7bf03f | ||
|
|
7be849da2a | ||
|
|
b572494c9c | ||
|
|
143714c9eb | ||
|
|
110d9a633b | ||
|
|
584859318b | ||
|
|
4bff07bd2b | ||
|
|
365938f351 | ||
|
|
7f6bbadc1c | ||
|
|
ec1fdea40d | ||
|
|
8febe2d0bd | ||
|
|
6e0f8f99fa | ||
|
|
1eb2c7b2d7 | ||
|
|
3310a12a95 | ||
|
|
433f6d085d | ||
|
|
0509f4f63e | ||
|
|
d2028321d4 | ||
|
|
4437f419cb | ||
|
|
a58d875d74 | ||
|
|
154d0a8d50 | ||
|
|
9e01a07542 | ||
|
|
f13364eb04 | ||
|
|
b763a56d75 | ||
|
|
c7d2631a79 | ||
|
|
0cea66a084 | ||
|
|
6125b3fbd2 | ||
|
|
1b889b8177 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2,3 +2,4 @@
|
||||
|
||||
*.png binary
|
||||
*.wav binary
|
||||
p
|
||||
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal 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
4
.gitignore
vendored
@@ -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
|
||||
|
||||
159
Changelog.txt
159
Changelog.txt
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version=2.3.0-SNAPSHOT
|
||||
version=2.2.0-SNAPSHOT
|
||||
group=com.gmail.nossr50.mcMMO
|
||||
artifactId=mcMMO
|
||||
name=mcMMO
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()));
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -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...");
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>"));
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
}
|
||||
@@ -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('_');
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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<>();
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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")
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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
Reference in New Issue
Block a user