mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-19 10:22:58 +01:00
Compare commits
43 Commits
dev-capfan
...
dev-1.4.09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b791649432 | ||
|
|
306ac5d949 | ||
|
|
fb75eac1f7 | ||
|
|
44a4448527 | ||
|
|
001ea19b1c | ||
|
|
3f347091c4 | ||
|
|
f4dbbd7e57 | ||
|
|
e4d3cb5f4d | ||
|
|
e455b41ab9 | ||
|
|
ea704a87db | ||
|
|
813d9049c2 | ||
|
|
67314e1320 | ||
|
|
0e6611c7e9 | ||
|
|
7d82d5ff7b | ||
|
|
eb51081a66 | ||
|
|
00c89d2cf6 | ||
|
|
d88afaf696 | ||
|
|
c6be608e5e | ||
|
|
9def3d5eb4 | ||
|
|
a052bfda7e | ||
|
|
c35c3c0dab | ||
|
|
23f5946cac | ||
|
|
813eeb8873 | ||
|
|
8e60403fc1 | ||
|
|
23b4ff7134 | ||
|
|
b16dec4532 | ||
|
|
271ba2e5f1 | ||
|
|
c9ab2bebd6 | ||
|
|
ef4bbca36a | ||
|
|
ad789ea2bf | ||
|
|
b848968094 | ||
|
|
c572054e67 | ||
|
|
2e6a43ac97 | ||
|
|
837e59d187 | ||
|
|
7f7aa9e799 | ||
|
|
10c18de9bf | ||
|
|
0b92023937 | ||
|
|
04f02ca7f4 | ||
|
|
d701553efe | ||
|
|
e812a949db | ||
|
|
f88dd29926 | ||
|
|
c588708056 | ||
|
|
a9f800ac68 |
@@ -7,117 +7,25 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 1.5.04-SNAPSHOT
|
Version 1.4.09-dev
|
||||||
+ Added option to config.yml to truncate existing player skill levels that exceed the skill level cap
|
|
||||||
+ Falling blocks persist mcMMO natural data
|
|
||||||
= Woodcutting double drops correctly identify acacia and dark oak logs
|
|
||||||
= Skill Reset command now correctly identifies arguments
|
|
||||||
= Hylian Treasure config options are now actually used
|
|
||||||
= Child skills now use parent skills configured skill caps properly
|
|
||||||
! Flux mining now simulates a block break event for other plugins to act upon
|
|
||||||
! Zombie Pigmen spawned from nether portals are now considered spawner mobs
|
|
||||||
! Flux Pickaxe lore now appends to existing lore as opposed to replacing it
|
|
||||||
! Party chat no longer displays colors when logged in server console
|
|
||||||
- Treefeller no longer lowers exp for big trees
|
|
||||||
|
|
||||||
Version 1.5.03
|
|
||||||
= Fixed bug where absorption hearts could be attacked by allied players
|
|
||||||
= Fixed bug where new forms of stone would drop the wrong type when mined with Silk Touch
|
|
||||||
= Fixed bug where blocks would not get tracked correctly when using sticky pistons and slime blocks in certain situations
|
|
||||||
= Fixed bug where config value for Daze damage was ignored
|
|
||||||
= Fixed UUID updater to not lose data on errors
|
|
||||||
= Fixed bug where uuid update could result in large amounts of user data being deleted
|
|
||||||
= Fixed bug where custom potions were missed in potion stage calculation
|
|
||||||
= Fixed piston dupe bugs permanently
|
|
||||||
= Fixed bug involving user name changes
|
|
||||||
= Fixed old user purge to properly calculate months
|
|
||||||
= Fixed bug where Repair would incorrectly check items
|
|
||||||
= Fixed bug where apostrophes in locale files would not read correctly
|
|
||||||
= Fixed bug where treasure data was limited to 255 instead of Short.MAX_VALUE
|
|
||||||
! Moved more user loading calculations to async loading thread to reduce lag on login
|
|
||||||
|
|
||||||
Version 1.5.02
|
|
||||||
+ Added option to config.yml for Chimaera Wings to stop using bed spawn points
|
|
||||||
+ Added option to config.yml to let non-tools in hand count as unarmed
|
|
||||||
+ Added option to experience.yml to control XP gained by killing bred animals
|
|
||||||
+ Added support for 1.8 mobs and features
|
|
||||||
= Fixed bug where no Mining XP was granted when Flux Mining was successful
|
|
||||||
= Fixed bug with UUID conversions in Flatfile
|
|
||||||
= Fixed a couple Dupe bugs that were introduced recently
|
|
||||||
= Fixed bug where MobHealthbarTypes were not saved between server restarts
|
|
||||||
! Changed Flux Mining mechanics. In order to use the ability, you need to infuse a pickaxe with furnace powers first.
|
|
||||||
! Scoreboard tips are only shown a couple of times to the player, instead of once per login session
|
|
||||||
! Changed Archery distance multiplier to be configurable
|
|
||||||
! Archery distance XP bonus cannot exceed indefinitely anymore
|
|
||||||
|
|
||||||
Version 1.5.01
|
|
||||||
+ Added new child skill; Salvage
|
+ Added new child skill; Salvage
|
||||||
+ Added UUID support!
|
|
||||||
+ Added SQL connection pooling and async loading!
|
|
||||||
+ Added the long awaited Diminished Returns feature
|
|
||||||
+ Added new feature to Herbalism. Instantly-regrown crops are protected from being broken for 1 second
|
+ Added new feature to Herbalism. Instantly-regrown crops are protected from being broken for 1 second
|
||||||
+ Added option to config.yml to show the /mcstats scoreboard automatically after logging in
|
+ Added option to config.yml to show the /mcstats scoreboard automatically after logging in
|
||||||
+ Added option to config.yml for Alchemy. Skills.Alchemy.Prevent_Hopper_Transfer_Bottles
|
+ Added option to config.yml for Alchemy. Skills.Alchemy.Prevent_Hopper_Transfer_Bottles
|
||||||
+ Added option to config.yml for Scoreboards, display "Ability" instead of ability names on the scoreboards
|
|
||||||
+ Added options to experience.yml for Dirt and Sand variations
|
|
||||||
+ Added support for `MATERIAL|data` format in treasures.yml
|
+ Added support for `MATERIAL|data` format in treasures.yml
|
||||||
+ Added API to experience events to get XP gain reason
|
+ Added API to experience events to get XP gain reason
|
||||||
+ Added API to check if an entity is bleeding
|
+ Added API to check if an entity is bleeding
|
||||||
+ Added API to ExperienceAPI to get the amount of XP needed for a level
|
|
||||||
+ Added API class SkillAPI used to get a list of valid skill names
|
|
||||||
+ Added API events for hardcore features, McMMOPlayerPreDeathPenaltyEvent, McMMOPlayerStatLossEvent and McMMOPlayerVampirismEvent
|
|
||||||
+ Added API to ExperienceAPI to specify if XP can be shared
|
|
||||||
+ Added options to tools.yml and armor.yml config files to set a pretty repair material name
|
|
||||||
+ Added full support for repairables in tools.yml and armor.yml config files
|
|
||||||
+ Added magical mod config file import command, for Cauldron 1.7+. Check wiki for usage
|
|
||||||
+ Added particle effects and sounds to "Call of the Wild" (Taming)
|
|
||||||
+ Added summon length to "Call of the Wild". Summons will now commit suicide after their lifespan expires
|
|
||||||
+ Added feature which makes tamed wolves attack a target shot by the owner
|
|
||||||
= Fixed bug where pistons would mess with the block tracking
|
|
||||||
= Fixed bug where the Updater was running on the main thread.
|
= Fixed bug where the Updater was running on the main thread.
|
||||||
= Fixed bug when players would use /ptp without being in a party
|
= Fixed bug when players would use /ptp without being in a party
|
||||||
= Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent
|
= Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent
|
||||||
= Fixed bug where dodge would check the wrong player skill level
|
= Fixed bug where dodge would check the wrong player skill level
|
||||||
= Fixed bug which causes /party teleport to stop working
|
= Fixed bug which causes /party teleport to stop working
|
||||||
= Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
|
= Fixed bug where SaveTimerTask would produce an IndexOutOfBoundsException
|
||||||
= Fixed bug where Alchemy would not fire BrewEvents
|
|
||||||
= Fixed bug with setting custom names and lore in treasures config
|
|
||||||
= Fixed bug which would cause a NullPointerException with getFlowerAndGrassXp()
|
|
||||||
= Fixed bug which could cause and SQLException regarding the connection property 'maxReconnects'.
|
|
||||||
= Fixed bug where falling blocks were incorrectly tracked
|
|
||||||
= Fixed bug where items would get deleted when in Berserk with a full inventory
|
|
||||||
= Fixed bug where the console would not correctly show party chat colors
|
|
||||||
= Fixed bug where party chat was using non thread safe methods
|
|
||||||
= Fixed bug where Blast Mining unlock levels could be to high in certain occasions
|
|
||||||
= Fixed bug where Blast Minings ability "Demolition Expert" would not work
|
|
||||||
= Fixed bug where Repair_Material_Quantity wasn't read in mod config files
|
|
||||||
! Changed SecondaryAbilityEvent to implement Cancellable and it now gets fired for damage related secondary abilities
|
|
||||||
! Changed the way mcMMO handles bonus damage, updated for the new damage event API
|
|
||||||
! Changed player data saving. Save tasks are now asynchronous
|
! Changed player data saving. Save tasks are now asynchronous
|
||||||
! Vanished players no longer get hit by AoE effects
|
! Vanished players no longer get hit by AoE effects
|
||||||
! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
|
! Changed Alchemy config option 'Prevent_Hopper_Transfer' renamed to 'Prevent_Hopper_Transfer_Ingredients'
|
||||||
! Changed Alchemy XP distribution. XP is granted based on the stage of the potion.
|
|
||||||
! Changed behavior of the Blast Mining ability "Demolition Expert"; now only decreases damage for the ability user
|
|
||||||
! Updated for new getOnlinePlayers() behavior
|
|
||||||
! Updated for new blocks and entities
|
|
||||||
! Changed McMMOPlayerDeathPenaltyEvent to get fired after hardcore penalty calculations, use McMMOPlayerPreDeathPenaltyEvent for old behavior
|
|
||||||
! Moved Refresh_Chunks setting from hidden.yml to config.yml
|
|
||||||
- Removed salvage ability from Repair, salvage has it's own (child) skill now
|
- Removed salvage ability from Repair, salvage has it's own (child) skill now
|
||||||
|
|
||||||
Version 1.5.00
|
|
||||||
+ Added Podzol & Red Sand to Excavation
|
|
||||||
+ Added Hardened Clay, Stained Clay, and Packed Ice to Mining blocks
|
|
||||||
+ Added Acacia and Dark Oak to Woodcutting blocks
|
|
||||||
+ Added Salmon, Clownfish, and Pufferfish to Fishing XP
|
|
||||||
+ Added new flowers and grasses to Herbalism XP
|
|
||||||
+ Added option to config.yml which allows players to always catch fish, even when a treasure is found
|
|
||||||
+ Added option to config.yml to override vanilla Minecraft treasures
|
|
||||||
! Fishing XP now depends on the type of fish.
|
|
||||||
! Woodcutting XP in experience.yml and Woodcutting double drops in config.yml now use the tree species names. Oak is now Generic, and Spruce is now Redwood.
|
|
||||||
! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly.
|
|
||||||
- Removed deprecated permission nodes
|
|
||||||
- Removed "Treasure found!" message
|
|
||||||
|
|
||||||
Version 1.4.08
|
Version 1.4.08
|
||||||
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
||||||
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -1,8 +1,8 @@
|
|||||||
# mcMMO
|
# mcMMO
|
||||||
## The RPG lovers mod
|
## The RPG lovers mod
|
||||||
|
|
||||||
### Builds
|
### Dev builds
|
||||||
Currently, you can obtain our builds via the Spigot resource page: http://www.spigotmc.org/resources/mcmmo.2445/
|
Our latest development builds are available ~~[here](http://ci.mcmmo.info)~~. Unfortunately, the mcMMO site is down; a temporary dev build location is hosted [here](http://ci.ecocitycraft.com/job/mcMMO/).
|
||||||
|
|
||||||
### Brief Description
|
### Brief Description
|
||||||
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds fourteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds fourteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||||
@@ -10,10 +10,11 @@ The goal of mcMMO is to take core Minecraft game mechanics and expand them into
|
|||||||
## About the Team
|
## About the Team
|
||||||
|
|
||||||
mcMMO is currently developed by a team of individuals from all over the world.
|
mcMMO is currently developed by a team of individuals from all over the world.
|
||||||
|
### Glorious Leader
|
||||||
### Developers
|
|
||||||
[]
|
[]
|
||||||
(https://github.com/gmcferrin)
|
(https://github.com/gmcferrin)
|
||||||
|
|
||||||
|
### Developers
|
||||||
[]
|
[]
|
||||||
(https://github.com/bm01)
|
(https://github.com/bm01)
|
||||||
[]
|
[]
|
||||||
@@ -47,4 +48,4 @@ Required Libraries:
|
|||||||
* EMetrics
|
* EMetrics
|
||||||
* Bukkit
|
* Bukkit
|
||||||
|
|
||||||
http://www.spigotmc.org/resources/mcmmo.2445/ for more up to date information.
|
http://dev.bukkit.org/server-mods/mcmmo for more up to date information.
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Advanced Genetics 1.4.3
|
|
||||||
Bows:
|
|
||||||
# Genetic
|
|
||||||
X31179:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31197
|
|
||||||
Repair_Material_Pretty_Name: "Cell"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 1501
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Applied Energistics rv14-finale3
|
|
||||||
Mining:
|
|
||||||
# Certus Quartz Ore
|
|
||||||
X4076|0:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Applied Energistics rv14-finale3
|
|
||||||
Axes:
|
|
||||||
# Quartz
|
|
||||||
X4365:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X4362
|
|
||||||
Repair_Material_Pretty_Name: "Certus Quartz"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 250
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Quartz
|
|
||||||
X4366:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X4362
|
|
||||||
Repair_Material_Pretty_Name: "Certus Quartz"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Quartz
|
|
||||||
X4368:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X4362
|
|
||||||
Repair_Material_Pretty_Name: "Certus Quartz"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 250
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Quartz
|
|
||||||
X4367:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X4362
|
|
||||||
Repair_Material_Pretty_Name: "Certus Quartz"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 750
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Quartz
|
|
||||||
X4369:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X4362
|
|
||||||
Repair_Material_Pretty_Name: "Certus Quartz"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 250
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Big Reactors 0.3.4A2
|
|
||||||
Mining:
|
|
||||||
# Yellorite
|
|
||||||
X1750|0:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of BoP 1.2.1.434
|
|
||||||
Boots:
|
|
||||||
# Wading
|
|
||||||
X21269:
|
|
||||||
Repairable: false
|
|
||||||
Durability: 9999
|
|
||||||
# Muddy
|
|
||||||
X21283:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 26
|
|
||||||
# Amethyst
|
|
||||||
X21293:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 520
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Muddy
|
|
||||||
X21281:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 32
|
|
||||||
# Amethyst
|
|
||||||
X21291:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 640
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Muddy
|
|
||||||
X21280:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 22
|
|
||||||
# Amethyst
|
|
||||||
X21290:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 440
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Muddy
|
|
||||||
X21280:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 30
|
|
||||||
# Amethyst
|
|
||||||
X21290:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 600
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Incomplete! Only covers ores
|
|
||||||
# Up to date as of BoP 1.2.1.434
|
|
||||||
Mining:
|
|
||||||
# Red Rock
|
|
||||||
X162|0:
|
|
||||||
XP_Gain: 30
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
# Amethyst
|
|
||||||
X1921|0:
|
|
||||||
XP_Gain: 200
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Ruby
|
|
||||||
X1921|2:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Peridot
|
|
||||||
X1921|4:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Topaz
|
|
||||||
X1921|6:
|
|
||||||
XP_Gain: 200
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Tanzanite
|
|
||||||
X1921|8:
|
|
||||||
XP_Gain: 200
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Malachite
|
|
||||||
X1921|10:
|
|
||||||
XP_Gain: 200
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Sapphire
|
|
||||||
X1921|12:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of BoP 1.2.1.434
|
|
||||||
Axes:
|
|
||||||
# Amethyst
|
|
||||||
X21287:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 2013
|
|
||||||
# Muddy
|
|
||||||
X21277:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 32
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Amethyst
|
|
||||||
X21288:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 2013
|
|
||||||
# Muddy
|
|
||||||
X21278:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 32
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Amethyst
|
|
||||||
X21286:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 2013
|
|
||||||
# Muddy
|
|
||||||
X21276:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 32
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Amethyst
|
|
||||||
X21285:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 2013
|
|
||||||
# Muddy
|
|
||||||
X21275:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 32
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Amethyst
|
|
||||||
X21284:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21264
|
|
||||||
Repair_Material_Pretty_Name: "Amethyst"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 2013
|
|
||||||
# Muddy
|
|
||||||
X21274:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X21263
|
|
||||||
Repair_Material_Pretty_Name: "Mud Ball"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 32
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Emasher Resource 1.2.3.5
|
|
||||||
Boots:
|
|
||||||
# Hemp
|
|
||||||
X9301:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9291
|
|
||||||
Repair_Material_Pretty_Name: "Hemp"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 65
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Hemp
|
|
||||||
X9299:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9291
|
|
||||||
Repair_Material_Pretty_Name: "Hemp"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 80
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Hemp
|
|
||||||
X9300:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9291
|
|
||||||
Repair_Material_Pretty_Name: "Hemp"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 75
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Emasher Resource 1.2.3.5
|
|
||||||
Mining:
|
|
||||||
# Bauxite
|
|
||||||
X1565|0:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Cassiterite
|
|
||||||
X1565|1:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Emery
|
|
||||||
X1565|2:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Galena
|
|
||||||
X1565|3:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Native Copper
|
|
||||||
X1565|4:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Petlandite
|
|
||||||
X1565|5:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Ruby
|
|
||||||
X1565|6:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Sapphire
|
|
||||||
X1565|7:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Extra Utilities 1.0.3c
|
|
||||||
Axes:
|
|
||||||
# Healing
|
|
||||||
X10264:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X10258
|
|
||||||
Repair_Material_Pretty_Name: "Unstable Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 1561
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Reversing
|
|
||||||
X10265:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X10258
|
|
||||||
Repair_Material_Pretty_Name: "Unstable Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 1561
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Destruction
|
|
||||||
X10263:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: false
|
|
||||||
Durability: 6244
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Erosion
|
|
||||||
X10262:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: false
|
|
||||||
Durability: 6244
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Etheric
|
|
||||||
X10261:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 4
|
|
||||||
Repairable: false
|
|
||||||
Durability: 1561
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Factorization 0.8.34
|
|
||||||
Mining:
|
|
||||||
# Dark Iron Ore
|
|
||||||
X1004|0:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Forestry 2.3.1.1
|
|
||||||
Mining:
|
|
||||||
# Apatite
|
|
||||||
X1398|0:
|
|
||||||
XP_Gain: 100
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Copper
|
|
||||||
X1398|1:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Tin
|
|
||||||
X1398|2:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Forestry 2.3.1.1
|
|
||||||
Pickaxes:
|
|
||||||
# Survivalist
|
|
||||||
X13261:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X5261
|
|
||||||
Repair_Material_Pretty_Name: "Bronze Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 200
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Survivalist
|
|
||||||
X13264:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X5261
|
|
||||||
Repair_Material_Pretty_Name: "Bronze Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 200
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Minefactory Reloaded 2.7.9 Final
|
|
||||||
Boots:
|
|
||||||
# Plastic
|
|
||||||
X12306:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12249
|
|
||||||
Repair_Material_Pretty_Name: "Plastic Sheets"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 39
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Natura 2.1.14
|
|
||||||
Boots:
|
|
||||||
# Impskin
|
|
||||||
X12712:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12660
|
|
||||||
Repair_Material_Pretty_Name: "Imp Leather"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 429
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Impskin
|
|
||||||
X12710:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12660
|
|
||||||
Repair_Material_Pretty_Name: "Imp Leather"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 528
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Impskin
|
|
||||||
X12709:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12660
|
|
||||||
Repair_Material_Pretty_Name: "Imp Leather"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 363
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Impskin
|
|
||||||
X12709:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12660
|
|
||||||
Repair_Material_Pretty_Name: "Imp Leather"
|
|
||||||
Repair_Material_Data_Value: 6
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 495
|
|
||||||
@@ -1,272 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Natura 2.1.14
|
|
||||||
Axes:
|
|
||||||
# Bloodwood
|
|
||||||
X12685:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Bloodwood Planks"
|
|
||||||
Repair_Material_Data_Value: 4
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 350
|
|
||||||
# Darkwood
|
|
||||||
X12689:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Darkwood Planks"
|
|
||||||
Repair_Material_Data_Value: 11
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 131
|
|
||||||
# Fusewood
|
|
||||||
X12693:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Fusewood Planks"
|
|
||||||
Repair_Material_Data_Value: 12
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 250
|
|
||||||
# Ghostwood
|
|
||||||
X12681:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Ghostwood Planks"
|
|
||||||
Repair_Material_Data_Value: 2
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 59
|
|
||||||
# Quartz
|
|
||||||
X12697:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: QUARTZ_BLOCK
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 131
|
|
||||||
|
|
||||||
Bows:
|
|
||||||
# Bloodwood
|
|
||||||
X12706:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12677
|
|
||||||
Repair_Material_Pretty_Name: "Bloodwood Stick"
|
|
||||||
Repair_Material_Data_Value: 4
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 1501
|
|
||||||
# Darkwood
|
|
||||||
X12707:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12677
|
|
||||||
Repair_Material_Pretty_Name: "Darkwood Stick"
|
|
||||||
Repair_Material_Data_Value: 11
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 162
|
|
||||||
# Fusewood
|
|
||||||
X12708:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12677
|
|
||||||
Repair_Material_Pretty_Name: "Fusewood Stick"
|
|
||||||
Repair_Material_Data_Value: 12
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 28
|
|
||||||
# Ghostwood
|
|
||||||
X12705:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X12677
|
|
||||||
Repair_Material_Pretty_Name: "Ghostwood Stick"
|
|
||||||
Repair_Material_Data_Value: 2
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 384
|
|
||||||
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Bloodwood
|
|
||||||
X12683:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Bloodwood Planks"
|
|
||||||
Repair_Material_Data_Value: 4
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 350
|
|
||||||
# Darkwood
|
|
||||||
X12687:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Darkwood Planks"
|
|
||||||
Repair_Material_Data_Value: 11
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 131
|
|
||||||
# Fusewood
|
|
||||||
X12691:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Fusewood Planks"
|
|
||||||
Repair_Material_Data_Value: 12
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 250
|
|
||||||
# Ghostwood
|
|
||||||
X12679:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Ghostwood Planks"
|
|
||||||
Repair_Material_Data_Value: 2
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 59
|
|
||||||
# Quartz
|
|
||||||
X12695:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: QUARTZ_BLOCK
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 131
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Bloodwood
|
|
||||||
X12684:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Bloodwood Planks"
|
|
||||||
Repair_Material_Data_Value: 4
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 350
|
|
||||||
# Darkwood
|
|
||||||
X12688:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Darkwood Planks"
|
|
||||||
Repair_Material_Data_Value: 11
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 131
|
|
||||||
# Fusewood
|
|
||||||
X12692:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Fusewood Planks"
|
|
||||||
Repair_Material_Data_Value: 12
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 250
|
|
||||||
# Ghostwood
|
|
||||||
X12680:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Ghostwood Planks"
|
|
||||||
Repair_Material_Data_Value: 2
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 59
|
|
||||||
# Quartz
|
|
||||||
X12696:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: QUARTZ_BLOCK
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 131
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Bloodwood
|
|
||||||
X12682:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Bloodwood Planks"
|
|
||||||
Repair_Material_Data_Value: 4
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 350
|
|
||||||
# Darkwood
|
|
||||||
X12686:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Darkwood Planks"
|
|
||||||
Repair_Material_Data_Value: 11
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
# Fusewood
|
|
||||||
X12690:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Fusewood Planks"
|
|
||||||
Repair_Material_Data_Value: 12
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 250
|
|
||||||
# Ghostwood
|
|
||||||
X12678:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X3262
|
|
||||||
Repair_Material_Pretty_Name: "Ghostwood Planks"
|
|
||||||
Repair_Material_Data_Value: 2
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 59
|
|
||||||
# Quartz
|
|
||||||
X12694:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: QUARTZ_BLOCK
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Project Red 4.3.5.30
|
|
||||||
Mining:
|
|
||||||
# Ruby
|
|
||||||
X2130|0:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Sapphire
|
|
||||||
X2130|1:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Peridot
|
|
||||||
X2130|2:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Marble
|
|
||||||
X2131|0:
|
|
||||||
XP_Gain: 30
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
# Basalt
|
|
||||||
X2131|3:
|
|
||||||
XP_Gain: 30
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
@@ -1,176 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Project Red 4.3.5.30
|
|
||||||
Axes:
|
|
||||||
# Ruby
|
|
||||||
X9353:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Ruby"
|
|
||||||
Repair_Material_Data_Value: 37
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
# Sapphire
|
|
||||||
X9354:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Sapphire"
|
|
||||||
Repair_Material_Data_Value: 38
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
# Peridot
|
|
||||||
X9355:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Peridot"
|
|
||||||
Repair_Material_Data_Value: 39
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Ruby
|
|
||||||
X9356:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Ruby"
|
|
||||||
Repair_Material_Data_Value: 37
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
# Sapphire
|
|
||||||
X9357:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Sapphire"
|
|
||||||
Repair_Material_Data_Value: 38
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
# Peridot
|
|
||||||
X9358:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Peridot"
|
|
||||||
Repair_Material_Data_Value: 39
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Ruby
|
|
||||||
X9359:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Ruby"
|
|
||||||
Repair_Material_Data_Value: 37
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
# Sapphire
|
|
||||||
X9360:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Sapphire"
|
|
||||||
Repair_Material_Data_Value: 38
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
# Peridot
|
|
||||||
X9361:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Peridot"
|
|
||||||
Repair_Material_Data_Value: 39
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Ruby
|
|
||||||
X9362:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Ruby"
|
|
||||||
Repair_Material_Data_Value: 37
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 500
|
|
||||||
# Sapphire
|
|
||||||
X9363:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Sapphire"
|
|
||||||
Repair_Material_Data_Value: 38
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 500
|
|
||||||
# Peridot
|
|
||||||
X9364:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Peridot"
|
|
||||||
Repair_Material_Data_Value: 39
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Ruby
|
|
||||||
X9365:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Ruby"
|
|
||||||
Repair_Material_Data_Value: 37
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
# Sapphire
|
|
||||||
X9366:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Sapphire"
|
|
||||||
Repair_Material_Data_Value: 38
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
# Peridot
|
|
||||||
X9368:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X9281
|
|
||||||
Repair_Material_Pretty_Name: "Peridot"
|
|
||||||
Repair_Material_Data_Value: 39
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 500
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
# Config wrote by Dragyn, updated by M1cr0man
|
|
||||||
# Up to date as of Railcraft 8.4.0.0
|
|
||||||
Boots:
|
|
||||||
# Steel
|
|
||||||
X7758:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X7796
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 325
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Steel
|
|
||||||
X7761:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X7796
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 400
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Steel
|
|
||||||
X7759:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X7796
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 275
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Steel
|
|
||||||
X7760:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X7796
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 375
|
|
||||||
# Overalls
|
|
||||||
X7757:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: WOOL
|
|
||||||
Repair_Material_Pretty_Name: "Light Blue Wool"
|
|
||||||
Repair_Material_Data_Value: 3
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 75
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Stargate Tech 2 Alpha 0.7.3
|
|
||||||
Mining:
|
|
||||||
# Naquadah Ore
|
|
||||||
X1005|0:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Thermal Expansion 3.0.0.7
|
|
||||||
Boots:
|
|
||||||
# Invar
|
|
||||||
X31973:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 325
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Invar
|
|
||||||
X31975:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 400
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Invar
|
|
||||||
X31976:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 275
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Invar
|
|
||||||
X31976:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 375
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Thermal Expansion 3.0.0.7
|
|
||||||
Mining:
|
|
||||||
# Copper
|
|
||||||
X4064|0:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Tin
|
|
||||||
X4064|1:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Silver
|
|
||||||
X4064|2:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Lead
|
|
||||||
X4064|3:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Ferrous
|
|
||||||
X4064|4:
|
|
||||||
XP_Gain: 300
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Thermal Expansion 3.0.0.7
|
|
||||||
Axes:
|
|
||||||
# Invar
|
|
||||||
X31969:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 450
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Invar
|
|
||||||
X31968:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 450
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Invar
|
|
||||||
X31970:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 3
|
|
||||||
Durability: 450
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Invar
|
|
||||||
X31971:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 1
|
|
||||||
Durability: 450
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Invar
|
|
||||||
X31972:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 3
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X31978
|
|
||||||
Repair_Material_Pretty_Name: "Invar Ingot"
|
|
||||||
Repair_Material_Data_Value: 71
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 450
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Up to date as of Tinker's Construct 1.5.5.7
|
|
||||||
# Also covers Tinker's Steelworks 0.0.4.2-fix2
|
|
||||||
Boots:
|
|
||||||
# Wooden (Repaired with Oak Wood)
|
|
||||||
X14366:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: LOG
|
|
||||||
Repair_Material_Pretty_Name: "Oak Wood"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 26
|
|
||||||
# Steel
|
|
||||||
X14771:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X14276
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 16
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 325
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Wooden (Repaired with Oak Wood)
|
|
||||||
X14364:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: LOG
|
|
||||||
Repair_Material_Pretty_Name: "Oak Wood"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 32
|
|
||||||
# Steel
|
|
||||||
X14769:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X14276
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 16
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 400
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Wooden (Repaired with Oak Wood)
|
|
||||||
X14362:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: LOG
|
|
||||||
Repair_Material_Pretty_Name: "Oak Wood"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 22
|
|
||||||
# Steel
|
|
||||||
X14768:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X14276
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 16
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 275
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Wooden (Repaired with Oak Wood)
|
|
||||||
X14362:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: LOG
|
|
||||||
Repair_Material_Pretty_Name: "Oak Wood"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 30
|
|
||||||
# Steel
|
|
||||||
X14768:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X14276
|
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 16
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 375
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Possibly incomplete. Only covers ores
|
|
||||||
# Up to date as of Tinker's Construct 1.5.5.7
|
|
||||||
Excavation:
|
|
||||||
# Iron
|
|
||||||
X1488|0:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Gold
|
|
||||||
X1488|1:
|
|
||||||
XP_Gain: 350
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Copper
|
|
||||||
X1488|2:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Tin
|
|
||||||
X1488|3:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Aluminum
|
|
||||||
X1488|4:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Cobalt
|
|
||||||
X1488|5:
|
|
||||||
XP_Gain: 500
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
|
|
||||||
Mining:
|
|
||||||
# Cobalt
|
|
||||||
X1475|1:
|
|
||||||
XP_Gain: 500
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Ardite
|
|
||||||
X1475|2:
|
|
||||||
XP_Gain: 500
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Copper
|
|
||||||
X1475|3:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Tin
|
|
||||||
X1475|4:
|
|
||||||
XP_Gain: 175
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
# Aluminium
|
|
||||||
X1475|5:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: true
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
# Config wrote by M1cr0man
|
|
||||||
# Abilites for Pickaxes and Shovels disabled due to a bug
|
|
||||||
# Repair disabled as mcMMO does not support NBTTag - based tools
|
|
||||||
# Up to date as of Tinker's Construct 1.5.5.7
|
|
||||||
# Also covers Tinker's Steelworks 0.0.4.2-fix2
|
|
||||||
Axes:
|
|
||||||
# Hatchets
|
|
||||||
X14309:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Mattocks
|
|
||||||
X14316:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Lumber Axes
|
|
||||||
X14317:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Battle Axes
|
|
||||||
X14327:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Bows:
|
|
||||||
# Shortbows
|
|
||||||
X14319:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Mattocks
|
|
||||||
X14316:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Scythes
|
|
||||||
X14323:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Pickaxes
|
|
||||||
X14307:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: false
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Hammers
|
|
||||||
X14326:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: false
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Shovels
|
|
||||||
X14308:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: false
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Mattocks
|
|
||||||
X14316:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: false
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Excavators
|
|
||||||
X14325:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: false
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Broadswords
|
|
||||||
X14311:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Longswords
|
|
||||||
X14312:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Rapiers
|
|
||||||
X14313:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Daggers
|
|
||||||
X14321:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Cleavers
|
|
||||||
X14324:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Battle Axes
|
|
||||||
X14327:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
# Cutlasses
|
|
||||||
X14328:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 2
|
|
||||||
Repairable: false
|
|
||||||
Durability: 500
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
# Config wrote by Dragyn, updated by M1cr0man
|
|
||||||
# Up to date as of Twilight Forest 1.20.5
|
|
||||||
Boots:
|
|
||||||
# Ironwood
|
|
||||||
X27978:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 260
|
|
||||||
# Fiery
|
|
||||||
X27995:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Pretty_Name: "Fiery Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 325
|
|
||||||
# Stealeaf
|
|
||||||
X28002:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 260
|
|
||||||
# Knightmetal
|
|
||||||
X28037:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 4
|
|
||||||
Durability: 260
|
|
||||||
|
|
||||||
Chestplates:
|
|
||||||
# Ironwood
|
|
||||||
X27976:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 320
|
|
||||||
# Naga Scale
|
|
||||||
X27958:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27957
|
|
||||||
Repair_Material_Pretty_Name: "Naga Scale"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 336
|
|
||||||
# Fiery
|
|
||||||
X27993:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Pretty_Name: "Fiery Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 400
|
|
||||||
# Stealeaf
|
|
||||||
X28000:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 320
|
|
||||||
# Knightmetal
|
|
||||||
X28035:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 8
|
|
||||||
Durability: 320
|
|
||||||
# Phantom
|
|
||||||
X28035:
|
|
||||||
Repairable: false
|
|
||||||
Durability: 480
|
|
||||||
|
|
||||||
Helmets:
|
|
||||||
# Ironwood
|
|
||||||
X27975:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 220
|
|
||||||
# Fiery
|
|
||||||
X27992:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Pretty_Name: "Fiery Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 275
|
|
||||||
# Stealeaf
|
|
||||||
X27999:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 220
|
|
||||||
# Knightmetal
|
|
||||||
X28034:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 5
|
|
||||||
Durability: 220
|
|
||||||
# Phantom
|
|
||||||
X28034:
|
|
||||||
Repairable: false
|
|
||||||
Durability: 330
|
|
||||||
|
|
||||||
Leggings:
|
|
||||||
# Ironwood
|
|
||||||
X27977:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 300
|
|
||||||
# Naga Scale
|
|
||||||
X27959:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27957
|
|
||||||
Repair_Material_Pretty_Name: "Naga Scale"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 315
|
|
||||||
# Fiery
|
|
||||||
X27994:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Pretty_Name: "Fiery Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 375
|
|
||||||
# Stealeaf
|
|
||||||
X28001:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 300
|
|
||||||
# Knightmetal
|
|
||||||
X28036:
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 7
|
|
||||||
Durability: 300
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
# Config wrote by Dragyn, updated by M1cr0man
|
|
||||||
# Up to date as of Twilight Forest 1.20.5
|
|
||||||
Axes:
|
|
||||||
# Ironwood
|
|
||||||
X27982:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Steeleaf
|
|
||||||
X28006:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
# Knightmetal
|
|
||||||
X28040:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Minotaur
|
|
||||||
X28008:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: false
|
|
||||||
Durability: 1561
|
|
||||||
|
|
||||||
Hoes:
|
|
||||||
# Ironwood
|
|
||||||
X27983:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Steeleaf
|
|
||||||
X28007:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
|
|
||||||
Pickaxes:
|
|
||||||
# Ironwood
|
|
||||||
X27981:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Fiery
|
|
||||||
X27997:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 1024
|
|
||||||
# Steeleaf
|
|
||||||
X28005:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
# Knightmetal
|
|
||||||
X28039:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
|
|
||||||
Shovels:
|
|
||||||
# Ironwood
|
|
||||||
X27980:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Steeleaf
|
|
||||||
X28004:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
|
|
||||||
Swords:
|
|
||||||
# Ironwood
|
|
||||||
X27979:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27974
|
|
||||||
Repair_Material_Pretty_Name: "Ironwood Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
# Fiery
|
|
||||||
X27996:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27991
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 1024
|
|
||||||
# Steeleaf
|
|
||||||
X28003:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X27998
|
|
||||||
Repair_Material_Pretty_Name: "Steeleaf"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 131
|
|
||||||
# Knightmetal
|
|
||||||
X28038:
|
|
||||||
XP_Modifier: 1.0
|
|
||||||
Ability_Enabled: true
|
|
||||||
Tier: 1
|
|
||||||
Repairable: true
|
|
||||||
Repair_Material: X28032
|
|
||||||
Repair_Material_Pretty_Name: "Knightmetal Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
|
||||||
Repair_Material_Quantity: 2
|
|
||||||
Durability: 512
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
# Config created by joulesbeef
|
|
||||||
# Created For twilightforest-2.2.3
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Settings for Custom Herbalism Blocks
|
|
||||||
###
|
|
||||||
Herbalism:
|
|
||||||
# Mushgloom
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|9:
|
|
||||||
XP_Gain: 150
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Torchberry Plant
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|13:
|
|
||||||
XP_Gain: 20
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Mayapple
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|4:
|
|
||||||
XP_Gain: 30
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
# Fiddlehead
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|8:
|
|
||||||
XP_Gain: 35
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Settings for Custom Mining Blocks
|
|
||||||
###
|
|
||||||
Mining:
|
|
||||||
# Mazestone
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|0:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|1:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|2:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|3:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|4:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|5:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|6:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
TWILIGHTFOREST_TILE_TFMAZESTONE|7:
|
|
||||||
XP_Gain: 250
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Ore: false
|
|
||||||
|
|
||||||
#
|
|
||||||
# Settings for Custom Woodcutting Blocks
|
|
||||||
###
|
|
||||||
Woodcutting:
|
|
||||||
# Twilight Oak
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|0:
|
|
||||||
XP_Gain: 70
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Canopy
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|1:
|
|
||||||
XP_Gain: 80
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Mangrove
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|2:
|
|
||||||
XP_Gain: 90
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Darkwood
|
|
||||||
TWILIGHTFOREST_TILE_TFLOG|3:
|
|
||||||
XP_Gain: 100
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Roots
|
|
||||||
TWILIGHTFOREST_TILE_TFROOTS|0:
|
|
||||||
XP_Gain: 10
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: false
|
|
||||||
TWILIGHTFOREST_TILE_TFROOTS|1:
|
|
||||||
XP_Gain: 10
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: false
|
|
||||||
# Timewood
|
|
||||||
TWILIGHTFOREST_TILE_TFMAGICLOG|0:
|
|
||||||
XP_Gain: 1000
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Transwood
|
|
||||||
TWILIGHTFOREST_TILE_TFMAGICLOG|1:
|
|
||||||
XP_Gain: 1000
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Minewood
|
|
||||||
TWILIGHTFOREST_TILE_TFMAGICLOG|2:
|
|
||||||
XP_Gain: 1000
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
# Sortingwood
|
|
||||||
TWILIGHTFOREST_TILE_TFMAGICLOG|3:
|
|
||||||
XP_Gain: 1000
|
|
||||||
Double_Drops_Enabled: true
|
|
||||||
Is_Log: true
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
# Config created by joulesbeef
|
|
||||||
# Created For twilightforest-2.2.3
|
|
||||||
#
|
|
||||||
# Settings for Custom Mobs
|
|
||||||
MoCreatures-Ogre:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-TwilightLich:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-HelmetCrab:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-SlimeBeetle:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-TwilightWraith:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-Naga:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
MoCreatures-Shark:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-TowerTermite:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
MoCreatures-SmallFish:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-Redcap:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-YetiBoss:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
MoCreatures-HellRat:
|
|
||||||
Class: Monster
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-Hydra:
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-Firefly:
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-KnightPhantom:
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
TwilightForest-TowerGolem:
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
MoCreatures-FishBowl:
|
|
||||||
XP_Multiplier: 1.0
|
|
||||||
Tameable: false
|
|
||||||
Taming_XP: 0
|
|
||||||
CanBeSummoned: false
|
|
||||||
COTW_Material: ''
|
|
||||||
COTW_Material_Data: 0
|
|
||||||
COTW_Material_Amount: 0
|
|
||||||
44
extras/mods/railcraft.armor.yml
Executable file
44
extras/mods/railcraft.armor.yml
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
# Config created by Dragyn
|
||||||
|
# Created For Railcraft_1.6.2-8.1.0.0
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Settings for Boots
|
||||||
|
###
|
||||||
|
Boots:
|
||||||
|
X7758:
|
||||||
|
Repairable: true
|
||||||
|
Repair_Material: X7796
|
||||||
|
Repair_Material_Data_Value: 0
|
||||||
|
Repair_Material_Quantity: 2
|
||||||
|
Durability: 500
|
||||||
|
#
|
||||||
|
# Settings for Chestplates
|
||||||
|
###
|
||||||
|
Chestplates:
|
||||||
|
X7761:
|
||||||
|
Repairable: true
|
||||||
|
Repair_Material: X7796
|
||||||
|
Repair_Material_Data_Value: 0
|
||||||
|
Repair_Material_Quantity: 2
|
||||||
|
Durability: 500
|
||||||
|
#
|
||||||
|
# Settings for Helmets
|
||||||
|
###
|
||||||
|
Helmets:
|
||||||
|
X7759:
|
||||||
|
Repairable: true
|
||||||
|
Repair_Material: X7796
|
||||||
|
Repair_Material_Data_Value: 0
|
||||||
|
Repair_Material_Quantity: 2
|
||||||
|
Durability: 500
|
||||||
|
#
|
||||||
|
# Settings for Leggings
|
||||||
|
###
|
||||||
|
Leggings:
|
||||||
|
X7760:
|
||||||
|
Repairable: true
|
||||||
|
Repair_Material: X7796
|
||||||
|
Repair_Material_Data_Value: 0
|
||||||
|
Repair_Material_Quantity: 2
|
||||||
|
Durability: 500
|
||||||
|
|
||||||
@@ -1,66 +1,76 @@
|
|||||||
# Config wrote by Dragyn, updated by M1cr0man
|
# Config created by Dragyn
|
||||||
# Up to date as of Railcraft 8.4.0.0
|
# Created For Railcraft_1.6.2-8.1.0.0
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Settings for Axes
|
||||||
|
###
|
||||||
Axes:
|
Axes:
|
||||||
# Steel
|
# Steel
|
||||||
X7819:
|
X7819:
|
||||||
XP_Modifier: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: X7796
|
Repair_Material: X7796
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Settings for Hoes
|
||||||
|
###
|
||||||
Hoes:
|
Hoes:
|
||||||
# Steel
|
# Steel
|
||||||
X7820:
|
X7820:
|
||||||
XP_Modifier: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: X7796
|
Repair_Material: X7796
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
|
||||||
|
#
|
||||||
|
# Settings for Pickaxes
|
||||||
|
###
|
||||||
Pickaxes:
|
Pickaxes:
|
||||||
# Steel
|
# Steel
|
||||||
X7821:
|
X7821:
|
||||||
XP_Modifier: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: X7796
|
Repair_Material: X7796
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
#
|
||||||
|
# Settings for Shovels
|
||||||
|
###
|
||||||
Shovels:
|
Shovels:
|
||||||
# Steel
|
# Steel
|
||||||
X7823:
|
X7823:
|
||||||
XP_Modifier: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: X7796
|
Repair_Material: X7796
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
#
|
||||||
|
# Settings for Swords
|
||||||
|
###
|
||||||
Swords:
|
Swords:
|
||||||
# Steel
|
# Steel
|
||||||
X7824:
|
X7824:
|
||||||
XP_Modifier: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: X7796
|
Repair_Material: X7796
|
||||||
Repair_Material_Pretty_Name: "Steel Ingot"
|
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
78
extras/mods/1.7.x/twilightforest.armor.yml → extras/mods/twilightforest.armor.yml
Normal file → Executable file
78
extras/mods/1.7.x/twilightforest.armor.yml → extras/mods/twilightforest.armor.yml
Normal file → Executable file
@@ -1,68 +1,68 @@
|
|||||||
# Config created by joulesbeef
|
# Config created by Dragyn
|
||||||
# Created For twilightforest-2.2.3
|
# Created For twilightforest-1.20.3
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Settings for Boots
|
# Settings for Boots
|
||||||
###
|
###
|
||||||
Boots:
|
Boots:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODBOOTS:
|
X27978:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYBOOTS:
|
X27995:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Stealeaf
|
# Stealeaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFBOOTS:
|
X28002:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYBOOTS:
|
X28037:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for Chestplates
|
# Settings for Chestplates
|
||||||
###
|
###
|
||||||
Chestplates:
|
Chestplates:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODPLATE:
|
X27976:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYPLATE:
|
X27993:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Stealeaf
|
# Stealeaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFPLATE:
|
X28000:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYPLATE:
|
X28035:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
@@ -72,61 +72,63 @@ Chestplates:
|
|||||||
###
|
###
|
||||||
Helmets:
|
Helmets:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODHELM:
|
X27975:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYHELM:
|
X27992:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Stealeaf
|
# Stealeaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFHELM:
|
X27999:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYHELM:
|
X28034:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 50
|
Durability: 500
|
||||||
|
|
||||||
|
#
|
||||||
# Settings for Leggings
|
# Settings for Leggings
|
||||||
###
|
###
|
||||||
Leggings:
|
Leggings:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODLEGS:
|
X27977:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYLEGS:
|
X27994:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Stealeaf
|
# Stealeaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFLEGS:
|
X28001:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYLEGS:
|
X28036:
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
72
extras/mods/1.7.x/twilightforest.tools.yml → extras/mods/twilightforest.tools.yml
Normal file → Executable file
72
extras/mods/1.7.x/twilightforest.tools.yml → extras/mods/twilightforest.tools.yml
Normal file → Executable file
@@ -1,71 +1,73 @@
|
|||||||
# Config created by joulesbeef
|
# Config created by Dragyn
|
||||||
# Created For twilightforest-2.2.3
|
# Created For twilightforest-1.20.3
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Settings for Axes
|
# Settings for Axes
|
||||||
###
|
###
|
||||||
Axes:
|
Axes:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODAXE:
|
X27982:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Steeleaf
|
# Steeleaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFAXE:
|
X31989:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYAXE:
|
X28040:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Minotaur
|
# Minotaur
|
||||||
TWILIGHTFOREST_ITEM_MINOTAURAXE:
|
X31984:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: Diamond
|
Repair_Material: X264
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for Hoes
|
# Settings for Hoes
|
||||||
###
|
###
|
||||||
Hoes:
|
Hoes:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODHOE:
|
X27983:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Steeleaf
|
# Steeleaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFHOE:
|
X31988:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
@@ -75,42 +77,42 @@ Hoes:
|
|||||||
###
|
###
|
||||||
Pickaxes:
|
Pickaxes:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODPICK:
|
X27981:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYPICK:
|
X27997:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Steeleaf
|
# Steeleaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFPICK:
|
X28005:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYPICK:
|
X28039:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
@@ -119,22 +121,22 @@ Pickaxes:
|
|||||||
###
|
###
|
||||||
Shovels:
|
Shovels:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODSHOVEL:
|
X27980:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Steeleaf
|
# Steeleaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFSHOVEL:
|
X28004:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
@@ -143,42 +145,42 @@ Shovels:
|
|||||||
###
|
###
|
||||||
Swords:
|
Swords:
|
||||||
# Ironwood
|
# Ironwood
|
||||||
TWILIGHTFOREST_ITEM_IRONWOODSWORD:
|
X27979:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_IRONWOODINGOT
|
Repair_Material: X27974
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Fiery
|
# Fiery
|
||||||
TWILIGHTFOREST_ITEM_FIERYSWORD:
|
X27996:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_FIERYINGOT
|
Repair_Material: X27991
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Steeleaf
|
# Steeleaf
|
||||||
TWILIGHTFOREST_ITEM_STEELEAFSWORD:
|
X28003:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_STEELEAFINGOT
|
Repair_Material: X27998
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
# Knightmetal
|
# Knightmetal
|
||||||
TWILIGHTFOREST_ITEM_KNIGHTLYSWORD:
|
X28038:
|
||||||
XP_Modifer: 1.0
|
XP_Modifer: 1.0
|
||||||
Ability_Enabled: true
|
Ability_Enabled: true
|
||||||
Tier: 1
|
Tier: 1
|
||||||
Repairable: true
|
Repairable: true
|
||||||
Repair_Material: TWILIGHTFOREST_ITEM_KNIGHTMETAL
|
Repair_Material: X28032
|
||||||
Repair_Material_Data_Value: 0
|
Repair_Material_Data_Value: 0
|
||||||
Repair_Material_Quantity: 2
|
Repair_Material_Quantity: 2
|
||||||
Durability: 500
|
Durability: 500
|
||||||
53
pom.xml
53
pom.xml
@@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>1.5.04-SNAPSHOT</version>
|
<version>1.4.09-SNAPSHOT</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
@@ -38,14 +38,6 @@
|
|||||||
<include>*.yml</include>
|
<include>*.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
|
||||||
<targetPath>.</targetPath>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
<directory>${basedir}</directory>
|
|
||||||
<includes>
|
|
||||||
<include>LICENSE</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -84,9 +76,6 @@
|
|||||||
<artifactSet>
|
<artifactSet>
|
||||||
<includes>
|
<includes>
|
||||||
<include>com.turt2live.metrics:MetricsExtension</include>
|
<include>com.turt2live.metrics:MetricsExtension</include>
|
||||||
<include>commons-logging:commons-logging</include>
|
|
||||||
<include>org.apache.tomcat:tomcat-jdbc</include>
|
|
||||||
<include>org.apache.tomcat:tomcat-juli</include>
|
|
||||||
</includes>
|
</includes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
<relocations>
|
<relocations>
|
||||||
@@ -94,18 +83,6 @@
|
|||||||
<pattern>com.turt2live.metrics</pattern>
|
<pattern>com.turt2live.metrics</pattern>
|
||||||
<shadedPattern>com.gmail.nossr50.metrics.mcstats</shadedPattern>
|
<shadedPattern>com.gmail.nossr50.metrics.mcstats</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
|
||||||
<pattern>org.apache.commons.logging</pattern>
|
|
||||||
<shadedPattern>com.gmail.nossr50.commons.logging</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>org.apache.juli</pattern>
|
|
||||||
<shadedPattern>com.gmail.nossr50.database.tomcat.juli</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>org.apache.tomcat</pattern>
|
|
||||||
<shadedPattern>com.gmail.nossr50.database.tomcat</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
@@ -128,8 +105,12 @@
|
|||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>bukkit-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>md_5-releases</id>
|
||||||
|
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>Plugin MetricsExtension</id>
|
<id>Plugin MetricsExtension</id>
|
||||||
@@ -140,9 +121,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.8-R0.1-SNAPSHOT</version>
|
<version>1.6.4-R2.0</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>provided</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
@@ -155,24 +136,22 @@
|
|||||||
<artifactId>MetricsExtension</artifactId>
|
<artifactId>MetricsExtension</artifactId>
|
||||||
<version>0.0.5-SNAPSHOT</version>
|
<version>0.0.5-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tomcat</groupId>
|
|
||||||
<artifactId>tomcat-jdbc</artifactId>
|
|
||||||
<version>7.0.52</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>drtshock-releases</id>
|
<id>md_5-releases</id>
|
||||||
<url>https://ci.drtshock.net/plugin/repository/everything/com/gmail/nossr50/mcMMO/</url>
|
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>md_5-snapshots</id>
|
||||||
|
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<ciManagement>
|
<ciManagement>
|
||||||
<system>Jenkins</system>
|
<system>Jenkins</system>
|
||||||
<url>https://ci.drtshock.net/job/mcmmo/</url>
|
<url>http://ci.ecocitycraft.com/job/mcMMO</url>
|
||||||
</ciManagement>
|
</ciManagement>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
package com.gmail.nossr50.api;
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.api.exceptions.InvalidFormulaTypeException;
|
|
||||||
import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
|
import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
|
||||||
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
||||||
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
|
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
|
||||||
import com.gmail.nossr50.api.exceptions.McMMOPlayerNotFoundException;
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||||
@@ -88,40 +83,9 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||||
*/
|
*/
|
||||||
public static void addRawXP(Player player, String skillType, float XP, String xpGainReason) {
|
public static void addRawXP(Player player, String skillType, float XP, String xpGainReason) {
|
||||||
addRawXP(player, skillType, XP, xpGainReason, false);
|
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds raw XP to the player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param player The player to add XP to
|
|
||||||
* @param skillType The skill to add XP to
|
|
||||||
* @param XP The amount of XP to add
|
|
||||||
* @param xpGainReason The reason to gain XP
|
|
||||||
* @param isUnshared true if the XP cannot be shared with party members
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
|
||||||
*/
|
|
||||||
public static void addRawXP(Player player, String skillType, float XP, String xpGainReason, boolean isUnshared) {
|
|
||||||
if (isUnshared) {
|
|
||||||
getPlayer(player).beginUnsharedXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPlayer(player).applyXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds raw XP to an offline player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @deprecated We're using float for our XP values now
|
|
||||||
* replaced by {@link #addRawXPOffline(String playerName, String skillType, float XP)}
|
|
||||||
*/
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void addRawXPOffline(String playerName, String skillType, int XP) {
|
public static void addRawXPOffline(String playerName, String skillType, int XP) {
|
||||||
addRawXPOffline(playerName, skillType, (float) XP);
|
addRawXPOffline(playerName, skillType, (float) XP);
|
||||||
@@ -132,9 +96,6 @@ public final class ExperienceAPI {
|
|||||||
* </br>
|
* </br>
|
||||||
* This function is designed for API usage.
|
* This function is designed for API usage.
|
||||||
*
|
*
|
||||||
* @deprecated We're using uuids to get an offline player
|
|
||||||
* replaced by {@link #addRawXPOffline(UUID uuid, String skillType, float XP)}
|
|
||||||
*
|
|
||||||
* @param playerName The player to add XP to
|
* @param playerName The player to add XP to
|
||||||
* @param skillType The skill to add XP to
|
* @param skillType The skill to add XP to
|
||||||
* @param XP The amount of XP to add
|
* @param XP The amount of XP to add
|
||||||
@@ -142,27 +103,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void addRawXPOffline(String playerName, String skillType, float XP) {
|
public static void addRawXPOffline(String playerName, String skillType, float XP) {
|
||||||
addOfflineXP(playerName, getSkillType(skillType), (int) Math.floor(XP));
|
addOfflineXP(playerName, getSkillType(skillType), (int) Math.floor(XP));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds raw XP to an offline player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The UUID of player to add XP to
|
|
||||||
* @param skillType The skill to add XP to
|
|
||||||
* @param XP The amount of XP to add
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*/
|
|
||||||
public static void addRawXPOffline(UUID uuid, String skillType, float XP) {
|
|
||||||
addOfflineXP(uuid, getSkillType(skillType), (int) Math.floor(XP));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds XP to the player, calculates for XP Rate only.
|
* Adds XP to the player, calculates for XP Rate only.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -193,7 +137,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||||
*/
|
*/
|
||||||
public static void addMultipliedXP(Player player, String skillType, int XP, String xpGainReason) {
|
public static void addMultipliedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||||
getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -208,7 +152,6 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void addMultipliedXPOffline(String playerName, String skillType, int XP) {
|
public static void addMultipliedXPOffline(String playerName, String skillType, int XP) {
|
||||||
addOfflineXP(playerName, getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
addOfflineXP(playerName, getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||||
}
|
}
|
||||||
@@ -243,32 +186,9 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||||
*/
|
*/
|
||||||
public static void addModifiedXP(Player player, String skillType, int XP, String xpGainReason) {
|
public static void addModifiedXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||||
addModifiedXP(player, skillType, XP, xpGainReason, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds XP to the player, calculates for XP Rate and skill modifier.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param player The player to add XP to
|
|
||||||
* @param skillType The skill to add XP to
|
|
||||||
* @param XP The amount of XP to add
|
|
||||||
* @param xpGainReason The reason to gain XP
|
|
||||||
* @param isUnshared true if the XP cannot be shared with party members
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
|
||||||
*/
|
|
||||||
public static void addModifiedXP(Player player, String skillType, int XP, String xpGainReason, boolean isUnshared) {
|
|
||||||
SkillType skill = getSkillType(skillType);
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
if (isUnshared) {
|
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
||||||
getPlayer(player).beginUnsharedXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()), getXPGainReason(xpGainReason));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -283,7 +203,6 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void addModifiedXPOffline(String playerName, String skillType, int XP) {
|
public static void addModifiedXPOffline(String playerName, String skillType, int XP) {
|
||||||
SkillType skill = getSkillType(skillType);
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
@@ -322,31 +241,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
||||||
*/
|
*/
|
||||||
public static void addXP(Player player, String skillType, int XP, String xpGainReason) {
|
public static void addXP(Player player, String skillType, int XP, String xpGainReason) {
|
||||||
addXP(player, skillType, XP, xpGainReason, false);
|
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds XP to the player, calculates for XP Rate, skill modifiers, perks, child skills,
|
|
||||||
* and party sharing.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param player The player to add XP to
|
|
||||||
* @param skillType The skill to add XP to
|
|
||||||
* @param XP The amount of XP to add
|
|
||||||
* @param xpGainReason The reason to gain XP
|
|
||||||
* @param isUnshared true if the XP cannot be shared with party members
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidXPGainReasonException if the given xpGainReason is not valid
|
|
||||||
*/
|
|
||||||
public static void addXP(Player player, String skillType, int XP, String xpGainReason, boolean isUnshared) {
|
|
||||||
if (isUnshared) {
|
|
||||||
getPlayer(player).beginUnsharedXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPlayer(player).beginXpGain(getSkillType(skillType), XP, getXPGainReason(xpGainReason));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -362,7 +257,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
public static int getXP(Player player, String skillType) {
|
public static int getXP(Player player, String skillType) {
|
||||||
return getPlayer(player).getSkillXpLevel(getNonChildSkillType(skillType));
|
return UserManager.getPlayer(player).getSkillXpLevel(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -378,28 +273,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getOfflineXP(String playerName, String skillType) {
|
public static int getOfflineXP(String playerName, String skillType) {
|
||||||
return getOfflineProfile(playerName).getSkillXpLevel(getNonChildSkillType(skillType));
|
return getOfflineProfile(playerName).getSkillXpLevel(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the amount of XP an offline player has in a specific skill.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get XP for
|
|
||||||
* @param skillType The skill to get XP for
|
|
||||||
* @return the amount of XP in a given skill
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static int getOfflineXP(UUID uuid, String skillType) {
|
|
||||||
return getOfflineProfile(uuid).getSkillXpLevel(getNonChildSkillType(skillType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the raw amount of XP a player has in a specific skill.
|
* Get the raw amount of XP a player has in a specific skill.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -413,7 +290,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
public static float getXPRaw(Player player, String skillType) {
|
public static float getXPRaw(Player player, String skillType) {
|
||||||
return getPlayer(player).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
return UserManager.getPlayer(player).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -429,28 +306,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static float getOfflineXPRaw(String playerName, String skillType) {
|
public static float getOfflineXPRaw(String playerName, String skillType) {
|
||||||
return getOfflineProfile(playerName).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
return getOfflineProfile(playerName).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the raw amount of XP an offline player has in a specific skill.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get XP for
|
|
||||||
* @param skillType The skill to get XP for
|
|
||||||
* @return the amount of XP in a given skill
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static float getOfflineXPRaw(UUID uuid, String skillType) {
|
|
||||||
return getOfflineProfile(uuid).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the total amount of XP needed to reach the next level.
|
* Get the total amount of XP needed to reach the next level.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -464,7 +323,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
public static int getXPToNextLevel(Player player, String skillType) {
|
public static int getXPToNextLevel(Player player, String skillType) {
|
||||||
return getPlayer(player).getXpToLevel(getNonChildSkillType(skillType));
|
return UserManager.getPlayer(player).getXpToLevel(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -480,28 +339,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getOfflineXPToNextLevel(String playerName, String skillType) {
|
public static int getOfflineXPToNextLevel(String playerName, String skillType) {
|
||||||
return getOfflineProfile(playerName).getXpToLevel(getNonChildSkillType(skillType));
|
return getOfflineProfile(playerName).getXpToLevel(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the total amount of XP an offline player needs to reach the next level.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get XP for
|
|
||||||
* @param skillType The skill to get XP for
|
|
||||||
* @return the total amount of XP needed to reach the next level
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static int getOfflineXPToNextLevel(UUID uuid, String skillType) {
|
|
||||||
return getOfflineProfile(uuid).getXpToLevel(getNonChildSkillType(skillType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the amount of XP remaining until the next level.
|
* Get the amount of XP remaining until the next level.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -517,7 +358,7 @@ public final class ExperienceAPI {
|
|||||||
public static int getXPRemaining(Player player, String skillType) {
|
public static int getXPRemaining(Player player, String skillType) {
|
||||||
SkillType skill = getNonChildSkillType(skillType);
|
SkillType skill = getNonChildSkillType(skillType);
|
||||||
|
|
||||||
PlayerProfile profile = getPlayer(player).getProfile();
|
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
|
||||||
|
|
||||||
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
||||||
}
|
}
|
||||||
@@ -535,34 +376,14 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getOfflineXPRemaining(String playerName, String skillType) {
|
public static int getOfflineXPRemaining(String playerName, String skillType) {
|
||||||
SkillType skill = getNonChildSkillType(skillType);
|
SkillType skill = getNonChildSkillType(skillType);
|
||||||
|
|
||||||
PlayerProfile profile = getOfflineProfile(playerName);
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
|
||||||
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the amount of XP an offline player has left before leveling up.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get XP for
|
|
||||||
* @param skillType The skill to get XP for
|
|
||||||
* @return the amount of XP needed to reach the next level
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static float getOfflineXPRemaining(UUID uuid, String skillType) {
|
|
||||||
SkillType skill = getNonChildSkillType(skillType);
|
|
||||||
PlayerProfile profile = getOfflineProfile(uuid);
|
|
||||||
|
|
||||||
return profile.getXpToLevel(skill) - profile.getSkillXpLevelRaw(skill);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add levels to a skill.
|
* Add levels to a skill.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -575,7 +396,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
*/
|
*/
|
||||||
public static void addLevel(Player player, String skillType, int levels) {
|
public static void addLevel(Player player, String skillType, int levels) {
|
||||||
getPlayer(player).addLevels(getSkillType(skillType), levels);
|
UserManager.getPlayer(player).addLevels(getSkillType(skillType), levels);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -590,7 +411,6 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void addLevelOffline(String playerName, String skillType, int levels) {
|
public static void addLevelOffline(String playerName, String skillType, int levels) {
|
||||||
PlayerProfile profile = getOfflineProfile(playerName);
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
SkillType skill = getSkillType(skillType);
|
SkillType skill = getSkillType(skillType);
|
||||||
@@ -610,37 +430,6 @@ public final class ExperienceAPI {
|
|||||||
profile.scheduleAsyncSave();
|
profile.scheduleAsyncSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add levels to a skill for an offline player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to add levels to
|
|
||||||
* @param skillType Type of skill to add levels to
|
|
||||||
* @param levels Number of levels to add
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*/
|
|
||||||
public static void addLevelOffline(UUID uuid, String skillType, int levels) {
|
|
||||||
PlayerProfile profile = getOfflineProfile(uuid);
|
|
||||||
SkillType skill = getSkillType(skillType);
|
|
||||||
|
|
||||||
if (skill.isChildSkill()) {
|
|
||||||
Set<SkillType> parentSkills = FamilyTree.getParents(skill);
|
|
||||||
|
|
||||||
for (SkillType parentSkill : parentSkills) {
|
|
||||||
profile.addLevels(parentSkill, (levels / parentSkills.size()));
|
|
||||||
}
|
|
||||||
|
|
||||||
profile.scheduleAsyncSave();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile.addLevels(skill, levels);
|
|
||||||
profile.scheduleAsyncSave();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the level a player has in a specific skill.
|
* Get the level a player has in a specific skill.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -653,7 +442,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
*/
|
*/
|
||||||
public static int getLevel(Player player, String skillType) {
|
public static int getLevel(Player player, String skillType) {
|
||||||
return getPlayer(player).getSkillLevel(getSkillType(skillType));
|
return UserManager.getPlayer(player).getSkillLevel(getSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -668,27 +457,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getLevelOffline(String playerName, String skillType) {
|
public static int getLevelOffline(String playerName, String skillType) {
|
||||||
return getOfflineProfile(playerName).getSkillLevel(getSkillType(skillType));
|
return getOfflineProfile(playerName).getSkillLevel(getSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the level an offline player has in a specific skill.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get the level for
|
|
||||||
* @param skillType The skill to get the level for
|
|
||||||
* @return the level of a given skill
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*/
|
|
||||||
public static int getLevelOffline(UUID uuid, String skillType) {
|
|
||||||
return getOfflineProfile(uuid).getSkillLevel(getSkillType(skillType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the power level of a player.
|
* Gets the power level of a player.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -698,7 +470,7 @@ public final class ExperienceAPI {
|
|||||||
* @return the power level of the player
|
* @return the power level of the player
|
||||||
*/
|
*/
|
||||||
public static int getPowerLevel(Player player) {
|
public static int getPowerLevel(Player player) {
|
||||||
return getPlayer(player).getPowerLevel();
|
return UserManager.getPlayer(player).getPowerLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -711,7 +483,6 @@ public final class ExperienceAPI {
|
|||||||
*
|
*
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getPowerLevelOffline(String playerName) {
|
public static int getPowerLevelOffline(String playerName) {
|
||||||
int powerLevel = 0;
|
int powerLevel = 0;
|
||||||
PlayerProfile profile = getOfflineProfile(playerName);
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
@@ -723,27 +494,6 @@ public final class ExperienceAPI {
|
|||||||
return powerLevel;
|
return powerLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the power level of an offline player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to get the power level for
|
|
||||||
* @return the power level of the player
|
|
||||||
*
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*/
|
|
||||||
public static int getPowerLevelOffline(UUID uuid) {
|
|
||||||
int powerLevel = 0;
|
|
||||||
PlayerProfile profile = getOfflineProfile(uuid);
|
|
||||||
|
|
||||||
for (SkillType type : SkillType.NON_CHILD_SKILLS) {
|
|
||||||
powerLevel += profile.getSkillLevel(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
return powerLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the level cap of a specific skill.
|
* Get the level cap of a specific skill.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -783,28 +533,10 @@ public final class ExperienceAPI {
|
|||||||
*
|
*
|
||||||
* @return the position on the leaderboard
|
* @return the position on the leaderboard
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getPlayerRankSkill(String playerName, String skillType) {
|
public static int getPlayerRankSkill(String playerName, String skillType) {
|
||||||
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType));
|
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the position on the leaderboard of a player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The name of the player to check
|
|
||||||
* @param skillType The skill to check
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*
|
|
||||||
* @return the position on the leaderboard
|
|
||||||
*/
|
|
||||||
public static int getPlayerRankSkill(UUID uuid, String skillType) {
|
|
||||||
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(getNonChildSkillType(skillType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the position on the power level leaderboard of a player.
|
* Get the position on the power level leaderboard of a player.
|
||||||
@@ -817,26 +549,10 @@ public final class ExperienceAPI {
|
|||||||
*
|
*
|
||||||
* @return the position on the power level leaderboard
|
* @return the position on the power level leaderboard
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static int getPlayerRankOverall(String playerName) {
|
public static int getPlayerRankOverall(String playerName) {
|
||||||
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null);
|
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the position on the power level leaderboard of a player.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The name of the player to check
|
|
||||||
*
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*
|
|
||||||
* @return the position on the power level leaderboard
|
|
||||||
*/
|
|
||||||
public static int getPlayerRankOverall(UUID uuid) {
|
|
||||||
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(uuid).getPlayerName()).get(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the level of a player in a specific skill type.
|
* Sets the level of a player in a specific skill type.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -849,7 +565,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
*/
|
*/
|
||||||
public static void setLevel(Player player, String skillType, int skillLevel) {
|
public static void setLevel(Player player, String skillType, int skillLevel) {
|
||||||
getPlayer(player).modifySkill(getSkillType(skillType), skillLevel);
|
UserManager.getPlayer(player).modifySkill(getSkillType(skillType), skillLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -864,27 +580,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidSkillException if the given skill is not valid
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void setLevelOffline(String playerName, String skillType, int skillLevel) {
|
public static void setLevelOffline(String playerName, String skillType, int skillLevel) {
|
||||||
getOfflineProfile(playerName).modifySkill(getSkillType(skillType), skillLevel);
|
getOfflineProfile(playerName).modifySkill(getSkillType(skillType), skillLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the level of an offline player in a specific skill type.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to set the level of
|
|
||||||
* @param skillType The skill to set the level for
|
|
||||||
* @param skillLevel The value to set the level to
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
*/
|
|
||||||
public static void setLevelOffline(UUID uuid, String skillType, int skillLevel) {
|
|
||||||
getOfflineProfile(uuid).modifySkill(getSkillType(skillType), skillLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the XP of a player in a specific skill type.
|
* Sets the XP of a player in a specific skill type.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -898,7 +597,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
public static void setXP(Player player, String skillType, int newValue) {
|
public static void setXP(Player player, String skillType, int newValue) {
|
||||||
getPlayer(player).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
UserManager.getPlayer(player).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -914,28 +613,10 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void setXPOffline(String playerName, String skillType, int newValue) {
|
public static void setXPOffline(String playerName, String skillType, int newValue) {
|
||||||
getOfflineProfile(playerName).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
getOfflineProfile(playerName).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the XP of an offline player in a specific skill type.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to set the XP of
|
|
||||||
* @param skillType The skill to set the XP for
|
|
||||||
* @param newValue The value to set the XP to
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static void setXPOffline(UUID uuid, String skillType, int newValue) {
|
|
||||||
getOfflineProfile(uuid).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes XP from a player in a specific skill type.
|
* Removes XP from a player in a specific skill type.
|
||||||
* </br>
|
* </br>
|
||||||
@@ -949,7 +630,7 @@ public final class ExperienceAPI {
|
|||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
public static void removeXP(Player player, String skillType, int xp) {
|
public static void removeXP(Player player, String skillType, int xp) {
|
||||||
getPlayer(player).removeXp(getNonChildSkillType(skillType), xp);
|
UserManager.getPlayer(player).removeXp(getNonChildSkillType(skillType), xp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -965,64 +646,12 @@ public final class ExperienceAPI {
|
|||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void removeXPOffline(String playerName, String skillType, int xp) {
|
public static void removeXPOffline(String playerName, String skillType, int xp) {
|
||||||
getOfflineProfile(playerName).removeXp(getNonChildSkillType(skillType), xp);
|
getOfflineProfile(playerName).removeXp(getNonChildSkillType(skillType), xp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes XP from an offline player in a specific skill type.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param uuid The player to change the XP of
|
|
||||||
* @param skillType The skill to change the XP for
|
|
||||||
* @param xp The amount of XP to remove
|
|
||||||
*
|
|
||||||
* @throws InvalidSkillException if the given skill is not valid
|
|
||||||
* @throws InvalidPlayerException if the given player does not exist in the database
|
|
||||||
* @throws UnsupportedOperationException if the given skill is a child skill
|
|
||||||
*/
|
|
||||||
public static void removeXPOffline(UUID uuid, String skillType, int xp) {
|
|
||||||
getOfflineProfile(uuid).removeXp(getNonChildSkillType(skillType), xp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check how much XP is needed for a specific level with the selected level curve.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param level The level to get the amount of XP for
|
|
||||||
*
|
|
||||||
* @throws InvalidFormulaTypeException if the given formulaType is not valid
|
|
||||||
*/
|
|
||||||
public static int getXpNeededToLevel(int level) {
|
|
||||||
return mcMMO.getFormulaManager().getCachedXpToLevel(level, ExperienceConfig.getInstance().getFormulaType());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check how much XP is needed for a specific level with the provided level curve.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param level The level to get the amount of XP for
|
|
||||||
* @param formulaType The formula type to get the amount of XP for
|
|
||||||
*
|
|
||||||
* @throws InvalidFormulaTypeException if the given formulaType is not valid
|
|
||||||
*/
|
|
||||||
public static int getXpNeededToLevel(int level, String formulaType) {
|
|
||||||
return mcMMO.getFormulaManager().getCachedXpToLevel(level, getFormulaType(formulaType));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Utility methods follow.
|
// Utility methods follow.
|
||||||
private static void addOfflineXP(UUID playerUniqueId, SkillType skill, int XP) {
|
|
||||||
PlayerProfile profile = getOfflineProfile(playerUniqueId);
|
|
||||||
|
|
||||||
profile.addXp(skill, XP);
|
|
||||||
profile.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
private static void addOfflineXP(String playerName, SkillType skill, int XP) {
|
private static void addOfflineXP(String playerName, SkillType skill, int XP) {
|
||||||
PlayerProfile profile = getOfflineProfile(playerName);
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
|
||||||
@@ -1030,20 +659,8 @@ public final class ExperienceAPI {
|
|||||||
profile.scheduleAsyncSave();
|
profile.scheduleAsyncSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static PlayerProfile getOfflineProfile(UUID uuid) {
|
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid);
|
|
||||||
|
|
||||||
if (!profile.isLoaded()) {
|
|
||||||
throw new InvalidPlayerException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
private static PlayerProfile getOfflineProfile(String playerName) {
|
private static PlayerProfile getOfflineProfile(String playerName) {
|
||||||
UUID uuid = mcMMO.p.getServer().getOfflinePlayer(playerName).getUniqueId();
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid);
|
|
||||||
|
|
||||||
if (!profile.isLoaded()) {
|
if (!profile.isLoaded()) {
|
||||||
throw new InvalidPlayerException();
|
throw new InvalidPlayerException();
|
||||||
@@ -1081,22 +698,4 @@ public final class ExperienceAPI {
|
|||||||
|
|
||||||
return xpGainReason;
|
return xpGainReason;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FormulaType getFormulaType(String formula) throws InvalidFormulaTypeException {
|
|
||||||
FormulaType formulaType = FormulaType.getFormulaType(formula);
|
|
||||||
|
|
||||||
if (formulaType == null) {
|
|
||||||
throw new InvalidFormulaTypeException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return formulaType;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static McMMOPlayer getPlayer(Player player) throws McMMOPlayerNotFoundException {
|
|
||||||
if (!UserManager.hasPlayerDataKey(player)) {
|
|
||||||
throw new McMMOPlayerNotFoundException(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
return UserManager.getPlayer(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
package com.gmail.nossr50.api;
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyLeader;
|
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
@@ -82,7 +79,7 @@ public final class PartyAPI {
|
|||||||
Party party = PartyManager.getParty(partyName);
|
Party party = PartyManager.getParty(partyName);
|
||||||
|
|
||||||
if (party == null) {
|
if (party == null) {
|
||||||
party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName);
|
party = new Party(player.getName(), partyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
PartyManager.addToParty(UserManager.getPlayer(player), party);
|
PartyManager.addToParty(UserManager.getPlayer(player), party);
|
||||||
@@ -108,7 +105,7 @@ public final class PartyAPI {
|
|||||||
* @return the leader of the party
|
* @return the leader of the party
|
||||||
*/
|
*/
|
||||||
public static String getPartyLeader(String partyName) {
|
public static String getPartyLeader(String partyName) {
|
||||||
return PartyManager.getPartyLeaderName(partyName);
|
return PartyManager.getPartyLeader(partyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,11 +114,10 @@ public final class PartyAPI {
|
|||||||
* This function is designed for API usage.
|
* This function is designed for API usage.
|
||||||
*
|
*
|
||||||
* @param partyName The name of the party to set the leader of
|
* @param partyName The name of the party to set the leader of
|
||||||
* @param playerName The playerName to set as leader
|
* @param player The player to set as leader
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
public static void setPartyLeader(String partyName, String player) {
|
||||||
public static void setPartyLeader(String partyName, String playerName) {
|
PartyManager.setPartyLeader(player, PartyManager.getParty(partyName));
|
||||||
PartyManager.setPartyLeader(mcMMO.p.getServer().getOfflinePlayer(playerName).getUniqueId(), PartyManager.getParty(partyName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -136,8 +132,8 @@ public final class PartyAPI {
|
|||||||
public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) {
|
public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) {
|
||||||
List<OfflinePlayer> members = new ArrayList<OfflinePlayer>();
|
List<OfflinePlayer> members = new ArrayList<OfflinePlayer>();
|
||||||
|
|
||||||
for (UUID memberUniqueId : PartyManager.getAllMembers(player).keySet()) {
|
for (String memberName : PartyManager.getAllMembers(player)) {
|
||||||
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberUniqueId);
|
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberName);
|
||||||
members.add(member);
|
members.add(member);
|
||||||
}
|
}
|
||||||
return members;
|
return members;
|
||||||
@@ -151,20 +147,7 @@ public final class PartyAPI {
|
|||||||
* @param player The player to check
|
* @param player The player to check
|
||||||
* @return all the player names in the player's party
|
* @return all the player names in the player's party
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static LinkedHashSet<String> getMembers(Player player) {
|
public static LinkedHashSet<String> getMembers(Player player) {
|
||||||
return (LinkedHashSet<String>) PartyManager.getAllMembers(player).values();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a list of all player names and uuids in this player's party.
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @param player The player to check
|
|
||||||
* @return all the player names and uuids in the player's party
|
|
||||||
*/
|
|
||||||
public static LinkedHashMap<UUID, String> getMembersMap(Player player) {
|
|
||||||
return PartyManager.getAllMembers(player);
|
return PartyManager.getAllMembers(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
package com.gmail.nossr50.api;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
|
||||||
|
|
||||||
public final class SkillAPI {
|
|
||||||
private SkillAPI() {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This includes parent and child skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getSkills() {
|
|
||||||
return getListFromEnum(Arrays.asList(SkillType.values()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This only includes parent skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getNonChildSkills() {
|
|
||||||
return getListFromEnum(SkillType.NON_CHILD_SKILLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This only includes child skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getChildSkills() {
|
|
||||||
return getListFromEnum(SkillType.CHILD_SKILLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This only includes combat skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getCombatSkills() {
|
|
||||||
return getListFromEnum(SkillType.COMBAT_SKILLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This only includes gathering skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getGatheringSkills() {
|
|
||||||
return getListFromEnum(SkillType.GATHERING_SKILLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of strings with mcMMO's skills
|
|
||||||
* This only includes misc skills
|
|
||||||
* </br>
|
|
||||||
* This function is designed for API usage.
|
|
||||||
*
|
|
||||||
* @return a list of strings with valid skill names
|
|
||||||
*/
|
|
||||||
public static List<String> getMiscSkills() {
|
|
||||||
return getListFromEnum(SkillType.MISC_SKILLS);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<String> getListFromEnum(List<SkillType> skillsTypes) {
|
|
||||||
List<String> skills = new ArrayList<String>();
|
|
||||||
|
|
||||||
for (SkillType skillType : skillsTypes) {
|
|
||||||
skills.add(skillType.name());
|
|
||||||
}
|
|
||||||
|
|
||||||
return skills;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.gmail.nossr50.api.exceptions;
|
|
||||||
|
|
||||||
public class InvalidFormulaTypeException extends RuntimeException {
|
|
||||||
private static final long serialVersionUID = 3368670229490121886L;
|
|
||||||
|
|
||||||
public InvalidFormulaTypeException() {
|
|
||||||
super("That is not a valid FormulaType.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package com.gmail.nossr50.api.exceptions;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public class McMMOPlayerNotFoundException extends RuntimeException {
|
|
||||||
private static final long serialVersionUID = 761917904993202836L;
|
|
||||||
|
|
||||||
public McMMOPlayerNotFoundException(Player player) {
|
|
||||||
super("McMMOPlayer object was not found for: " + player.getName() + " " + player.getUniqueId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,16 @@
|
|||||||
package com.gmail.nossr50.chat;
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
||||||
import com.gmail.nossr50.runnables.party.PartyChatTask;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
public class PartyChatManager extends ChatManager {
|
public class PartyChatManager extends ChatManager {
|
||||||
private Party party;
|
private Party party;
|
||||||
@@ -25,6 +30,21 @@ public class PartyChatManager extends ChatManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void sendMessage() {
|
protected void sendMessage() {
|
||||||
new PartyChatTask(plugin, party, senderName, displayName, message).runTask(plugin);
|
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||||
|
message = message.replaceFirst(Pattern.quote(displayName), ChatColor.GOLD + Matcher.quoteReplacement(displayName) + ChatColor.RESET);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player member : party.getOnlineMembers()) {
|
||||||
|
member.sendMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (party.getAlly() != null) {
|
||||||
|
for (Player member : party.getAlly().getOnlineMembers()) {
|
||||||
|
String allyPrefix = LocaleLoader.formatString(Config.getInstance().getPartyChatPrefixAlly());
|
||||||
|
member.sendMessage(allyPrefix + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,10 +29,6 @@ public class KrakenCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserManager.getPlayer(sender.getName()).getFishingManager().unleashTheKraken();
|
UserManager.getPlayer(sender.getName()).getFishingManager().unleashTheKraken();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,351 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.Closeable;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.datatypes.skills.ModConfigType;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
|
|
||||||
public class McImportCommand implements CommandExecutor {
|
|
||||||
int fileAmount;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
switch (args.length) {
|
|
||||||
case 0:
|
|
||||||
importModConfig();
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean importModConfig() {
|
|
||||||
String importFilePath = mcMMO.getModDirectory() + File.separator + "import";
|
|
||||||
File importFile = new File(importFilePath, "import.log");
|
|
||||||
mcMMO.p.getLogger().info("Starting import of mod materials...");
|
|
||||||
fileAmount = 0;
|
|
||||||
|
|
||||||
HashMap<ModConfigType, ArrayList<String>> materialNames = new HashMap<ModConfigType, ArrayList<String>>();
|
|
||||||
|
|
||||||
BufferedReader in = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
// Open the file
|
|
||||||
in = new BufferedReader(new FileReader(importFile));
|
|
||||||
|
|
||||||
String line;
|
|
||||||
String materialName;
|
|
||||||
String modName;
|
|
||||||
|
|
||||||
// While not at the end of the file
|
|
||||||
while ((line = in.readLine()) != null) {
|
|
||||||
String[] split1 = line.split("material ");
|
|
||||||
|
|
||||||
if (split1.length != 2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] split2 = split1[1].split(" with");
|
|
||||||
|
|
||||||
if (split2.length != 2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
materialName = split2[0];
|
|
||||||
|
|
||||||
// Categorise each material under a mod config type
|
|
||||||
ModConfigType type = ModConfigType.getModConfigType(materialName);
|
|
||||||
|
|
||||||
if (!materialNames.containsKey(type)) {
|
|
||||||
materialNames.put(type, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
materialNames.get(type).add(materialName);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (FileNotFoundException e) {
|
|
||||||
mcMMO.p.getLogger().warning("Could not find " + importFile.getAbsolutePath() + " ! (No such file or directory)");
|
|
||||||
mcMMO.p.getLogger().warning("Copy and paste latest.log to " + importFile.getParentFile().getAbsolutePath() + " and rename it to import.log");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
tryClose(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
createOutput(materialNames);
|
|
||||||
|
|
||||||
mcMMO.p.getLogger().info("Import finished! Created " + fileAmount + " files!");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createOutput(HashMap<ModConfigType, ArrayList<String>> materialNames) {
|
|
||||||
for (ModConfigType modConfigType : materialNames.keySet()) {
|
|
||||||
HashMap<String, ArrayList<String>> materialNamesType = new HashMap<String, ArrayList<String>>();
|
|
||||||
|
|
||||||
for (String materialName : materialNames.get(modConfigType)) {
|
|
||||||
String modName = Misc.getModName(materialName);
|
|
||||||
|
|
||||||
if (!materialNamesType.containsKey(modName)) {
|
|
||||||
materialNamesType.put(modName, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
materialNamesType.get(modName).add(materialName);
|
|
||||||
}
|
|
||||||
|
|
||||||
createOutput(modConfigType, materialNamesType);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void tryClose(Closeable c) {
|
|
||||||
if (c == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
c.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createOutput(ModConfigType modConfigType, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
File outputFilePath = new File(mcMMO.getModDirectory() + File.separator + "output");
|
|
||||||
if (!outputFilePath.exists() && !outputFilePath.mkdirs()) {
|
|
||||||
mcMMO.p.getLogger().severe("Could not create output directory! " + outputFilePath.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
FileWriter out = null;
|
|
||||||
String type = modConfigType.name().toLowerCase();
|
|
||||||
|
|
||||||
for (String modName : materialNames.keySet()) {
|
|
||||||
File outputFile = new File(outputFilePath, modName + "." + type + ".yml");
|
|
||||||
mcMMO.p.getLogger().info("Creating " + outputFile.getName());
|
|
||||||
try {
|
|
||||||
if (outputFile.exists() && !outputFile.delete()) {
|
|
||||||
mcMMO.p.getLogger().severe("Not able to delete old output file! " + outputFile.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!outputFile.createNewFile()) {
|
|
||||||
mcMMO.p.getLogger().severe("Could not create output file! " + outputFile.getAbsolutePath());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder writer = new StringBuilder();
|
|
||||||
HashMap<String, ArrayList<String>> configSections = getConfigSections(modConfigType, modName, materialNames);
|
|
||||||
|
|
||||||
if (configSections == null) {
|
|
||||||
mcMMO.p.getLogger().severe("Something went wrong!! type is " + type);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write the file, go through each skill and write all the materials
|
|
||||||
for (String configSection : configSections.keySet()) {
|
|
||||||
if (configSection.equals("UNIDENTIFIED")) {
|
|
||||||
writer.append("# This isn't a valid config section and all materials in this category need to be").append("\r\n");
|
|
||||||
writer.append("# copy and pasted to a valid section of this config file.").append("\r\n");
|
|
||||||
}
|
|
||||||
writer.append(configSection).append(":").append("\r\n");
|
|
||||||
|
|
||||||
for (String line : configSections.get(configSection)) {
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
writer.append("\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
out = new FileWriter(outputFile);
|
|
||||||
out.write(writer.toString());
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
tryClose(out);
|
|
||||||
fileAmount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashMap<String, ArrayList<String>> getConfigSections(ModConfigType type, String modName, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
switch (type) {
|
|
||||||
case BLOCKS:
|
|
||||||
return getConfigSectionsBlocks(modName, materialNames);
|
|
||||||
case TOOLS:
|
|
||||||
return getConfigSectionsTools(modName, materialNames);
|
|
||||||
case ARMOR:
|
|
||||||
return getConfigSectionsArmor(modName, materialNames);
|
|
||||||
case UNKNOWN:
|
|
||||||
return getConfigSectionsUnknown(modName, materialNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashMap<String, ArrayList<String>> getConfigSectionsBlocks(String modName, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
|
|
||||||
|
|
||||||
// Go through all the materials and categorise them under a skill
|
|
||||||
for (String materialName : materialNames.get(modName)) {
|
|
||||||
String skillName = "UNIDENTIFIED";
|
|
||||||
if (materialName.contains("ORE")) {
|
|
||||||
skillName = "Mining";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("LOG") || materialName.contains("LEAVES")) {
|
|
||||||
skillName = "Woodcutting";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("GRASS") || materialName.contains("FLOWER") || materialName.contains("CROP")) {
|
|
||||||
skillName = "Herbalism";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("DIRT") || materialName.contains("SAND")) {
|
|
||||||
skillName = "Excavation";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!configSections.containsKey(skillName)) {
|
|
||||||
configSections.put(skillName, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<String> skillContents = configSections.get(skillName);
|
|
||||||
skillContents.add(" " + materialName + "|0:");
|
|
||||||
skillContents.add(" " + " " + "XP_Gain: 99");
|
|
||||||
skillContents.add(" " + " " + "Double_Drops_Enabled: true");
|
|
||||||
|
|
||||||
if (skillName.equals("Mining")) {
|
|
||||||
skillContents.add(" " + " " + "Smelting_XP_Gain: 9");
|
|
||||||
}
|
|
||||||
else if (skillName.equals("Woodcutting")) {
|
|
||||||
skillContents.add(" " + " " + "Is_Log: " + materialName.contains("LOG"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return configSections;
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashMap<String, ArrayList<String>> getConfigSectionsTools(String modName, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
|
|
||||||
|
|
||||||
// Go through all the materials and categorise them under a tool type
|
|
||||||
for (String materialName : materialNames.get(modName)) {
|
|
||||||
String toolType = "UNIDENTIFIED";
|
|
||||||
if (materialName.contains("PICKAXE")) {
|
|
||||||
toolType = "Pickaxes";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("AXE")) {
|
|
||||||
toolType = "Axes";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("BOW")) {
|
|
||||||
toolType = "Bows";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("HOE")) {
|
|
||||||
toolType = "Hoes";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("SHOVEL") || materialName.contains("SPADE")) {
|
|
||||||
toolType = "Shovels";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("SWORD")) {
|
|
||||||
toolType = "Swords";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!configSections.containsKey(toolType)) {
|
|
||||||
configSections.put(toolType, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<String> skillContents = configSections.get(toolType);
|
|
||||||
skillContents.add(" " + materialName + ":");
|
|
||||||
skillContents.add(" " + " " + "XP_Modifier: 1.0");
|
|
||||||
skillContents.add(" " + " " + "Tier: 1");
|
|
||||||
skillContents.add(" " + " " + "Ability_Enabled: true");
|
|
||||||
addRepairableLines(materialName, skillContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
return configSections;
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashMap<String, ArrayList<String>> getConfigSectionsArmor(String modName, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
|
|
||||||
|
|
||||||
// Go through all the materials and categorise them under an armor type
|
|
||||||
for (String materialName : materialNames.get(modName)) {
|
|
||||||
String toolType = "UNIDENTIFIED";
|
|
||||||
if (materialName.contains("BOOT") || materialName.contains("SHOE")) {
|
|
||||||
toolType = "Boots";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("CHESTPLATE") || materialName.contains("CHEST")) {
|
|
||||||
toolType = "Chestplates";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("HELM") || materialName.contains("HAT")) {
|
|
||||||
toolType = "Helmets";
|
|
||||||
}
|
|
||||||
else if (materialName.contains("LEGGINGS") || materialName.contains("LEGS") || materialName.contains("PANTS")) {
|
|
||||||
toolType = "Leggings";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!configSections.containsKey(toolType)) {
|
|
||||||
configSections.put(toolType, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<String> skillContents = configSections.get(toolType);
|
|
||||||
skillContents.add(" " + materialName + ":");
|
|
||||||
addRepairableLines(materialName, skillContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
return configSections;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addRepairableLines(String materialName, ArrayList<String> skillContents) {
|
|
||||||
skillContents.add(" " + " " + "Repairable: true");
|
|
||||||
skillContents.add(" " + " " + "Repair_Material: REPAIR_MATERIAL_NAME");
|
|
||||||
skillContents.add(" " + " " + "Repair_Material_Data_Value: 0");
|
|
||||||
skillContents.add(" " + " " + "Repair_Material_Quantity: 9");
|
|
||||||
skillContents.add(" " + " " + "Repair_Material_Pretty_Name: Repair Item Name");
|
|
||||||
skillContents.add(" " + " " + "Repair_MinimumLevel: 0");
|
|
||||||
skillContents.add(" " + " " + "Repair_XpMultiplier: 1.0");
|
|
||||||
|
|
||||||
Material material = Material.matchMaterial(materialName);
|
|
||||||
short durability = (material == null) ? (short) 9999 : material.getMaxDurability();
|
|
||||||
skillContents.add(" " + " " + "Durability: " + ((durability > 0) ? durability : (short) 9999));
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashMap<String, ArrayList<String>> getConfigSectionsUnknown(String modName, HashMap<String, ArrayList<String>> materialNames) {
|
|
||||||
HashMap<String, ArrayList<String>> configSections = new HashMap<String, ArrayList<String>>();
|
|
||||||
|
|
||||||
// Go through all the materials and print them
|
|
||||||
for (String materialName : materialNames.get(modName)) {
|
|
||||||
String configKey = "UNIDENTIFIED";
|
|
||||||
|
|
||||||
if (!configSections.containsKey(configKey)) {
|
|
||||||
configSections.put(configKey, new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<String> skillContents = configSections.get(configKey);
|
|
||||||
skillContents.add(" " + materialName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return configSections;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -27,7 +27,7 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (Config.getInstance().getDonateMessageEnabled()) {
|
if (Config.getInstance().getDonateMessageEnabled()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("MOTD.Donate"));
|
sender.sendMessage(LocaleLoader.getString("MOTD.Donate"));
|
||||||
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "tft_02@hotmail.com" + ChatColor.GOLD + " Paypal");
|
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Permissions.showversion(sender)) {
|
if (Permissions.showversion(sender)) {
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ public class MobhealthCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
applyCommandAction(UserManager.getPlayer(sender.getName()));
|
applyCommandAction(UserManager.getPlayer(sender.getName()));
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
|
||||||
if (mcMMOPlayer.isChatEnabled(chatMode)) {
|
if (mcMMOPlayer.isChatEnabled(chatMode)) {
|
||||||
@@ -57,10 +53,6 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommandUtils.shouldEnableToggle(args[0])) {
|
if (CommandUtils.shouldEnableToggle(args[0])) {
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.gmail.nossr50.datatypes.database.DatabaseType;
|
|||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.runnables.database.DatabaseConversionTask;
|
import com.gmail.nossr50.runnables.database.DatabaseConversionTask;
|
||||||
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
|
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class ConvertDatabaseCommand implements CommandExecutor {
|
public class ConvertDatabaseCommand implements CommandExecutor {
|
||||||
@@ -56,13 +55,13 @@ public class ConvertDatabaseCommand implements CommandExecutor {
|
|||||||
UserManager.clearAll();
|
UserManager.clearAll();
|
||||||
|
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getUniqueId());
|
PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getName(), false);
|
||||||
|
|
||||||
if (profile.isLoaded()) {
|
if (profile.isLoaded()) {
|
||||||
mcMMO.getDatabaseManager().saveUser(profile);
|
mcMMO.getDatabaseManager().saveUser(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
|
UserManager.addUser(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
new DatabaseConversionTask(oldDatabase, sender, previousType.toString(), newType.toString()).runTaskAsynchronously(mcMMO.p);
|
new DatabaseConversionTask(oldDatabase, sender, previousType.toString(), newType.toString()).runTaskAsynchronously(mcMMO.p);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.runnables.database.FormulaConversionTask;
|
import com.gmail.nossr50.runnables.database.FormulaConversionTask;
|
||||||
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
|
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class ConvertExperienceCommand implements CommandExecutor {
|
public class ConvertExperienceCommand implements CommandExecutor {
|
||||||
@@ -38,7 +37,7 @@ public class ConvertExperienceCommand implements CommandExecutor {
|
|||||||
new FormulaConversionTask(sender, newType).runTaskLater(mcMMO.p, 1);
|
new FormulaConversionTask(sender, newType).runTaskLater(mcMMO.p, 1);
|
||||||
|
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
|
UserManager.addUser(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -2,9 +2,7 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabExecutor;
|
import org.bukkit.command.TabExecutor;
|
||||||
@@ -18,6 +16,7 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
public abstract class ExperienceCommand implements TabExecutor {
|
public abstract class ExperienceCommand implements TabExecutor {
|
||||||
@@ -72,12 +71,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
UUID uuid = null;
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
OfflinePlayer player = mcMMO.p.getServer().getOfflinePlayer(playerName);
|
|
||||||
if (player != null) {
|
|
||||||
uuid = player.getUniqueId();
|
|
||||||
}
|
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, uuid, false);
|
|
||||||
|
|
||||||
if (CommandUtils.unloadedProfile(sender, profile)) {
|
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -2,9 +2,7 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabExecutor;
|
import org.bukkit.command.TabExecutor;
|
||||||
@@ -21,6 +19,7 @@ import com.gmail.nossr50.util.EventUtils;
|
|||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,7 +29,6 @@ import com.google.common.collect.ImmutableList;
|
|||||||
public class SkillresetCommand implements TabExecutor {
|
public class SkillresetCommand implements TabExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
SkillType skill;
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
@@ -46,14 +44,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("all")) {
|
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), SkillType.getSkill(args[0]));
|
||||||
skill = null;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
skill = SkillType.getSkill(args[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
@@ -66,6 +57,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SkillType skill;
|
||||||
if (args[1].equalsIgnoreCase("all")) {
|
if (args[1].equalsIgnoreCase("all")) {
|
||||||
skill = null;
|
skill = null;
|
||||||
}
|
}
|
||||||
@@ -78,12 +70,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
UUID uuid = null;
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
OfflinePlayer player = mcMMO.p.getServer().getOfflinePlayer(playerName);
|
|
||||||
if (player != null) {
|
|
||||||
uuid = player.getUniqueId();
|
|
||||||
}
|
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, uuid, false);
|
|
||||||
|
|
||||||
if (CommandUtils.unloadedProfile(sender, profile)) {
|
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -147,7 +134,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean validateArguments(CommandSender sender, String skillName) {
|
private boolean validateArguments(CommandSender sender, String skillName) {
|
||||||
return skillName.equalsIgnoreCase("all") || !CommandUtils.isInvalidSkill(sender, skillName);
|
return !(CommandUtils.isInvalidSkill(sender, skillName) && !skillName.equalsIgnoreCase("all"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
protected static void handleSenderMessage(CommandSender sender, String playerName, SkillType skill) {
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
@@ -20,14 +18,13 @@ public class PartyChangeOwnerCommand implements CommandExecutor {
|
|||||||
case 2:
|
case 2:
|
||||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
|
|
||||||
|
|
||||||
if (!playerParty.hasMember(target.getUniqueId())) {
|
if (!playerParty.getMembers().contains(targetName)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PartyManager.setPartyLeader(target.getUniqueId(), playerParty);
|
PartyManager.setPartyLeader(targetName, playerParty);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -71,11 +71,6 @@ public class PartyCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
if (!UserManager.hasPlayerDataKey(player)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
@@ -134,7 +129,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Party leader commands
|
// Party leader commands
|
||||||
if (!mcMMOPlayer.getParty().getLeader().getUniqueId().equals(player.getUniqueId())) {
|
if (!mcMMOPlayer.getParty().getLeader().equalsIgnoreCase(player.getName())) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotOwner"));
|
sender.sendMessage(LocaleLoader.getString("Party.NotOwner"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class PartyKickCommand implements CommandExecutor {
|
|||||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
|
|
||||||
if (!playerParty.hasMember(targetName)) {
|
if (!playerParty.getMembers().contains(targetName)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class PartyRenameCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String leaderName = playerParty.getLeader().getPlayerName();
|
String leaderName = playerParty.getLeader();
|
||||||
|
|
||||||
for (Player member : playerParty.getOnlineMembers()) {
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
if (!PartyManager.handlePartyChangeEvent(member, oldPartyName, newPartyName, EventReason.CHANGED_PARTIES)) {
|
if (!PartyManager.handlePartyChangeEvent(member, oldPartyName, newPartyName, EventReason.CHANGED_PARTIES)) {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class PartyAllianceInviteCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mcMMOTarget.getParty().getLeader().getUniqueId().equals(target.getUniqueId())) {
|
if (!mcMMOTarget.getParty().getLeader().equalsIgnoreCase(targetName)) {
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
|
player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,11 +42,6 @@ public class PtpCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
if (!UserManager.hasPlayerDataKey(player)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
if (!mcMMOPlayer.inParty()) {
|
if (!mcMMOPlayer.inParty()) {
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ public class InspectCommand implements TabExecutor {
|
|||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); // Temporary Profile
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); // Temporary Profile
|
||||||
|
|
||||||
if (!CommandUtils.isLoaded(sender, profile)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommandUtils.inspectOffline(sender, profile, Permissions.inspectOffline(sender))) {
|
if (CommandUtils.inspectOffline(sender, profile, Permissions.inspectOffline(sender))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ public class MccooldownCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 0:
|
case 0:
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabExecutor;
|
import org.bukkit.command.TabExecutor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -35,10 +34,6 @@ public class McrankCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
display(sender, sender.getName());
|
display(sender, sender.getName());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -49,10 +44,6 @@ public class McrankCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
@@ -97,13 +88,6 @@ public class McrankCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((Player) sender).hasMetadata(mcMMO.databaseCommandKey)) {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Processing"));
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
((Player) sender).setMetadata(mcMMO.databaseCommandKey, new FixedMetadataValue(mcMMO.p, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
mcMMOPlayer.actualizeDatabaseATS();
|
mcMMOPlayer.actualizeDatabaseATS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ public class McstatsCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 0:
|
case 0:
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabExecutor;
|
import org.bukkit.command.TabExecutor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -20,6 +19,7 @@ import com.gmail.nossr50.util.Permissions;
|
|||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
public class MctopCommand implements TabExecutor {
|
public class MctopCommand implements TabExecutor {
|
||||||
@@ -83,10 +83,6 @@ public class MctopCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||||
|
|
||||||
@@ -95,13 +91,6 @@ public class MctopCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((Player) sender).hasMetadata(mcMMO.databaseCommandKey)) {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Processing"));
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
((Player) sender).setMetadata(mcMMO.databaseCommandKey, new FixedMetadataValue(mcMMO.p, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
mcMMOPlayer.actualizeDatabaseATS();
|
mcMMOPlayer.actualizeDatabaseATS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDaze) {
|
if (canDaze) {
|
||||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeBonusDamage)));
|
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canRetrieve) {
|
if (canRetrieve) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@@ -97,7 +98,9 @@ public class FishingCommand extends SkillCommand {
|
|||||||
location = player.getLocation();
|
location = player.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
|
Biome biome = location.getBlock().getBiome();
|
||||||
|
|
||||||
|
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||||
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
|
||||||
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
|
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
|
||||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@@ -127,7 +126,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canBiggerBombs) {
|
if (canBiggerBombs) {
|
||||||
int unlockLevel = BlastMining.getBiggerBombsUnlockLevel();
|
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.TWO);
|
||||||
|
|
||||||
if (skillValue < unlockLevel) {
|
if (skillValue < unlockLevel) {
|
||||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
|
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
|
||||||
@@ -138,7 +137,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDemoExpert) {
|
if (canDemoExpert) {
|
||||||
int unlockLevel = BlastMining.getDemolitionExpertUnlockLevel();
|
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.FOUR);
|
||||||
|
|
||||||
if (skillValue < unlockLevel) {
|
if (skillValue < unlockLevel) {
|
||||||
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));
|
messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));
|
||||||
|
|||||||
@@ -48,10 +48,6 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CommandUtils.hasPlayerDataKey(sender)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 0:
|
case 0:
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.taming.Taming;
|
import com.gmail.nossr50.skills.taming.Taming;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
|
||||||
|
|
||||||
public class TamingCommand extends SkillCommand {
|
public class TamingCommand extends SkillCommand {
|
||||||
private String goreChance;
|
private String goreChance;
|
||||||
@@ -92,13 +91,9 @@ public class TamingCommand extends SkillCommand {
|
|||||||
|
|
||||||
if (canCallWild) {
|
if (canCallWild) {
|
||||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
||||||
int costOcelot = Config.getInstance().getTamingCOTWCost(EntityType.OCELOT);
|
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWCost(EntityType.OCELOT)));
|
||||||
String itemOcelot = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT));
|
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWCost(EntityType.WOLF)));
|
||||||
int costWolf = Config.getInstance().getTamingCOTWCost(EntityType.WOLF);
|
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWCost(EntityType.HORSE)));
|
||||||
String itemWolf = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF));
|
|
||||||
int costHorse = Config.getInstance().getTamingCOTWCost(EntityType.HORSE);
|
|
||||||
String itemHorse = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE));
|
|
||||||
messages.add(LocaleLoader.getString("Taming.Effect.14", costOcelot, itemOcelot, costWolf, itemWolf, costHorse, itemHorse));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getDazeBonusDamage() < 0) {
|
if (getDazeModifier() < 0) {
|
||||||
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 0!");
|
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getSkullSplitterModifier() < 1) {
|
if (getSkullSplitterModifier() < 1) {
|
||||||
reason.add("Skills.Axes.SkullSplitter.DamageModifier should be at least 1!");
|
reason.add("Skills.Axes.SkullSplitter.DamagerModifier should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FISHING */
|
/* FISHING */
|
||||||
@@ -420,8 +420,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Skills.Salvage.MaxPercentageLevel should be at least 1!");
|
reason.add("Skills.Salvage.MaxPercentageLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getAdvancedSalvageUnlockLevel() < 0) {
|
if (getAdvancedSalvageUnlockLevel() < 1) {
|
||||||
reason.add("Skills.Salvage.AdvancedSalvage.UnlockLevel should be at least 0!");
|
reason.add("Skills.Salvage.AdvancedSalvage.UnlockLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Salvage.Tier> salvageTierList = Arrays.asList(Salvage.Tier.values());
|
List<Salvage.Tier> salvageTierList = Arrays.asList(Salvage.Tier.values());
|
||||||
@@ -442,8 +442,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
if (tier != Salvage.Tier.EIGHT) {
|
if (tier != Salvage.Tier.EIGHT) {
|
||||||
Salvage.Tier nextTier = salvageTierList.get(salvageTierList.indexOf(tier) - 1);
|
Salvage.Tier nextTier = salvageTierList.get(salvageTierList.indexOf(tier) - 1);
|
||||||
|
|
||||||
if (getArcaneSalvageRankLevel(tier) > getArcaneSalvageRankLevel(nextTier)) {
|
if (getArcaneSalvageRankLevel(tier) >= getArcaneSalvageRankLevel(nextTier)) {
|
||||||
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
reason.add("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getArcaneSalvageExtractFullEnchantsChance(tier) > getArcaneSalvageExtractFullEnchantsChance(nextTier)) {
|
if (getArcaneSalvageExtractFullEnchantsChance(tier) > getArcaneSalvageExtractFullEnchantsChance(nextTier)) {
|
||||||
@@ -714,7 +714,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
||||||
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot.MaxDamage", 9.0D); }
|
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot.MaxDamage", 9.0D); }
|
||||||
|
|
||||||
public double getDazeBonusDamage() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
public double getDazeModifier() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
||||||
|
|
||||||
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
||||||
|
|
||||||
@@ -733,7 +733,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getImpactChance() { return config.getDouble("Skills.Axes.ArmorImpact.Chance", 25.0D); }
|
public double getImpactChance() { return config.getDouble("Skills.Axes.ArmorImpact.Chance", 25.0D); }
|
||||||
public double getArmorImpactMaxDurabilityDamage() { return config.getDouble("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage", 20.0D); }
|
public double getArmorImpactMaxDurabilityDamage() { return config.getDouble("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage", 20.0D); }
|
||||||
|
|
||||||
public double getSkullSplitterModifier() { return config.getDouble("Skills.Axes.SkullSplitter.DamageModifier", 2.0D); }
|
public double getSkullSplitterModifier() { return config.getDouble("Skills.Axes.SkullSplitter.DamagerModifier", 2.0D); }
|
||||||
|
|
||||||
/* EXCAVATION */
|
/* EXCAVATION */
|
||||||
//Nothing to configure, everything is already configurable in config.yml
|
//Nothing to configure, everything is already configurable in config.yml
|
||||||
@@ -802,9 +802,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||||
|
|
||||||
/* SWORDS */
|
/* SWORDS */
|
||||||
public double getBleedDamagePlayer() { return config.getDouble("Skills.Swords.Bleed.DamagePlayer", 1.0); }
|
|
||||||
public double getBleedDamageMobs() { return config.getDouble("Skills.Swords.Bleed.DamageMobs", 2.0); }
|
|
||||||
|
|
||||||
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.TreeSpecies;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
import com.gmail.nossr50.database.SQLDatabaseManager.PoolIdentifier;
|
|
||||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
@@ -42,16 +40,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
reason.add("General.Save_Interval should be greater than 0!");
|
reason.add("General.Save_Interval should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MySQL Settings */
|
|
||||||
for (PoolIdentifier identifier : PoolIdentifier.values()) {
|
|
||||||
if (getMySQLMaxConnections(identifier) <= 0) {
|
|
||||||
reason.add("MySQL.Database.MaxConnections." + StringUtils.getCapitalized(identifier.toString()) + " should be greater than 0!");
|
|
||||||
}
|
|
||||||
if (getMySQLMaxPoolSize(identifier) <= 0) {
|
|
||||||
reason.add("MySQL.Database.MaxPoolSize." + StringUtils.getCapitalized(identifier.toString()) + " should be greater than 0!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mob Healthbar */
|
/* Mob Healthbar */
|
||||||
if (getMobHealthbarTime() == 0) {
|
if (getMobHealthbarTime() == 0) {
|
||||||
reason.add("Mob_Healthbar.Display_Time cannot be 0! Set to -1 to disable or set a valid value.");
|
reason.add("Mob_Healthbar.Display_Time cannot be 0! Set to -1 to disable or set a valid value.");
|
||||||
@@ -243,12 +231,12 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* General Settings */
|
/* General Settings */
|
||||||
public String getLocale() { return config.getString("General.Locale", "en_us"); }
|
public String getLocale() { return config.getString("General.Locale", "en_us"); }
|
||||||
public boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
|
public boolean getMOTDEnabled() { return config.getBoolean("General.MOTD_Enabled", true); }
|
||||||
public boolean getShowProfileLoadedMessage() { return config.getBoolean("General.Show_Profile_Loaded", true); }
|
|
||||||
public boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
|
public boolean getDonateMessageEnabled() { return config.getBoolean("Commands.mcmmo.Donate_Message", true); }
|
||||||
public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
|
public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
|
||||||
public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
|
public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
|
||||||
public boolean getUpdateCheckEnabled() { return config.getBoolean("General.Update_Check", true); }
|
public boolean getUpdateCheckEnabled() { return config.getBoolean("General.Update_Check", true); }
|
||||||
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
||||||
|
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
|
||||||
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
||||||
|
|
||||||
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
||||||
@@ -263,7 +251,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public long getDatabasePlayerCooldown() { return config.getLong("Commands.Database.Player_Cooldown", 1750); }
|
public long getDatabasePlayerCooldown() { return config.getLong("Commands.Database.Player_Cooldown", 1750); }
|
||||||
|
|
||||||
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
||||||
public boolean getRefreshChunksEnabled() { return config.getBoolean("General.Refresh_Chunks", false); }
|
|
||||||
|
|
||||||
/* Mob Healthbar */
|
/* Mob Healthbar */
|
||||||
public MobHealthbarType getMobHealthbarDefault() {
|
public MobHealthbarType getMobHealthbarDefault() {
|
||||||
@@ -280,10 +267,8 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* Scoreboards */
|
/* Scoreboards */
|
||||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||||
public int getTipsAmount() { return config.getInt("Scoreboard.Tips_Amount", 5); }
|
|
||||||
public boolean getShowStatsAfterLogin() { return config.getBoolean("Scoreboard.Show_Stats_After_Login", false); }
|
public boolean getShowStatsAfterLogin() { return config.getBoolean("Scoreboard.Show_Stats_After_Login", false); }
|
||||||
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
public boolean getScoreboardRainbows() { return config.getBoolean("Scoreboard.Rainbows", false); }
|
||||||
public boolean getShowAbilityNames() { return config.getBoolean("Scoreboard.Ability_Names", true); }
|
|
||||||
|
|
||||||
public boolean getRankUseChat() { return config.getBoolean("Scoreboard.Types.Rank.Print", false); }
|
public boolean getRankUseChat() { return config.getBoolean("Scoreboard.Types.Rank.Print", false); }
|
||||||
public boolean getRankUseBoard() { return config.getBoolean("Scoreboard.Types.Rank.Board", true); }
|
public boolean getRankUseBoard() { return config.getBoolean("Scoreboard.Types.Rank.Board", true); }
|
||||||
@@ -328,8 +313,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
|
public int getMySQLServerPort() { return config.getInt("MySQL.Server.Port", 3306); }
|
||||||
public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
|
public String getMySQLServerName() { return config.getString("MySQL.Server.Address", "localhost"); }
|
||||||
public String getMySQLUserPassword() { return getStringIncludingInts("MySQL.Database.User_Password"); }
|
public String getMySQLUserPassword() { return getStringIncludingInts("MySQL.Database.User_Password"); }
|
||||||
public int getMySQLMaxConnections(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxConnections." + StringUtils.getCapitalized(identifier.toString()), 30); }
|
|
||||||
public int getMySQLMaxPoolSize(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxPoolSize." + StringUtils.getCapitalized(identifier.toString()), 10); }
|
|
||||||
|
|
||||||
private String getStringIncludingInts(String key) {
|
private String getStringIncludingInts(String key) {
|
||||||
String str = config.getString(key);
|
String str = config.getString(key);
|
||||||
@@ -373,23 +356,17 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public Material getChimaeraItem() { return Material.matchMaterial(config.getString("Items.Chimaera_Wing.Item_Name", "Feather")); }
|
public Material getChimaeraItem() { return Material.matchMaterial(config.getString("Items.Chimaera_Wing.Item_Name", "Feather")); }
|
||||||
public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
|
public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
|
||||||
public boolean getChimaeraPreventUseUnderground() { return config.getBoolean("Items.Chimaera_Wing.Prevent_Use_Underground", true); }
|
public boolean getChimaeraPreventUseUnderground() { return config.getBoolean("Items.Chimaera_Wing.Prevent_Use_Underground", true); }
|
||||||
public boolean getChimaeraUseBedSpawn() { return config.getBoolean("Items.Chimaera_Wing.Use_Bed_Spawn", true); }
|
|
||||||
public int getChimaeraCooldown() { return config.getInt("Items.Chimaera_Wing.Cooldown", 240); }
|
public int getChimaeraCooldown() { return config.getInt("Items.Chimaera_Wing.Cooldown", 240); }
|
||||||
public int getChimaeraWarmup() { return config.getInt("Items.Chimaera_Wing.Warmup", 5); }
|
public int getChimaeraWarmup() { return config.getInt("Items.Chimaera_Wing.Warmup", 5); }
|
||||||
public int getChimaeraRecentlyHurtCooldown() { return config.getInt("Items.Chimaera_Wing.RecentlyHurt_Cooldown", 60); }
|
public int getChimaeraRecentlyHurtCooldown() { return config.getInt("Items.Chimaera_Wing.RecentlyHurt_Cooldown", 60); }
|
||||||
public boolean getChimaeraSoundEnabled() { return config.getBoolean("Items.Chimaera_Wing.Sound_Enabled", true); }
|
public boolean getChimaeraSoundEnabled() { return config.getBoolean("Items.Chimaera_Wing.Sound_Enabled", true); }
|
||||||
|
|
||||||
public boolean getFluxPickaxeEnabled() { return config.getBoolean("Items.Flux_Pickaxe.Enabled", true); }
|
|
||||||
public boolean getFluxPickaxeSoundEnabled() { return config.getBoolean("Items.Flux_Pickaxe.Sound_Enabled", true); }
|
|
||||||
|
|
||||||
/* Particles */
|
/* Particles */
|
||||||
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
||||||
public boolean getAbilityDeactivationEffectEnabled() { return config.getBoolean("Particles.Ability_Deactivation", true); }
|
public boolean getAbilityDeactivationEffectEnabled() { return config.getBoolean("Particles.Ability_Deactivation", true); }
|
||||||
public boolean getBleedEffectEnabled() { return config.getBoolean("Particles.Bleed", true); }
|
|
||||||
public boolean getDodgeEffectEnabled() { return config.getBoolean("Particles.Dodge", true); }
|
public boolean getDodgeEffectEnabled() { return config.getBoolean("Particles.Dodge", true); }
|
||||||
public boolean getFluxEffectEnabled() { return config.getBoolean("Particles.Flux", true); }
|
public boolean getBleedEffectEnabled() { return config.getBoolean("Particles.Bleed", true); }
|
||||||
public boolean getGreaterImpactEffectEnabled() { return config.getBoolean("Particles.Greater_Impact", true); }
|
public boolean getGreaterImpactEffectEnabled() { return config.getBoolean("Particles.Greater_Impact", true); }
|
||||||
public boolean getCallOfTheWildEffectEnabled() { return config.getBoolean("Particles.Call_of_the_Wild", true); }
|
|
||||||
public boolean getLevelUpEffectsEnabled() { return config.getBoolean("Particles.LevelUp_Enabled", true); }
|
public boolean getLevelUpEffectsEnabled() { return config.getBoolean("Particles.LevelUp_Enabled", true); }
|
||||||
public int getLevelUpEffectsTier() { return config.getInt("Particles.LevelUp_Tier", 100); }
|
public int getLevelUpEffectsTier() { return config.getInt("Particles.LevelUp_Tier", 100); }
|
||||||
public boolean getLargeFireworks() { return config.getBoolean("Particles.LargeFireworks", true); }
|
public boolean getLargeFireworks() { return config.getBoolean("Particles.LargeFireworks", true); }
|
||||||
@@ -475,7 +452,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
||||||
public boolean getFishingOverrideTreasures() { return config.getBoolean("Skills.Fishing.Override_Vanilla_Treasures", true); }
|
|
||||||
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
|
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
|
||||||
|
|
||||||
/* Mining */
|
/* Mining */
|
||||||
@@ -497,19 +473,18 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Unarmed */
|
/* Unarmed */
|
||||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
||||||
public boolean getUnarmedItemPickupDisabled() { return config.getBoolean("Skills.Unarmed.Item_Pickup_Disabled_Full_Inventory", true); }
|
|
||||||
public boolean getUnarmedItemsAsUnarmed() { return config.getBoolean("Skills.Unarmed.Items_As_Unarmed", false); }
|
|
||||||
|
|
||||||
/* Taming */
|
/* Taming */
|
||||||
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||||
public int getTamingCOTWCost(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Amount"); }
|
public int getTamingCOTWCost(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Amount"); }
|
||||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Summon_Amount"); }
|
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Summon_Amount"); }
|
||||||
public int getTamingCOTWLength(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type)+ ".Summon_Length"); }
|
|
||||||
public int getTamingCOTWMaxAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type)+ ".Summon_Max_Amount"); }
|
|
||||||
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
public boolean getWoodcuttingDoubleDropsEnabled(TreeSpecies species) { return config.getBoolean("Double_Drops.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
|
||||||
|
public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
|
||||||
|
public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
|
||||||
|
public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
|
||||||
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
||||||
|
|
||||||
/* AFK Leveling */
|
/* AFK Leveling */
|
||||||
@@ -528,8 +503,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
return (cap <= 0) ? Integer.MAX_VALUE : cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getTruncateSkills() { return config.getBoolean("General.TruncateSkills", false); }
|
|
||||||
|
|
||||||
/* PVP & PVE Settings */
|
/* PVP & PVE Settings */
|
||||||
public boolean getPVPEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVP", true); }
|
public boolean getPVPEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVP", true); }
|
||||||
public boolean getPVEEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVE", true); }
|
public boolean getPVEEnabled(SkillType skill) { return config.getBoolean("Skills." + StringUtils.getCapitalized(skill.toString()) + ".Enabled_For_PVE", true); }
|
||||||
|
|||||||
@@ -6,17 +6,15 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
|
|
||||||
public class HiddenConfig {
|
public class HiddenConfig {
|
||||||
private static HiddenConfig instance;
|
private static HiddenConfig instance;
|
||||||
private String fileName;
|
private static String fileName;
|
||||||
private YamlConfiguration config;
|
private static YamlConfiguration config;
|
||||||
private boolean chunkletsEnabled;
|
private static boolean chunkletsEnabled;
|
||||||
private int conversionRate;
|
private static int conversionRate;
|
||||||
private boolean useEnchantmentBuffs;
|
private static boolean useEnchantmentBuffs;
|
||||||
private int uuidConvertAmount;
|
private static boolean resendChunksAfterBlockAbility;
|
||||||
private int mojangRateLimit;
|
|
||||||
private long mojangLimitPeriod;
|
|
||||||
|
|
||||||
public HiddenConfig(String fileName) {
|
public HiddenConfig(String fileName) {
|
||||||
this.fileName = fileName;
|
HiddenConfig.fileName = fileName;
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,9 +32,7 @@ public class HiddenConfig {
|
|||||||
chunkletsEnabled = config.getBoolean("Options.Chunklets", true);
|
chunkletsEnabled = config.getBoolean("Options.Chunklets", true);
|
||||||
conversionRate = config.getInt("Options.ConversionRate", 1);
|
conversionRate = config.getInt("Options.ConversionRate", 1);
|
||||||
useEnchantmentBuffs = config.getBoolean("Options.EnchantmentBuffs", true);
|
useEnchantmentBuffs = config.getBoolean("Options.EnchantmentBuffs", true);
|
||||||
uuidConvertAmount = config.getInt("Options.UUIDConvertAmount", 5);
|
resendChunksAfterBlockAbility = config.getBoolean("Options.RefreshChunks", false);
|
||||||
mojangRateLimit = config.getInt("Options.MojangRateLimit", 50000);
|
|
||||||
mojangLimitPeriod = config.getLong("Options.MojangLimitPeriod", 600000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,15 +48,7 @@ public class HiddenConfig {
|
|||||||
return useEnchantmentBuffs;
|
return useEnchantmentBuffs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUUIDConvertAmount() {
|
public boolean resendChunksAfterBlockAbility() {
|
||||||
return uuidConvertAmount;
|
return resendChunksAfterBlockAbility;
|
||||||
}
|
|
||||||
|
|
||||||
public int getMojangRateLimit() {
|
|
||||||
return mojangRateLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getMojangLimitPeriod() {
|
|
||||||
return mojangLimitPeriod;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,13 @@ package com.gmail.nossr50.config.experience;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.GrassSpecies;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.TreeSpecies;
|
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.material.LongGrass;
|
|
||||||
import org.bukkit.material.MaterialData;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
public class ExperienceConfig extends AutoUpdateConfigLoader {
|
public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||||
@@ -72,11 +67,6 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Experience_Formula.Mobspawners.Multiplier should be at least 0!");
|
reason.add("Experience_Formula.Mobspawners.Multiplier should be at least 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bred Mob modifier */
|
|
||||||
if (getBredMobXpMultiplier() < 0) {
|
|
||||||
reason.add("Experience_Formula.Breeding.Multiplier should be at least 0!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Conversion */
|
/* Conversion */
|
||||||
if (getExpModifier() <= 0) {
|
if (getExpModifier() <= 0) {
|
||||||
reason.add("Conversion.Exp_Modifier should be greater than 0!");
|
reason.add("Conversion.Exp_Modifier should be greater than 0!");
|
||||||
@@ -87,15 +77,8 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Alchemy */
|
/* Alchemy */
|
||||||
for (PotionStage potionStage : PotionStage.values()) {
|
if (getPotionXP() <= 0) {
|
||||||
if (getPotionXP(potionStage) < 0) {
|
reason.add("Experience.Alchemy.Potion should be greater than 0!");
|
||||||
reason.add("Experience.Alchemy.Potion_Stage_" + potionStage.toNumerical() + " should be at least 0!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Archery */
|
|
||||||
if (getArcheryDistanceMultiplier() < 0) {
|
|
||||||
reason.add("Experience.Archery.Distance_Multiplier should be at least 0!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Combat XP Multipliers */
|
/* Combat XP Multipliers */
|
||||||
@@ -120,7 +103,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
// TODO: Add validation for each fish type once enum is available.
|
if (getFishingBaseXP() <= 0) {
|
||||||
|
reason.add("Experience.Fishing.Base should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
if (getFishingShakeXP() <= 0) {
|
if (getFishingShakeXP() <= 0) {
|
||||||
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
||||||
@@ -141,12 +126,20 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
for (TreeSpecies species : TreeSpecies.values()) {
|
if (getWoodcuttingXPOak() <= 0) {
|
||||||
String key = "Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_");
|
reason.add("Experience.Woodcutting.Oak should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
if (config.getInt(key) <= 0) {
|
if (getWoodcuttingXPBirch() <= 0) {
|
||||||
reason.add(key + " should be greater than 0!");
|
reason.add("Experience.Woodcutting.Birch should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getWoodcuttingXPSpruce() <= 0) {
|
||||||
|
reason.add("Experience.Woodcutting.Spruce should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getWoodcuttingXPJungle() <= 0) {
|
||||||
|
reason.add("Experience.Woodcutting.Jungle should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
||||||
@@ -182,7 +175,6 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Spawned Mob modifier */
|
/* Spawned Mob modifier */
|
||||||
public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0); }
|
public double getSpawnedMobXpMultiplier() { return config.getDouble("Experience_Formula.Mobspawners.Multiplier", 0.0); }
|
||||||
public double getBredMobXpMultiplier() { return config.getDouble("Experience_Formula.Breeding.Multiplier", 1.0); }
|
|
||||||
|
|
||||||
/* Skill modifiers */
|
/* Skill modifiers */
|
||||||
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience_Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
||||||
@@ -190,11 +182,6 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
/* Custom XP perk */
|
/* Custom XP perk */
|
||||||
public double getCustomXpPerkBoost() { return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25); }
|
public double getCustomXpPerkBoost() { return config.getDouble("Experience_Formula.Custom_XP_Perk.Boost", 1.25); }
|
||||||
|
|
||||||
/* Diminished Returns */
|
|
||||||
public boolean getDiminishedReturnsEnabled() { return config.getBoolean("Diminished_Returns.Enabled", false); }
|
|
||||||
public int getDiminishedReturnsThreshold(SkillType skill) { return config.getInt("Diminished_Returns.Threshold." + StringUtils.getCapitalized(skill.toString()), 20000); }
|
|
||||||
public int getDiminishedReturnsTimeInterval() { return config.getInt("Diminished_Returns.Time_Interval", 10); }
|
|
||||||
|
|
||||||
/* Conversion */
|
/* Conversion */
|
||||||
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
public double getExpModifier() { return config.getDouble("Conversion.Exp_Modifier", 1); }
|
||||||
|
|
||||||
@@ -209,7 +196,6 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
public double getCombatXP(EntityType entity) { return config.getDouble("Experience.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||||
public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
public double getAnimalsXP() { return config.getDouble("Experience.Combat.Multiplier.Animals", 1.0); }
|
||||||
public double getWitherSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Wither_Skeleton", 4.0); }
|
public double getWitherSkeletonXP() { return config.getDouble("Experience.Combat.Multiplier.Wither_Skeleton", 4.0); }
|
||||||
public double getElderGuardianXP() { return config.getDouble("Experience.Combat.Multiplier.Elder_Guardian", 4.0); }
|
|
||||||
|
|
||||||
/* Materials */
|
/* Materials */
|
||||||
public int getXp(SkillType skill, Material material) { return config.getInt("Experience." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
|
public int getXp(SkillType skill, Material material) { return config.getInt("Experience." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
|
||||||
@@ -222,154 +208,12 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
public double getFeatherFallXPModifier() { return config.getDouble("Experience.Acrobatics.FeatherFall_Multiplier", 2.0); }
|
||||||
|
|
||||||
/* Alchemy */
|
/* Alchemy */
|
||||||
public double getPotionXP(PotionStage stage) { return config.getDouble("Experience.Alchemy.Potion_Stage_" + stage.toNumerical(), 10D); }
|
public double getPotionXP() { return config.getDouble("Experience.Alchemy.Potion", 150D); }
|
||||||
|
|
||||||
/* Archery */
|
|
||||||
public double getArcheryDistanceMultiplier() { return config.getDouble("Experience.Archery.Distance_Multiplier", 0.025); }
|
|
||||||
|
|
||||||
/* Excavation */
|
|
||||||
public int getDirtAndSandXp(MaterialData data) {
|
|
||||||
Material type = data.getItemType();
|
|
||||||
|
|
||||||
if (type == Material.DIRT) {
|
|
||||||
switch (data.getData()) {
|
|
||||||
case 0x0:
|
|
||||||
return config.getInt("Experience.Excavation.Dirt", 40);
|
|
||||||
|
|
||||||
case 0x1:
|
|
||||||
return config.getInt("Experience.Excavation.Coarse_Dirt", 40);
|
|
||||||
|
|
||||||
case 0x2:
|
|
||||||
return config.getInt("Experience.Excavation.Podzol", 40);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (type == Material.SAND) {
|
|
||||||
switch (data.getData()) {
|
|
||||||
case 0x0:
|
|
||||||
return config.getInt("Experience.Excavation.Sand", 40);
|
|
||||||
|
|
||||||
case 0x1:
|
|
||||||
return config.getInt("Experience.Excavation.Red_Sand", 40);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public int getFishXp(MaterialData data) {
|
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
||||||
switch (data.getData()) {
|
|
||||||
case 0x0:
|
|
||||||
return config.getInt("Experience.Fishing.Raw_Fish", 800);
|
|
||||||
|
|
||||||
case 0x1:
|
|
||||||
return config.getInt("Experience.Fishing.Raw_Salmon", 800);
|
|
||||||
|
|
||||||
case 0x2:
|
|
||||||
return config.getInt("Experience.Fishing.Clownfish", 800);
|
|
||||||
|
|
||||||
case 0x3:
|
|
||||||
return config.getInt("Experience.Fishing.Pufferfish", 800);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
||||||
|
|
||||||
/* Herbalism */
|
|
||||||
public int getFlowerAndGrassXp(MaterialData data) {
|
|
||||||
Material type = data.getItemType();
|
|
||||||
|
|
||||||
if (type == Material.RED_ROSE) {
|
|
||||||
switch (data.getData()) {
|
|
||||||
case 0x0:
|
|
||||||
return config.getInt("Experience.Herbalism.Poppy", 100);
|
|
||||||
|
|
||||||
case 0x1:
|
|
||||||
return config.getInt("Experience.Herbalism.Blue_Orchid", 150);
|
|
||||||
|
|
||||||
case 0x2:
|
|
||||||
return config.getInt("Experience.Herbalism.Allium", 300);
|
|
||||||
|
|
||||||
case 0x3:
|
|
||||||
return config.getInt("Experience.Herbalism.Azure_Bluet", 150);
|
|
||||||
|
|
||||||
case 0x4:
|
|
||||||
return config.getInt("Experience.Herbalism.Red_Tulip", 150);
|
|
||||||
|
|
||||||
case 0x5:
|
|
||||||
return config.getInt("Experience.Herbalism.Orange_Tulip", 150);
|
|
||||||
|
|
||||||
case 0x6:
|
|
||||||
return config.getInt("Experience.Herbalism.White_Tulip", 150);
|
|
||||||
|
|
||||||
case 0x7:
|
|
||||||
return config.getInt("Experience.Herbalism.Pink_Tulip", 150);
|
|
||||||
|
|
||||||
case 0x8:
|
|
||||||
return config.getInt("Experience.Herbalism.Oxeye_Daisy", 150);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (type == Material.LONG_GRASS) {
|
|
||||||
GrassSpecies species = ((LongGrass) data).getSpecies();
|
|
||||||
if (species == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (species) {
|
|
||||||
case DEAD:
|
|
||||||
return config.getInt("Experience.Herbalism.Dead_Bush", 30);
|
|
||||||
|
|
||||||
case FERN_LIKE:
|
|
||||||
return config.getInt("Experience.Herbalism.Small_Fern", 10);
|
|
||||||
|
|
||||||
case NORMAL:
|
|
||||||
return config.getInt("Experience.Herbalism.Small_Grass", 10);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (type == Material.DOUBLE_PLANT) {
|
|
||||||
switch (data.getData()) {
|
|
||||||
case 0x0:
|
|
||||||
return config.getInt("Experience.Herbalism.Sunflower", 50);
|
|
||||||
|
|
||||||
case 0x1:
|
|
||||||
return config.getInt("Experience.Herbalism.Lilac", 50);
|
|
||||||
|
|
||||||
case 0x2:
|
|
||||||
return config.getInt("Experience.Herbalism.Tall_Grass", 50);
|
|
||||||
|
|
||||||
case 0x3:
|
|
||||||
return config.getInt("Experience.Herbalism.Tall_Fern", 50);
|
|
||||||
|
|
||||||
case 0x4:
|
|
||||||
return config.getInt("Experience.Herbalism.Rose_Bush", 50);
|
|
||||||
|
|
||||||
case 0x5:
|
|
||||||
return config.getInt("Experience.Herbalism.Peony", 50);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Repair */
|
/* Repair */
|
||||||
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
||||||
public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
public double getRepairXP(MaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||||
@@ -380,8 +224,10 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
public int getWoodcuttingTreeXP(TreeSpecies species) { return config.getInt("Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
|
||||||
|
public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
|
||||||
|
public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
|
||||||
|
public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
|
||||||
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
||||||
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class CustomArmorConfig extends ConfigLoader {
|
|||||||
boolean repairable = config.getBoolean(armorType + "." + armorName + ".Repairable");
|
boolean repairable = config.getBoolean(armorType + "." + armorName + ".Repairable");
|
||||||
Material repairMaterial = Material.matchMaterial(config.getString(armorType + "." + armorName + ".Repair_Material", ""));
|
Material repairMaterial = Material.matchMaterial(config.getString(armorType + "." + armorName + ".Repair_Material", ""));
|
||||||
|
|
||||||
if (repairable && (repairMaterial == null)) {
|
if (repairMaterial == null) {
|
||||||
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + armorName);
|
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + armorName);
|
||||||
repairable = false;
|
repairable = false;
|
||||||
}
|
}
|
||||||
@@ -82,20 +82,16 @@ public class CustomArmorConfig extends ConfigLoader {
|
|||||||
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(armorMaterial), repairMaterial, repairData);
|
||||||
|
|
||||||
if (repairQuantity == 0) {
|
if (repairQuantity == 0) {
|
||||||
repairQuantity = config.getInt(armorType + "." + armorName + ".Repair_Material_Quantity", 2);
|
repairQuantity = config.getInt(armorType + "." + armorName + ".Repair_Material_Data_Quantity", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
String repairItemName = config.getString(armorType + "." + armorName + ".Repair_Material_Pretty_Name");
|
|
||||||
int repairMinimumLevel = config.getInt(armorType + "." + armorName + ".Repair_MinimumLevel", 0);
|
|
||||||
double repairXpMultiplier = config.getDouble(armorType + "." + armorName + ".Repair_XpMultiplier", 1);
|
|
||||||
|
|
||||||
short durability = armorMaterial.getMaxDurability();
|
short durability = armorMaterial.getMaxDurability();
|
||||||
|
|
||||||
if (durability == 0) {
|
if (durability == 0) {
|
||||||
durability = (short) config.getInt(armorType + "." + armorName + ".Durability", 70);
|
durability = (short) config.getInt(armorType + "." + armorName + ".Durability", 70);
|
||||||
}
|
}
|
||||||
|
|
||||||
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, repairItemName, repairMinimumLevel, repairQuantity, durability, ItemType.ARMOR, MaterialType.OTHER, repairXpMultiplier));
|
repairables.add(RepairableFactory.getRepairable(armorMaterial, repairMaterial, repairData, 0, repairQuantity, durability, ItemType.ARMOR, MaterialType.OTHER, 1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
materialList.add(armorMaterial);
|
materialList.add(armorMaterial);
|
||||||
|
|||||||
@@ -68,39 +68,61 @@ public class CustomBlockConfig extends ConfigLoader {
|
|||||||
Material blockMaterial = Material.matchMaterial(blockInfo[0]);
|
Material blockMaterial = Material.matchMaterial(blockInfo[0]);
|
||||||
|
|
||||||
if (blockMaterial == null) {
|
if (blockMaterial == null) {
|
||||||
plugin.getLogger().warning("Invalid material name. This item will be skipped. - " + blockInfo[0]);
|
plugin.getLogger().warning("Invalid material name. [" + blockInfo[0] + "] This item will be skipped. - " + blockName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (blockInfo.length == 2) {
|
||||||
|
String[] dataInfo = blockInfo[1].split("[-]");
|
||||||
|
|
||||||
|
if (dataInfo.length == 2) {
|
||||||
|
byte startData = Byte.valueOf(dataInfo[0]);
|
||||||
|
byte endData = Byte.valueOf(dataInfo[1]);
|
||||||
|
System.out.println(blockName + " Data range; [" + startData + " - " + endData + "]");
|
||||||
|
|
||||||
|
for (byte blockData = startData; blockData <= endData; blockData++) {
|
||||||
|
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||||
|
loadBlock(skillType, blockList, blockName, blockMaterialData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
byte blockData = (blockInfo.length == 2) ? Byte.valueOf(blockInfo[1]) : 0;
|
byte blockData = (blockInfo.length == 2) ? Byte.valueOf(blockInfo[1]) : 0;
|
||||||
|
|
||||||
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
MaterialData blockMaterialData = new MaterialData(blockMaterial, blockData);
|
||||||
|
loadBlock(skillType, blockList, blockName, blockMaterialData);
|
||||||
if (blockList != null) {
|
|
||||||
blockList.add(blockMaterialData);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (skillType.equals("Ability_Blocks")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain");
|
|
||||||
int smeltingXp = 0;
|
|
||||||
|
|
||||||
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
|
||||||
customOres.add(blockMaterialData);
|
|
||||||
smeltingXp = config.getInt(skillType + "." + blockName + ".Smelting_XP_Gain", xp / 10);
|
|
||||||
}
|
|
||||||
else if (skillType.equals("Woodcutting")) {
|
|
||||||
if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) {
|
|
||||||
customLogs.add(blockMaterialData);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
customLeaves.add(blockMaterialData);
|
|
||||||
xp = 0; // Leaves don't grant XP
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadBlock(String skillType, List<MaterialData> blockList, String blockName, MaterialData blockMaterialData) {
|
||||||
|
System.out.println("Loading block: " + blockMaterialData.getItemType() + " " + blockMaterialData.getData());
|
||||||
|
if (blockList != null) {
|
||||||
|
blockList.add(blockMaterialData);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skillType.equals("Ability_Blocks")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int xp = config.getInt(skillType + "." + blockName + ".XP_Gain");
|
||||||
|
int smeltingXp = 0;
|
||||||
|
|
||||||
|
if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) {
|
||||||
|
customOres.add(blockMaterialData);
|
||||||
|
smeltingXp = config.getInt(skillType + "." + blockName + ".Smelting_XP_Gain", xp / 10);
|
||||||
|
}
|
||||||
|
else if (skillType.equals("Woodcutting")) {
|
||||||
|
if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) {
|
||||||
|
customLogs.add(blockMaterialData);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
customLeaves.add(blockMaterialData);
|
||||||
|
xp = 0; // Leaves don't grant XP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
customBlockMap.put(blockMaterialData, new CustomBlock(xp, config.getBoolean(skillType + "." + blockName + ".Double_Drops_Enabled"), smeltingXp));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class CustomToolConfig extends ConfigLoader {
|
|||||||
boolean repairable = config.getBoolean(toolType + "." + toolName + ".Repairable");
|
boolean repairable = config.getBoolean(toolType + "." + toolName + ".Repairable");
|
||||||
Material repairMaterial = Material.matchMaterial(config.getString(toolType + "." + toolName + ".Repair_Material", ""));
|
Material repairMaterial = Material.matchMaterial(config.getString(toolType + "." + toolName + ".Repair_Material", ""));
|
||||||
|
|
||||||
if (repairable && (repairMaterial == null)) {
|
if (repairMaterial == null) {
|
||||||
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + toolName);
|
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + toolName);
|
||||||
repairable = false;
|
repairable = false;
|
||||||
}
|
}
|
||||||
@@ -90,20 +90,16 @@ public class CustomToolConfig extends ConfigLoader {
|
|||||||
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(toolMaterial), repairMaterial, repairData);
|
int repairQuantity = SkillUtils.getRepairAndSalvageQuantities(new ItemStack(toolMaterial), repairMaterial, repairData);
|
||||||
|
|
||||||
if (repairQuantity == 0) {
|
if (repairQuantity == 0) {
|
||||||
repairQuantity = config.getInt(toolType + "." + toolName + ".Repair_Material_Quantity", 2);
|
repairQuantity = config.getInt(toolType + "." + toolName + ".Repair_Material_Data_Quantity", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
String repairItemName = config.getString(toolType + "." + toolName + ".Repair_Material_Pretty_Name");
|
|
||||||
int repairMinimumLevel = config.getInt(toolType + "." + toolName + ".Repair_MinimumLevel", 0);
|
|
||||||
double repairXpMultiplier = config.getDouble(toolType + "." + toolName + ".Repair_XpMultiplier", 1);
|
|
||||||
|
|
||||||
short durability = toolMaterial.getMaxDurability();
|
short durability = toolMaterial.getMaxDurability();
|
||||||
|
|
||||||
if (durability == 0) {
|
if (durability == 0) {
|
||||||
durability = (short) config.getInt(toolType + "." + toolName + ".Durability", 60);
|
durability = (short) config.getInt(toolType + "." + toolName + ".Durability", 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
repairables.add(RepairableFactory.getRepairable(toolMaterial, repairMaterial, repairData, repairItemName, repairMinimumLevel, repairQuantity, durability, ItemType.TOOL, MaterialType.OTHER, repairXpMultiplier));
|
repairables.add(RepairableFactory.getRepairable(toolMaterial, repairMaterial, repairData, 0, repairQuantity, durability, ItemType.TOOL, MaterialType.OTHER, 1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
double multiplier = config.getDouble(toolType + "." + toolName + ".XP_Modifier", 1.0);
|
double multiplier = config.getDouble(toolType + "." + toolName + ".XP_Modifier", 1.0);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -118,14 +117,11 @@ public class PotionConfig extends ConfigLoader {
|
|||||||
short dataValue = Short.parseShort(potion_section.getName());
|
short dataValue = Short.parseShort(potion_section.getName());
|
||||||
|
|
||||||
String name = potion_section.getString("Name");
|
String name = potion_section.getString("Name");
|
||||||
if (name != null) {
|
|
||||||
name = ChatColor.translateAlternateColorCodes('&', name);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> lore = new ArrayList<String>();
|
List<String> lore = new ArrayList<String>();
|
||||||
if (potion_section.contains("Lore")) {
|
if (potion_section.contains("Lore")) {
|
||||||
for (String line : potion_section.getStringList("Lore")) {
|
for (String line : potion_section.getStringList("Lore")) {
|
||||||
lore.add(ChatColor.translateAlternateColorCodes('&', line));
|
lore.add(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
@@ -36,8 +35,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
public List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
||||||
public List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
||||||
public List<ExcavationTreasure> excavationFromSnow = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromSnow = new ArrayList<ExcavationTreasure>();
|
||||||
public List<ExcavationTreasure> excavationFromRedSand = new ArrayList<ExcavationTreasure>();
|
|
||||||
public List<ExcavationTreasure> excavationFromPodzol = new ArrayList<ExcavationTreasure>();
|
|
||||||
|
|
||||||
public List<HylianTreasure> hylianFromBushes = new ArrayList<HylianTreasure>();
|
public List<HylianTreasure> hylianFromBushes = new ArrayList<HylianTreasure>();
|
||||||
public List<HylianTreasure> hylianFromFlowers = new ArrayList<HylianTreasure>();
|
public List<HylianTreasure> hylianFromFlowers = new ArrayList<HylianTreasure>();
|
||||||
@@ -57,7 +54,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
public List<ShakeTreasure> shakeFromMushroomCow = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromMushroomCow = new ArrayList<ShakeTreasure>();
|
||||||
public List<ShakeTreasure> shakeFromPig = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromPig = new ArrayList<ShakeTreasure>();
|
||||||
public List<ShakeTreasure> shakeFromPigZombie = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromPigZombie = new ArrayList<ShakeTreasure>();
|
||||||
public List<ShakeTreasure> shakeFromPlayer = new ArrayList<ShakeTreasure>();
|
|
||||||
public List<ShakeTreasure> shakeFromSheep = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromSheep = new ArrayList<ShakeTreasure>();
|
||||||
public List<ShakeTreasure> shakeFromSkeleton = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromSkeleton = new ArrayList<ShakeTreasure>();
|
||||||
public List<ShakeTreasure> shakeFromSlime = new ArrayList<ShakeTreasure>();
|
public List<ShakeTreasure> shakeFromSlime = new ArrayList<ShakeTreasure>();
|
||||||
@@ -176,17 +172,12 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
else if (materialName.contains("INK_SACK")) {
|
else if (materialName.contains("INK_SACK")) {
|
||||||
material = Material.INK_SACK;
|
material = Material.INK_SACK;
|
||||||
}
|
}
|
||||||
else if (materialName.contains("INVENTORY")) {
|
|
||||||
// Use magic material BED_BLOCK to know that we're grabbing something from the inventory and not a normal treasure
|
|
||||||
shakeFromPlayer.add(new ShakeTreasure(new ItemStack(Material.BED_BLOCK, 1, (byte) 0), 1, getInventoryStealDropChance(), getInventoryStealDropLevel()));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
material = Material.matchMaterial(materialName);
|
material = Material.matchMaterial(materialName);
|
||||||
}
|
}
|
||||||
|
|
||||||
int amount = config.getInt(type + "." + treasureName + ".Amount");
|
int amount = config.getInt(type + "." + treasureName + ".Amount");
|
||||||
short data = (treasureInfo.length == 2) ? Short.parseShort(treasureInfo[1]) : (short) config.getInt(type + "." + treasureName + ".Data");
|
short data = (treasureInfo.length == 2) ? Byte.valueOf(treasureInfo[1]) : (short) config.getInt(type + "." + treasureName + ".Data");
|
||||||
|
|
||||||
if (material == null) {
|
if (material == null) {
|
||||||
reason.add("Invalid material: " + materialName);
|
reason.add("Invalid material: " + materialName);
|
||||||
@@ -243,22 +234,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
item = new Potion(PotionType.valueOf(potionType.toUpperCase().trim())).toItemStack(amount);
|
item = new Potion(PotionType.valueOf(potionType.toUpperCase().trim())).toItemStack(amount);
|
||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Custom_Name")) {
|
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
|
||||||
itemMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', config.getString(type + "." + treasureName + ".Custom_Name")));
|
|
||||||
item.setItemMeta(itemMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Lore")) {
|
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
|
||||||
List<String> lore = new ArrayList<String>();
|
|
||||||
for (String s : config.getStringList(type + "." + treasureName + ".Lore")) {
|
|
||||||
lore.add(ChatColor.translateAlternateColorCodes('&', s));
|
|
||||||
}
|
|
||||||
itemMeta.setLore(lore);
|
|
||||||
item.setItemMeta(itemMeta);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException ex) {
|
catch (IllegalArgumentException ex) {
|
||||||
reason.add("Invalid Potion_Type: " + potionType);
|
reason.add("Invalid Potion_Type: " + potionType);
|
||||||
@@ -272,22 +247,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
dye.setColor(DyeColor.valueOf(color.toUpperCase().trim()));
|
dye.setColor(DyeColor.valueOf(color.toUpperCase().trim()));
|
||||||
|
|
||||||
item = dye.toItemStack(amount);
|
item = dye.toItemStack(amount);
|
||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Custom_Name")) {
|
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
|
||||||
itemMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', config.getString(type + "." + treasureName + ".Custom_Name")));
|
|
||||||
item.setItemMeta(itemMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Lore")) {
|
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
|
||||||
List<String> lore = new ArrayList<String>();
|
|
||||||
for (String s : config.getStringList(type + "." + treasureName + ".Lore")) {
|
|
||||||
lore.add(ChatColor.translateAlternateColorCodes('&', s));
|
|
||||||
}
|
|
||||||
itemMeta.setLore(lore);
|
|
||||||
item.setItemMeta(itemMeta);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException ex) {
|
catch (IllegalArgumentException ex) {
|
||||||
reason.add("Invalid Dye_Color: " + color);
|
reason.add("Invalid Dye_Color: " + color);
|
||||||
@@ -298,17 +257,13 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Custom_Name")) {
|
if (config.contains(type + "." + treasureName + ".Custom_Name")) {
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
itemMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', config.getString(type + "." + treasureName + ".Custom_Name")));
|
itemMeta.setDisplayName(config.getString(type + "." + treasureName + "Custom_Name"));
|
||||||
item.setItemMeta(itemMeta);
|
item.setItemMeta(itemMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.contains(type + "." + treasureName + ".Lore")) {
|
if (config.contains(type + "." + treasureName + ".Lore")) {
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
List<String> lore = new ArrayList<String>();
|
itemMeta.setLore(config.getStringList(type + "." + treasureName + "Custom_Name"));
|
||||||
for (String s : config.getStringList(type + "." + treasureName + ".Lore")) {
|
|
||||||
lore.add(ChatColor.translateAlternateColorCodes('&', s));
|
|
||||||
}
|
|
||||||
itemMeta.setLore(lore);
|
|
||||||
item.setItemMeta(itemMeta);
|
item.setItemMeta(itemMeta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,9 +314,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
else if (type.equals("Shake.PIG_ZOMBIE")) {
|
else if (type.equals("Shake.PIG_ZOMBIE")) {
|
||||||
shakeFromPigZombie.add(shakeTreasure);
|
shakeFromPigZombie.add(shakeTreasure);
|
||||||
}
|
}
|
||||||
else if (type.equals("Shake.PLAYER")) {
|
|
||||||
shakeFromPlayer.add(shakeTreasure);
|
|
||||||
}
|
|
||||||
else if (type.equals("Shake.SHEEP")) {
|
else if (type.equals("Shake.SHEEP")) {
|
||||||
shakeFromSheep.add(shakeTreasure);
|
shakeFromSheep.add(shakeTreasure);
|
||||||
}
|
}
|
||||||
@@ -422,14 +374,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
if (dropList.contains("Snow")) {
|
if (dropList.contains("Snow")) {
|
||||||
excavationFromSnow.add(excavationTreasure);
|
excavationFromSnow.add(excavationTreasure);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dropList.contains("Red_Sand")) {
|
|
||||||
excavationFromRedSand.add(excavationTreasure);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dropList.contains("Podzol")) {
|
|
||||||
excavationFromPodzol.add(excavationTreasure);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (isHylian) {
|
else if (isHylian) {
|
||||||
HylianTreasure hylianTreasure = new HylianTreasure(item, xp, dropChance, dropLevel);
|
HylianTreasure hylianTreasure = new HylianTreasure(item, xp, dropChance, dropLevel);
|
||||||
@@ -481,11 +425,6 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getInventoryStealEnabled() { return config.contains("Shake.PLAYER.INVENTORY"); }
|
|
||||||
public boolean getInventoryStealStacks() { return config.getBoolean("Shake.PLAYER.INVENTORY.Whole_Stacks"); }
|
|
||||||
public double getInventoryStealDropChance() { return config.getDouble("Shake.PLAYER.INVENTORY.Drop_Chance"); }
|
|
||||||
public int getInventoryStealDropLevel() { return config.getInt("Shake.PLAYER.INVENTORY.Drop_Level"); }
|
|
||||||
|
|
||||||
public double getItemDropRate(int tier, Rarity rarity) { return config.getDouble("Item_Drop_Rates.Tier_" + tier + "." + rarity.toString()); }
|
public double getItemDropRate(int tier, Rarity rarity) { return config.getDouble("Item_Drop_Rates.Tier_" + tier + "." + rarity.toString()); }
|
||||||
public double getEnchantmentDropRate(int tier, Rarity rarity) { return config.getDouble("Enchantment_Drop_Rates.Tier_" + tier + "." + rarity.toString()); }
|
public double getEnchantmentDropRate(int tier, Rarity rarity) { return config.getDouble("Enchantment_Drop_Rates.Tier_" + tier + "." + rarity.toString()); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.database;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||||
@@ -67,44 +66,20 @@ public interface DatabaseManager {
|
|||||||
* Add a new user to the database.
|
* Add a new user to the database.
|
||||||
*
|
*
|
||||||
* @param playerName The name of the player to be added to the database
|
* @param playerName The name of the player to be added to the database
|
||||||
* @param uuid The uuid of the player to be added to the database
|
|
||||||
*/
|
*/
|
||||||
public void newUser(String playerName, UUID uuid);
|
public void newUser(String playerName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a player from the database.
|
* Load a player from the database.
|
||||||
*
|
*
|
||||||
* @deprecated replaced by {@link #loadPlayerProfile(String playerName, UUID uuid, boolean createNew)}
|
|
||||||
*
|
|
||||||
* @param playerName The name of the player to load from the database
|
* @param playerName The name of the player to load from the database
|
||||||
* @param createNew Whether to create a new record if the player is not
|
* @param createNew Whether to create a new record if the player is not
|
||||||
* found
|
* found
|
||||||
* @return The player's data, or an unloaded PlayerProfile if not found
|
* @return The player's data, or an unloaded PlayerProfile if not found
|
||||||
* and createNew is false
|
* and createNew is false
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public PlayerProfile loadPlayerProfile(String playerName, boolean createNew);
|
public PlayerProfile loadPlayerProfile(String playerName, boolean createNew);
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a player from the database.
|
|
||||||
*
|
|
||||||
* @param uuid The uuid of the player to load from the database
|
|
||||||
* @return The player's data, or an unloaded PlayerProfile if not found
|
|
||||||
*/
|
|
||||||
public PlayerProfile loadPlayerProfile(UUID uuid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a player from the database. Attempt to use uuid, fall back on playername
|
|
||||||
*
|
|
||||||
* @param playerName The name of the player to load from the database
|
|
||||||
* @param uuid The uuid of the player to load from the database
|
|
||||||
* @param createNew Whether to create a new record if the player is not
|
|
||||||
* found
|
|
||||||
* @return The player's data, or an unloaded PlayerProfile if not found
|
|
||||||
* and createNew is false
|
|
||||||
*/
|
|
||||||
public PlayerProfile loadPlayerProfile(String playerName, UUID uuid, boolean createNew);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all users currently stored in the database.
|
* Get all users currently stored in the database.
|
||||||
*
|
*
|
||||||
@@ -120,19 +95,10 @@ public interface DatabaseManager {
|
|||||||
*/
|
*/
|
||||||
public void convertUsers(DatabaseManager destination);
|
public void convertUsers(DatabaseManager destination);
|
||||||
|
|
||||||
public boolean saveUserUUID(String userName, UUID uuid);
|
|
||||||
|
|
||||||
public boolean saveUserUUIDs(Map<String, UUID> fetchedUUIDs);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the type of database in use. Custom databases should return CUSTOM.
|
* Retrieve the type of database in use. Custom databases should return CUSTOM.
|
||||||
*
|
*
|
||||||
* @return The type of database
|
* @return The type of database
|
||||||
*/
|
*/
|
||||||
public DatabaseType getDatabaseType();
|
public DatabaseType getDatabaseType();
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when the plugin disables
|
|
||||||
*/
|
|
||||||
public void onDisable();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class DatabaseManagerFactory {
|
|||||||
*/
|
*/
|
||||||
public static void setCustomDatabaseManagerClass(Class<? extends DatabaseManager> clazz) {
|
public static void setCustomDatabaseManagerClass(Class<? extends DatabaseManager> clazz) {
|
||||||
try {
|
try {
|
||||||
clazz.getConstructor();
|
clazz.getConstructor((Class<?>) null);
|
||||||
customManager = clazz;
|
customManager = clazz;
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
@@ -78,10 +78,10 @@ public class DatabaseManagerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static DatabaseManager createDefaultCustomDatabaseManager() throws Throwable {
|
public static DatabaseManager createDefaultCustomDatabaseManager() throws Throwable {
|
||||||
return customManager.getConstructor().newInstance();
|
return customManager.getConstructor((Class<?>) null).newInstance((Object[]) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DatabaseManager createCustomDatabaseManager(Class<? extends DatabaseManager> clazz) throws Throwable {
|
public static DatabaseManager createCustomDatabaseManager(Class<? extends DatabaseManager> clazz) throws Throwable {
|
||||||
return clazz.getConstructor().newInstance();
|
return clazz.getConstructor((Class<?>) null).newInstance((Object[]) null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,18 @@ package com.gmail.nossr50.database;
|
|||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.Closeable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.EnumMap;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
@@ -24,11 +22,9 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||||
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||||
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||||
import com.gmail.nossr50.datatypes.database.UpgradeType;
|
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.runnables.database.UUIDUpdateAsyncTask;
|
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
@@ -47,10 +43,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
usersFile = new File(mcMMO.getUsersFilePath());
|
usersFile = new File(mcMMO.getUsersFilePath());
|
||||||
checkStructure();
|
checkStructure();
|
||||||
updateLeaderboards();
|
updateLeaderboards();
|
||||||
|
|
||||||
if (mcMMO.getUpgradeManager().shouldUpgrade(UpgradeType.ADD_UUIDS)) {
|
|
||||||
new UUIDUpdateAsyncTask(mcMMO.p, getStoredUsers()).runTaskAsynchronously(mcMMO.p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void purgePowerlessUsers() {
|
public void purgePowerlessUsers() {
|
||||||
@@ -87,6 +79,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
purgedUsers++;
|
purgedUsers++;
|
||||||
|
Misc.profileCleanup(character[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,22 +91,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
tryClose(out);
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +118,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
String name = character[USERNAME];
|
String name = character[0];
|
||||||
long lastPlayed = 0;
|
long lastPlayed = 0;
|
||||||
boolean rewrite = false;
|
boolean rewrite = false;
|
||||||
try {
|
try {
|
||||||
@@ -155,6 +134,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
if (currentTime - lastPlayed > PURGE_TIME) {
|
if (currentTime - lastPlayed > PURGE_TIME) {
|
||||||
removedPlayers++;
|
removedPlayers++;
|
||||||
|
Misc.profileCleanup(name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (rewrite) {
|
if (rewrite) {
|
||||||
@@ -177,22 +157,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
tryClose(out);
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +180,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
// Write out the same file but when we get to the player we want to remove, we skip his line.
|
// Write out the same file but when we get to the player we want to remove, we skip his line.
|
||||||
if (!worked && line.split(":")[USERNAME].equalsIgnoreCase(playerName)) {
|
if (!worked && line.split(":")[0].equalsIgnoreCase(playerName)) {
|
||||||
mcMMO.p.getLogger().info("User found, removing...");
|
mcMMO.p.getLogger().info("User found, removing...");
|
||||||
worked = true;
|
worked = true;
|
||||||
continue; // Skip the player
|
continue; // Skip the player
|
||||||
@@ -230,22 +196,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
tryClose(out);
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +208,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
public boolean saveUser(PlayerProfile profile) {
|
public boolean saveUser(PlayerProfile profile) {
|
||||||
String playerName = profile.getPlayerName();
|
String playerName = profile.getPlayerName();
|
||||||
UUID uuid = profile.getUniqueId();
|
|
||||||
|
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
FileWriter out = null;
|
FileWriter out = null;
|
||||||
@@ -271,9 +222,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
// While not at the end of the file
|
// While not at the end of the file
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
// Read the line in and copy it to the output if it's not the player we want to edit
|
// Read the line in and copy it to the output it's not the player we want to edit
|
||||||
String[] character = line.split(":");
|
if (!line.split(":")[0].equalsIgnoreCase(playerName)) {
|
||||||
if (!(uuid != null && character[UUID_INDEX].equalsIgnoreCase(uuid.toString())) && !character[USERNAME].equalsIgnoreCase(playerName)) {
|
|
||||||
writer.append(line).append("\r\n");
|
writer.append(line).append("\r\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -320,8 +270,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":");
|
writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":");
|
||||||
writer.append(profile.getSkillLevel(SkillType.ALCHEMY)).append(":");
|
writer.append(profile.getSkillLevel(SkillType.ALCHEMY)).append(":");
|
||||||
writer.append(profile.getSkillXpLevel(SkillType.ALCHEMY)).append(":");
|
writer.append(profile.getSkillXpLevel(SkillType.ALCHEMY)).append(":");
|
||||||
writer.append(uuid != null ? uuid.toString() : "NULL").append(":");
|
|
||||||
writer.append(profile.getScoreboardTipsShown()).append(":");
|
|
||||||
writer.append("\r\n");
|
writer.append("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,22 +284,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
tryClose(out);
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -378,7 +312,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
return skills;
|
return skills;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void newUser(String playerName, UUID uuid) {
|
public void newUser(String playerName) {
|
||||||
BufferedWriter out = null;
|
BufferedWriter out = null;
|
||||||
synchronized (fileWritingLock) {
|
synchronized (fileWritingLock) {
|
||||||
try {
|
try {
|
||||||
@@ -427,8 +361,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
out.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":"); // Mob Healthbar HUD
|
out.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":"); // Mob Healthbar HUD
|
||||||
out.append("0:"); // Alchemy
|
out.append("0:"); // Alchemy
|
||||||
out.append("0:"); // AlchemyXp
|
out.append("0:"); // AlchemyXp
|
||||||
out.append(uuid != null ? uuid.toString() : "NULL").append(":"); // UUID
|
|
||||||
out.append("0:"); // Scoreboard tips shown
|
|
||||||
// Add more in the same format as the line above
|
// Add more in the same format as the line above
|
||||||
|
|
||||||
out.newLine();
|
out.newLine();
|
||||||
@@ -437,28 +370,12 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (out != null) {
|
tryClose(out);
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public PlayerProfile loadPlayerProfile(String playerName, boolean create) {
|
public PlayerProfile loadPlayerProfile(String playerName, boolean create) {
|
||||||
return loadPlayerProfile(playerName, null, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlayerProfile loadPlayerProfile(UUID uuid) {
|
|
||||||
return loadPlayerProfile("", uuid, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlayerProfile loadPlayerProfile(String playerName, UUID uuid, boolean create) {
|
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
String usersFilePath = mcMMO.getUsersFilePath();
|
String usersFilePath = mcMMO.getUsersFilePath();
|
||||||
|
|
||||||
@@ -472,36 +389,17 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
// Find if the line contains the player we want.
|
// Find if the line contains the player we want.
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
|
|
||||||
// Compare names because we don't have a valid uuid for that player even
|
if (!character[0].equalsIgnoreCase(playerName)) {
|
||||||
// if input uuid is not null
|
|
||||||
if (character[UUID_INDEX].equalsIgnoreCase("NULL")) {
|
|
||||||
if (!character[USERNAME].equalsIgnoreCase(playerName)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If input uuid is not null then we should compare uuids
|
|
||||||
else if ((uuid != null && !character[UUID_INDEX].equalsIgnoreCase(uuid.toString())) || (uuid == null && !character[USERNAME].equalsIgnoreCase(playerName))) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update playerName in database after name change
|
|
||||||
if (!character[USERNAME].equalsIgnoreCase(playerName)) {
|
|
||||||
mcMMO.p.debug("Name change detected: " + character[USERNAME] + " => " + playerName);
|
|
||||||
character[USERNAME] = playerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return loadFromLine(character);
|
return loadFromLine(character);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Didn't find the player, create a new one
|
// Didn't find the player, create a new one
|
||||||
if (create) {
|
if (create) {
|
||||||
if (uuid == null) {
|
newUser(playerName);
|
||||||
newUser(playerName, uuid);
|
return new PlayerProfile(playerName, true);
|
||||||
return new PlayerProfile(playerName, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
newUser(playerName, uuid);
|
|
||||||
return new PlayerProfile(playerName, uuid, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
@@ -515,18 +413,14 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
in.close();
|
in.close();
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
// Ignore
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return unloaded profile
|
// Return unloaded profile
|
||||||
if (uuid == null) {
|
return new PlayerProfile(playerName);
|
||||||
return new PlayerProfile(playerName);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new PlayerProfile(playerName, uuid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void convertUsers(DatabaseManager destination) {
|
public void convertUsers(DatabaseManager destination) {
|
||||||
@@ -558,138 +452,11 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean saveUserUUID(String userName, UUID uuid) {
|
|
||||||
boolean worked = false;
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
BufferedReader in = null;
|
|
||||||
FileWriter out = null;
|
|
||||||
String usersFilePath = mcMMO.getUsersFilePath();
|
|
||||||
|
|
||||||
synchronized (fileWritingLock) {
|
|
||||||
try {
|
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
|
||||||
StringBuilder writer = new StringBuilder();
|
|
||||||
String line;
|
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
|
||||||
String[] character = line.split(":");
|
|
||||||
if (!worked && character[USERNAME].equalsIgnoreCase(userName)) {
|
|
||||||
if (character.length < 42) {
|
|
||||||
mcMMO.p.getLogger().severe("Could not update UUID for " + userName + "!");
|
|
||||||
mcMMO.p.getLogger().severe("Database entry is invalid.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
line = line.replace(character[UUID_INDEX], uuid.toString());
|
|
||||||
worked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
out = new FileWriter(usersFilePath); // Write out the new file
|
|
||||||
out.write(writer.toString());
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
mcMMO.p.getLogger().info(i + " entries written while saving UUID for " + userName);
|
|
||||||
if (in != null) {
|
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return worked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean saveUserUUIDs(Map<String, UUID> fetchedUUIDs) {
|
|
||||||
BufferedReader in = null;
|
|
||||||
FileWriter out = null;
|
|
||||||
String usersFilePath = mcMMO.getUsersFilePath();
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
synchronized (fileWritingLock) {
|
|
||||||
try {
|
|
||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
|
||||||
StringBuilder writer = new StringBuilder();
|
|
||||||
String line;
|
|
||||||
|
|
||||||
while (((line = in.readLine()) != null)) {
|
|
||||||
String[] character = line.split(":");
|
|
||||||
if (!fetchedUUIDs.isEmpty() && fetchedUUIDs.containsKey(character[USERNAME])) {
|
|
||||||
if (character.length < 42) {
|
|
||||||
mcMMO.p.getLogger().severe("Could not update UUID for " + character[USERNAME] + "!");
|
|
||||||
mcMMO.p.getLogger().severe("Database entry is invalid.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
character[UUID_INDEX] = fetchedUUIDs.remove(character[USERNAME]).toString();
|
|
||||||
line = new StringBuilder(org.apache.commons.lang.StringUtils.join(character, ":")).append(":").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
out = new FileWriter(usersFilePath); // Write out the new file
|
|
||||||
out.write(writer.toString());
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
mcMMO.p.getLogger().info(i + " entries written while saving UUID batch");
|
|
||||||
if (in != null) {
|
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getStoredUsers() {
|
public List<String> getStoredUsers() {
|
||||||
ArrayList<String> users = new ArrayList<String>();
|
ArrayList<String> users = new ArrayList<String>();
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
@@ -703,21 +470,14 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
users.add(character[USERNAME]);
|
users.add(character[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return users;
|
return users;
|
||||||
@@ -761,7 +521,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] data = line.split(":");
|
String[] data = line.split(":");
|
||||||
playerName = data[USERNAME];
|
playerName = data[0];
|
||||||
int powerLevel = 0;
|
int powerLevel = 0;
|
||||||
|
|
||||||
Map<SkillType, Integer> skills = getSkillMapFromLine(data);
|
Map<SkillType, Integer> skills = getSkillMapFromLine(data);
|
||||||
@@ -787,14 +547,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " during user " + playerName + " (Are you sure you formatted it correctly?) " + e.toString());
|
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " during user " + playerName + " (Are you sure you formatted it correctly?) " + e.toString());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -844,7 +597,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
in = new BufferedReader(new FileReader(usersFilePath));
|
in = new BufferedReader(new FileReader(usersFilePath));
|
||||||
StringBuilder writer = new StringBuilder();
|
StringBuilder writer = new StringBuilder();
|
||||||
String line;
|
String line;
|
||||||
HashSet<String> usernames = new HashSet<String>();
|
|
||||||
HashSet<String> players = new HashSet<String>();
|
HashSet<String> players = new HashSet<String>();
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
@@ -857,20 +609,10 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (line.charAt(line.length() - 1) != ':') {
|
if (line.charAt(line.length() - 1) != ':') {
|
||||||
line = line.concat(":");
|
line = line.concat(":");
|
||||||
}
|
}
|
||||||
boolean updated = false;
|
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
|
|
||||||
// Prevent the same username from being present multiple times
|
|
||||||
if (!usernames.add(character[USERNAME])) {
|
|
||||||
character[USERNAME] = "_INVALID_OLD_USERNAME_'";
|
|
||||||
updated = true;
|
|
||||||
if (character.length < UUID_INDEX + 1 || character[UUID_INDEX].equals("NULL")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prevent the same player from being present multiple times
|
// Prevent the same player from being present multiple times
|
||||||
if (character.length >= 42 && (!character[UUID_INDEX].isEmpty() && !character[UUID_INDEX].equals("NULL") && !players.add(character[UUID_INDEX]))) {
|
if (!players.add(character[0])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -882,54 +624,39 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
String oldVersion = null;
|
String oldVersion = null;
|
||||||
|
|
||||||
if (character.length > 33 && !character[33].isEmpty()) {
|
|
||||||
// Removal of Spout Support
|
|
||||||
// Version 1.4.07-dev2
|
|
||||||
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
|
||||||
character[33] = "";
|
|
||||||
if (oldVersion == null) {
|
|
||||||
oldVersion = "1.4.07";
|
|
||||||
}
|
|
||||||
updated = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.getInstance().getTruncateSkills()) {
|
|
||||||
for (SkillType skill : SkillType.NON_CHILD_SKILLS) {
|
|
||||||
int index = getSkillIndex(skill);
|
|
||||||
if (index >= character.length) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int cap = Config.getInstance().getLevelCap(skill);
|
|
||||||
if (Integer.valueOf(character[index]) > cap) {
|
|
||||||
mcMMO.p.getLogger().warning("Truncating " + skill.getName() + " to configured max level for player " + character[USERNAME]);
|
|
||||||
character[index] = cap + "";
|
|
||||||
updated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If they're valid, rewrite them to the file.
|
|
||||||
if (!updated && character.length == 43) {
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (character.length <= 33) {
|
if (character.length <= 33) {
|
||||||
// Introduction of HUDType
|
// Introduction of HUDType
|
||||||
// Version 1.1.06
|
// Version 1.1.06
|
||||||
// commit 78f79213cdd7190cd11ae54526f3b4ea42078e8a
|
// commit 78f79213cdd7190cd11ae54526f3b4ea42078e8a
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
line = line.concat(" :");
|
||||||
character[character.length - 1] = "";
|
character = line.split(":");
|
||||||
oldVersion = "1.1.06";
|
oldVersion = "1.1.06";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!character[33].isEmpty()) {
|
||||||
|
// Removal of Spout Support
|
||||||
|
// Version 1.4.07-dev2
|
||||||
|
// commit 7bac0e2ca5143bce84dc160617fed97f0b1cb968
|
||||||
|
line = line.replace(character[33], "");
|
||||||
|
if (oldVersion == null) {
|
||||||
|
oldVersion = "1.4.07";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If they're valid, rewrite them to the file.
|
||||||
|
if (character.length == 41) {
|
||||||
|
writer.append(line).append("\r\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder newLine = new StringBuilder(line);
|
||||||
|
|
||||||
if (character.length <= 35) {
|
if (character.length <= 35) {
|
||||||
// Introduction of Fishing
|
// Introduction of Fishing
|
||||||
// Version 1.2.00
|
// Version 1.2.00
|
||||||
// commit a814b57311bc7734661109f0e77fc8bab3a0bd29
|
// commit a814b57311bc7734661109f0e77fc8bab3a0bd29
|
||||||
character = Arrays.copyOf(character, character.length + 2);
|
newLine.append(0).append(":");
|
||||||
character[character.length - 1] = "0";
|
newLine.append(0).append(":");
|
||||||
character[character.length - 2] = "0";
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.2.00";
|
oldVersion = "1.2.00";
|
||||||
}
|
}
|
||||||
@@ -938,8 +665,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
// Introduction of Blast Mining cooldowns
|
// Introduction of Blast Mining cooldowns
|
||||||
// Version 1.3.00-dev
|
// Version 1.3.00-dev
|
||||||
// commit fadbaf429d6b4764b8f1ad0efaa524a090e82ef5
|
// commit fadbaf429d6b4764b8f1ad0efaa524a090e82ef5
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
newLine.append(0).append(":");
|
||||||
character[character.length - 1] = "0";
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.3.00";
|
oldVersion = "1.3.00";
|
||||||
}
|
}
|
||||||
@@ -949,8 +675,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
// Version 1.4.00-dev
|
// Version 1.4.00-dev
|
||||||
// commmit 3f6c07ba6aaf44e388cc3b882cac3d8f51d0ac28
|
// commmit 3f6c07ba6aaf44e388cc3b882cac3d8f51d0ac28
|
||||||
// XXX Cannot create an OfflinePlayer at startup, use 0 and fix in purge
|
// XXX Cannot create an OfflinePlayer at startup, use 0 and fix in purge
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
newLine.append("0").append(":");
|
||||||
character[character.length - 1] = "0";
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.00";
|
oldVersion = "1.4.00";
|
||||||
}
|
}
|
||||||
@@ -959,8 +684,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
// Addition of mob healthbars
|
// Addition of mob healthbars
|
||||||
// Version 1.4.06
|
// Version 1.4.06
|
||||||
// commit da29185b7dc7e0d992754bba555576d48fa08aa6
|
// commit da29185b7dc7e0d992754bba555576d48fa08aa6
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
newLine.append(Config.getInstance().getMobHealthbarDefault().toString()).append(":");
|
||||||
character[character.length - 1] = Config.getInstance().getMobHealthbarDefault().toString();
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.06";
|
oldVersion = "1.4.06";
|
||||||
}
|
}
|
||||||
@@ -968,86 +692,58 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
if (character.length <= 39) {
|
if (character.length <= 39) {
|
||||||
// Addition of Alchemy
|
// Addition of Alchemy
|
||||||
// Version 1.4.08
|
// Version 1.4.08
|
||||||
character = Arrays.copyOf(character, character.length + 2);
|
newLine.append("0").append(":");
|
||||||
character[character.length - 1] = "0";
|
newLine.append("0").append(":");
|
||||||
character[character.length - 2] = "0";
|
|
||||||
if (oldVersion == null) {
|
if (oldVersion == null) {
|
||||||
oldVersion = "1.4.08";
|
oldVersion = "1.4.08";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (character.length <= 41) {
|
|
||||||
// Addition of UUIDs
|
|
||||||
// Version 1.5.01
|
|
||||||
// Add a value because otherwise it gets removed
|
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
|
||||||
character[character.length - 1] = "NULL";
|
|
||||||
if (oldVersion == null) {
|
|
||||||
oldVersion = "1.5.01";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (character.length <= 42) {
|
|
||||||
// Addition of scoreboard tips auto disable
|
|
||||||
// Version 1.5.02
|
|
||||||
character = Arrays.copyOf(character, character.length + 1);
|
|
||||||
character[character.length - 1] = "0";
|
|
||||||
if (oldVersion == null) {
|
|
||||||
oldVersion = "1.5.02";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Remove any blanks that shouldn't be there, and validate the other fields
|
||||||
|
String[] newCharacter = newLine.toString().split(":");
|
||||||
boolean corrupted = false;
|
boolean corrupted = false;
|
||||||
|
|
||||||
for (int i = 0; i < character.length; i++) {
|
for (int i = 0; i < newCharacter.length; i++) {
|
||||||
if (character[i].isEmpty() && !(i == 2 || i == 3 || i == 23 || i == 33 || i == 41)) {
|
if (newCharacter[i].isEmpty() && !(i == 2 || i == 3 || i == 23 || i == 33)) {
|
||||||
corrupted = true;
|
corrupted = true;
|
||||||
if (i == 37) {
|
|
||||||
character[i] = String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
|
if (newCharacter.length != 41) {
|
||||||
}
|
newCharacter = (String[]) ArrayUtils.remove(newCharacter, i);
|
||||||
else if (i == 38) {
|
|
||||||
character[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
character[i] = "0";
|
if (i == 37) {
|
||||||
|
newCharacter[i] = String.valueOf(System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
|
||||||
|
}
|
||||||
|
else if (i == 38) {
|
||||||
|
newCharacter[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
newCharacter[i] = "0";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isInt(character[i]) && i == 38) {
|
if (StringUtils.isInt(newCharacter[i]) && i == 38) {
|
||||||
corrupted = true;
|
corrupted = true;
|
||||||
character[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
newCharacter[i] = Config.getInstance().getMobHealthbarDefault().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!StringUtils.isInt(character[i]) && !(i == 0 || i == 2 || i == 3 || i == 23 || i == 33 || i == 38 || i == 41)) {
|
if (!StringUtils.isInt(newCharacter[i]) && !(i == 0 || i == 2 || i == 3 || i == 23 || i == 33 || i == 38)) {
|
||||||
corrupted = true;
|
corrupted = true;
|
||||||
character[i] = "0";
|
newCharacter[i] = "0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (corrupted) {
|
if (corrupted) {
|
||||||
mcMMO.p.debug("Updating corrupted database line for player " + character[USERNAME]);
|
mcMMO.p.debug("Updating corrupted database line for player " + newCharacter[0]);
|
||||||
|
newLine = new StringBuilder(org.apache.commons.lang.StringUtils.join(newCharacter, ":"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldVersion != null) {
|
if (oldVersion != null) {
|
||||||
mcMMO.p.debug("Updating database line from before version " + oldVersion + " for player " + character[USERNAME]);
|
mcMMO.p.debug("Updating database line for player " + character[0] + " from before version " + oldVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
updated |= corrupted;
|
writer.append(newLine).append("\r\n");
|
||||||
updated |= oldVersion != null;
|
|
||||||
|
|
||||||
if (Config.getInstance().getTruncateSkills()) {
|
|
||||||
Map<SkillType, Integer> skills = getSkillMapFromLine(character);
|
|
||||||
for (SkillType skill : SkillType.NON_CHILD_SKILLS) {
|
|
||||||
int cap = Config.getInstance().getLevelCap(skill);
|
|
||||||
if (skills.get(skill) > cap) {
|
|
||||||
updated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (updated) {
|
|
||||||
line = new StringBuilder(org.apache.commons.lang.StringUtils.join(character, ":")).append(":").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
writer.append(line).append("\r\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the new file
|
// Write the new file
|
||||||
@@ -1058,32 +754,10 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
mcMMO.p.getLogger().severe("Exception while reading " + usersFilePath + " (Are you sure you formatted it correctly?)" + e.toString());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (in != null) {
|
tryClose(in);
|
||||||
try {
|
tryClose(out);
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_FISHING);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_BLAST_MINING_COOLDOWN);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_SQL_INDEXES);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_MOB_HEALTHBARS);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.DROP_SQL_PARTY_NAMES);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.DROP_SPOUT);
|
|
||||||
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_ALCHEMY);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1098,6 +772,18 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tryClose(Closeable c) {
|
||||||
|
if (c == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Integer getPlayerRank(String playerName, List<PlayerStat> statsList) {
|
private Integer getPlayerRank(String playerName, List<PlayerStat> statsList) {
|
||||||
if (statsList == null) {
|
if (statsList == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -1130,81 +816,65 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
|
|
||||||
private PlayerProfile loadFromLine(String[] character) {
|
private PlayerProfile loadFromLine(String[] character) {
|
||||||
Map<SkillType, Integer> skills = getSkillMapFromLine(character); // Skill levels
|
Map<SkillType, Integer> skills = getSkillMapFromLine(character); // Skill levels
|
||||||
Map<SkillType, Float> skillsXp = new EnumMap<SkillType, Float>(SkillType.class); // Skill & XP
|
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||||
Map<AbilityType, Integer> skillsDATS = new EnumMap<AbilityType, Integer>(AbilityType.class); // Ability & Cooldown
|
Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
||||||
MobHealthbarType mobHealthbarType;
|
MobHealthbarType mobHealthbarType;
|
||||||
int scoreboardTipsShown;
|
|
||||||
|
|
||||||
// TODO on updates, put new values in a try{} ?
|
// TODO on updates, put new values in a try{} ?
|
||||||
|
|
||||||
skillsXp.put(SkillType.TAMING, (float) Integer.valueOf(character[EXP_TAMING]));
|
skillsXp.put(SkillType.TAMING, (float) Integer.valueOf(character[25]));
|
||||||
skillsXp.put(SkillType.MINING, (float) Integer.valueOf(character[EXP_MINING]));
|
skillsXp.put(SkillType.MINING, (float) Integer.valueOf(character[4]));
|
||||||
skillsXp.put(SkillType.REPAIR, (float) Integer.valueOf(character[EXP_REPAIR]));
|
skillsXp.put(SkillType.REPAIR, (float) Integer.valueOf(character[15]));
|
||||||
skillsXp.put(SkillType.WOODCUTTING, (float) Integer.valueOf(character[EXP_WOODCUTTING]));
|
skillsXp.put(SkillType.WOODCUTTING, (float) Integer.valueOf(character[6]));
|
||||||
skillsXp.put(SkillType.UNARMED, (float) Integer.valueOf(character[EXP_UNARMED]));
|
skillsXp.put(SkillType.UNARMED, (float) Integer.valueOf(character[16]));
|
||||||
skillsXp.put(SkillType.HERBALISM, (float) Integer.valueOf(character[EXP_HERBALISM]));
|
skillsXp.put(SkillType.HERBALISM, (float) Integer.valueOf(character[17]));
|
||||||
skillsXp.put(SkillType.EXCAVATION, (float) Integer.valueOf(character[EXP_EXCAVATION]));
|
skillsXp.put(SkillType.EXCAVATION, (float) Integer.valueOf(character[18]));
|
||||||
skillsXp.put(SkillType.ARCHERY, (float) Integer.valueOf(character[EXP_ARCHERY]));
|
skillsXp.put(SkillType.ARCHERY, (float) Integer.valueOf(character[19]));
|
||||||
skillsXp.put(SkillType.SWORDS, (float) Integer.valueOf(character[EXP_SWORDS]));
|
skillsXp.put(SkillType.SWORDS, (float) Integer.valueOf(character[20]));
|
||||||
skillsXp.put(SkillType.AXES, (float) Integer.valueOf(character[EXP_AXES]));
|
skillsXp.put(SkillType.AXES, (float) Integer.valueOf(character[21]));
|
||||||
skillsXp.put(SkillType.ACROBATICS, (float) Integer.valueOf(character[EXP_ACROBATICS]));
|
skillsXp.put(SkillType.ACROBATICS, (float) Integer.valueOf(character[22]));
|
||||||
skillsXp.put(SkillType.FISHING, (float) Integer.valueOf(character[EXP_FISHING]));
|
skillsXp.put(SkillType.FISHING, (float) Integer.valueOf(character[35]));
|
||||||
skillsXp.put(SkillType.ALCHEMY, (float) Integer.valueOf(character[EXP_ALCHEMY]));
|
skillsXp.put(SkillType.ALCHEMY, (float) Integer.valueOf(character[40]));
|
||||||
|
|
||||||
// Taming - Unused
|
// Taming - Unused
|
||||||
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[COOLDOWN_SUPER_BREAKER]));
|
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[32]));
|
||||||
// Repair - Unused
|
// Repair - Unused
|
||||||
skillsDATS.put(AbilityType.TREE_FELLER, Integer.valueOf(character[COOLDOWN_TREE_FELLER]));
|
skillsDATS.put(AbilityType.TREE_FELLER, Integer.valueOf(character[28]));
|
||||||
skillsDATS.put(AbilityType.BERSERK, Integer.valueOf(character[COOLDOWN_BERSERK]));
|
skillsDATS.put(AbilityType.BERSERK, Integer.valueOf(character[26]));
|
||||||
skillsDATS.put(AbilityType.GREEN_TERRA, Integer.valueOf(character[COOLDOWN_GREEN_TERRA]));
|
skillsDATS.put(AbilityType.GREEN_TERRA, Integer.valueOf(character[29]));
|
||||||
skillsDATS.put(AbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(character[COOLDOWN_GIGA_DRILL_BREAKER]));
|
skillsDATS.put(AbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(character[27]));
|
||||||
// Archery - Unused
|
// Archery - Unused
|
||||||
skillsDATS.put(AbilityType.SERRATED_STRIKES, Integer.valueOf(character[COOLDOWN_SERRATED_STRIKES]));
|
skillsDATS.put(AbilityType.SERRATED_STRIKES, Integer.valueOf(character[30]));
|
||||||
skillsDATS.put(AbilityType.SKULL_SPLITTER, Integer.valueOf(character[COOLDOWN_SKULL_SPLITTER]));
|
skillsDATS.put(AbilityType.SKULL_SPLITTER, Integer.valueOf(character[31]));
|
||||||
// Acrobatics - Unused
|
// Acrobatics - Unused
|
||||||
skillsDATS.put(AbilityType.BLAST_MINING, Integer.valueOf(character[COOLDOWN_BLAST_MINING]));
|
skillsDATS.put(AbilityType.BLAST_MINING, Integer.valueOf(character[36]));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mobHealthbarType = MobHealthbarType.valueOf(character[HEALTHBAR]);
|
mobHealthbarType = MobHealthbarType.valueOf(character[38]);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
|
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID uuid;
|
return new PlayerProfile(character[0], skills, skillsXp, skillsDATS, mobHealthbarType);
|
||||||
try {
|
|
||||||
uuid = UUID.fromString(character[UUID_INDEX]);
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
uuid = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
scoreboardTipsShown = Integer.valueOf(character[SCOREBOARD_TIPS]);
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
scoreboardTipsShown = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new PlayerProfile(character[USERNAME], uuid, skills, skillsXp, skillsDATS, mobHealthbarType, scoreboardTipsShown);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<SkillType, Integer> getSkillMapFromLine(String[] character) {
|
private Map<SkillType, Integer> getSkillMapFromLine(String[] character) {
|
||||||
Map<SkillType, Integer> skills = new EnumMap<SkillType, Integer>(SkillType.class); // Skill & Level
|
Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); // Skill & Level
|
||||||
|
|
||||||
skills.put(SkillType.TAMING, Integer.valueOf(character[SKILLS_TAMING]));
|
skills.put(SkillType.TAMING, Integer.valueOf(character[24]));
|
||||||
skills.put(SkillType.MINING, Integer.valueOf(character[SKILLS_MINING]));
|
skills.put(SkillType.MINING, Integer.valueOf(character[1]));
|
||||||
skills.put(SkillType.REPAIR, Integer.valueOf(character[SKILLS_REPAIR]));
|
skills.put(SkillType.REPAIR, Integer.valueOf(character[7]));
|
||||||
skills.put(SkillType.WOODCUTTING, Integer.valueOf(character[SKILLS_WOODCUTTING]));
|
skills.put(SkillType.WOODCUTTING, Integer.valueOf(character[5]));
|
||||||
skills.put(SkillType.UNARMED, Integer.valueOf(character[SKILLS_UNARMED]));
|
skills.put(SkillType.UNARMED, Integer.valueOf(character[8]));
|
||||||
skills.put(SkillType.HERBALISM, Integer.valueOf(character[SKILLS_HERBALISM]));
|
skills.put(SkillType.HERBALISM, Integer.valueOf(character[9]));
|
||||||
skills.put(SkillType.EXCAVATION, Integer.valueOf(character[SKILLS_EXCAVATION]));
|
skills.put(SkillType.EXCAVATION, Integer.valueOf(character[10]));
|
||||||
skills.put(SkillType.ARCHERY, Integer.valueOf(character[SKILLS_ARCHERY]));
|
skills.put(SkillType.ARCHERY, Integer.valueOf(character[11]));
|
||||||
skills.put(SkillType.SWORDS, Integer.valueOf(character[SKILLS_SWORDS]));
|
skills.put(SkillType.SWORDS, Integer.valueOf(character[12]));
|
||||||
skills.put(SkillType.AXES, Integer.valueOf(character[SKILLS_AXES]));
|
skills.put(SkillType.AXES, Integer.valueOf(character[13]));
|
||||||
skills.put(SkillType.ACROBATICS, Integer.valueOf(character[SKILLS_ACROBATICS]));
|
skills.put(SkillType.ACROBATICS, Integer.valueOf(character[14]));
|
||||||
skills.put(SkillType.FISHING, Integer.valueOf(character[SKILLS_FISHING]));
|
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
||||||
skills.put(SkillType.ALCHEMY, Integer.valueOf(character[SKILLS_ALCHEMY]));
|
skills.put(SkillType.ALCHEMY, Integer.valueOf(character[39]));
|
||||||
|
|
||||||
return skills;
|
return skills;
|
||||||
}
|
}
|
||||||
@@ -1212,81 +882,4 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
public DatabaseType getDatabaseType() {
|
public DatabaseType getDatabaseType() {
|
||||||
return DatabaseType.FLATFILE;
|
return DatabaseType.FLATFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable() { }
|
|
||||||
|
|
||||||
private int getSkillIndex(SkillType skill) {
|
|
||||||
switch (skill) {
|
|
||||||
case ACROBATICS:
|
|
||||||
return SKILLS_ACROBATICS;
|
|
||||||
case ALCHEMY:
|
|
||||||
return SKILLS_ALCHEMY;
|
|
||||||
case ARCHERY:
|
|
||||||
return SKILLS_ARCHERY;
|
|
||||||
case AXES:
|
|
||||||
return SKILLS_AXES;
|
|
||||||
case EXCAVATION:
|
|
||||||
return SKILLS_EXCAVATION;
|
|
||||||
case FISHING:
|
|
||||||
return SKILLS_FISHING;
|
|
||||||
case HERBALISM:
|
|
||||||
return SKILLS_HERBALISM;
|
|
||||||
case MINING:
|
|
||||||
return SKILLS_MINING;
|
|
||||||
case REPAIR:
|
|
||||||
return SKILLS_REPAIR;
|
|
||||||
case SWORDS:
|
|
||||||
return SKILLS_SWORDS;
|
|
||||||
case TAMING:
|
|
||||||
return SKILLS_TAMING;
|
|
||||||
case UNARMED:
|
|
||||||
return SKILLS_UNARMED;
|
|
||||||
case WOODCUTTING:
|
|
||||||
return SKILLS_WOODCUTTING;
|
|
||||||
default:
|
|
||||||
throw new RuntimeException("Primary Skills only");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int USERNAME = 0;
|
|
||||||
public static int SKILLS_MINING = 1;
|
|
||||||
public static int EXP_MINING = 4;
|
|
||||||
public static int SKILLS_WOODCUTTING = 5;
|
|
||||||
public static int EXP_WOODCUTTING = 6;
|
|
||||||
public static int SKILLS_REPAIR = 7;
|
|
||||||
public static int SKILLS_UNARMED = 8;
|
|
||||||
public static int SKILLS_HERBALISM = 9;
|
|
||||||
public static int SKILLS_EXCAVATION = 10;
|
|
||||||
public static int SKILLS_ARCHERY = 11;
|
|
||||||
public static int SKILLS_SWORDS = 12;
|
|
||||||
public static int SKILLS_AXES = 13;
|
|
||||||
public static int SKILLS_ACROBATICS = 14;
|
|
||||||
public static int EXP_REPAIR = 15;
|
|
||||||
public static int EXP_UNARMED = 16;
|
|
||||||
public static int EXP_HERBALISM = 17;
|
|
||||||
public static int EXP_EXCAVATION = 18;
|
|
||||||
public static int EXP_ARCHERY = 19;
|
|
||||||
public static int EXP_SWORDS = 20;
|
|
||||||
public static int EXP_AXES = 21;
|
|
||||||
public static int EXP_ACROBATICS = 22;
|
|
||||||
public static int SKILLS_TAMING = 24;
|
|
||||||
public static int EXP_TAMING = 25;
|
|
||||||
public static int COOLDOWN_BERSERK = 26;
|
|
||||||
public static int COOLDOWN_GIGA_DRILL_BREAKER = 27;
|
|
||||||
public static int COOLDOWN_TREE_FELLER = 28;
|
|
||||||
public static int COOLDOWN_GREEN_TERRA = 29;
|
|
||||||
public static int COOLDOWN_SERRATED_STRIKES = 30;
|
|
||||||
public static int COOLDOWN_SKULL_SPLITTER = 31;
|
|
||||||
public static int COOLDOWN_SUPER_BREAKER = 32;
|
|
||||||
public static int SKILLS_FISHING = 34;
|
|
||||||
public static int EXP_FISHING = 35;
|
|
||||||
public static int COOLDOWN_BLAST_MINING = 36;
|
|
||||||
public static int LAST_LOGIN = 37;
|
|
||||||
public static int HEALTHBAR = 38;
|
|
||||||
public static int SKILLS_ALCHEMY = 39;
|
|
||||||
public static int EXP_ALCHEMY = 40;
|
|
||||||
public static int UUID_INDEX = 41;
|
|
||||||
public static int SCOREBOARD_TIPS = 42;
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
package com.gmail.nossr50.datatypes.database;
|
||||||
|
|
||||||
|
public enum DatabaseUpdateType {
|
||||||
|
FISHING,
|
||||||
|
BLAST_MINING,
|
||||||
|
INDEX,
|
||||||
|
MOB_HEALTHBARS,
|
||||||
|
PARTY_NAMES,
|
||||||
|
KILL_ORPHANS,
|
||||||
|
DROPPED_SPOUT,
|
||||||
|
ALCHEMY
|
||||||
|
;
|
||||||
|
}
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.gmail.nossr50.datatypes.database;
|
|
||||||
|
|
||||||
public enum UpgradeType {
|
|
||||||
ADD_FISHING,
|
|
||||||
ADD_BLAST_MINING_COOLDOWN,
|
|
||||||
ADD_SQL_INDEXES,
|
|
||||||
ADD_MOB_HEALTHBARS,
|
|
||||||
DROP_SQL_PARTY_NAMES,
|
|
||||||
DROP_SPOUT,
|
|
||||||
ADD_ALCHEMY,
|
|
||||||
ADD_UUIDS,
|
|
||||||
ADD_UUIDS_PARTY,
|
|
||||||
ADD_SCOREBOARD_TIPS,
|
|
||||||
DROP_NAME_UNIQUENESS;
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package com.gmail.nossr50.datatypes.experience;
|
|
||||||
|
|
||||||
import java.util.concurrent.Delayed;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
|
||||||
|
|
||||||
public class SkillXpGain implements Delayed {
|
|
||||||
private final long expiryTime;
|
|
||||||
private final float xp;
|
|
||||||
private final SkillType type;
|
|
||||||
|
|
||||||
public SkillXpGain(SkillType type, float xp) {
|
|
||||||
this.expiryTime = System.currentTimeMillis() + getDuration();
|
|
||||||
this.xp = xp;
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkillType getSkill() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getXp() {
|
|
||||||
return xp;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long getDuration() {
|
|
||||||
return TimeUnit.MINUTES.toMillis(ExperienceConfig.getInstance().getDiminishedReturnsTimeInterval());
|
|
||||||
}
|
|
||||||
|
|
||||||
public int compareTo(SkillXpGain other) {
|
|
||||||
if (this.expiryTime < other.expiryTime) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else if (this.expiryTime > other.expiryTime) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareTo(Delayed other) {
|
|
||||||
if (other instanceof SkillXpGain) {
|
|
||||||
// Use more efficient method if possible (private fields)
|
|
||||||
return this.compareTo((SkillXpGain) other);
|
|
||||||
}
|
|
||||||
return (int) (getDelay(TimeUnit.MILLISECONDS) - other.getDelay(TimeUnit.MILLISECONDS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getDelay(TimeUnit arg0) {
|
|
||||||
return arg0.convert(expiryTime - System.currentTimeMillis(), TimeUnit.MILLISECONDS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user