mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 05:04:43 +02:00
Resolving merge conflict.
This commit is contained in:
@ -1,14 +1,18 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.commands.SkillCommand;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.gathering.Fishing;
|
||||
|
||||
public class FishingCommand extends SkillCommand {
|
||||
|
||||
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||
|
||||
private int lootTier;
|
||||
private String magicChance;
|
||||
private int shakeUnlockLevel;
|
||||
private String shakeChance;
|
||||
private String fishermansDietRank;
|
||||
|
||||
@ -24,7 +28,7 @@ public class FishingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
lootTier = Fishing.getFishingLootTier(profile);
|
||||
magicChance = percent.format((float) lootTier / 15);
|
||||
magicChance = percent.format((float) lootTier / 15);
|
||||
int dropChance = Fishing.getShakeChance(lootTier);
|
||||
if (player.hasPermission("mcmmo.perks.lucky.fishing")) {
|
||||
dropChance = (int) (dropChance * 1.25);
|
||||
@ -45,7 +49,8 @@ public class FishingCommand extends SkillCommand {
|
||||
}
|
||||
else {
|
||||
fishermansDietRank = "1";
|
||||
}
|
||||
}
|
||||
shakeUnlockLevel = advancedConfig.getShakeUnlockLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -96,8 +101,8 @@ public class FishingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canShake) {
|
||||
if (skillValue < 150) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Fishing.Ability.Locked.0") }));
|
||||
if (skillValue < advancedConfig.getShakeUnlockLevel()) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Fishing.Ability.Locked.0", new Object[] { shakeUnlockLevel }) }));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }));
|
||||
|
Reference in New Issue
Block a user