mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
parent
93d586592e
commit
41da32cd1b
@ -9,6 +9,7 @@ Key:
|
||||
|
||||
Version 1.4.08-dev
|
||||
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||
+ Added config options to disable various sound effects
|
||||
= Fixed bug with toggle commands not properly displaying the success message.
|
||||
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||
|
||||
|
@ -219,6 +219,8 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
public boolean getMatchOfflinePlayers() { return config.getBoolean("Commands.Generic.Match_OfflinePlayers", false); }
|
||||
|
||||
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
||||
|
||||
/* Mob Healthbar */
|
||||
public MobHealthbarType getMobHealthbarDefault() {
|
||||
try {
|
||||
@ -316,6 +318,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getChimaeraCooldown() { return config.getInt("Items.Chimaera_Wing.Cooldown", 240); }
|
||||
public int getChimaeraWarmup() { return config.getInt("Items.Chimaera_Wing.Warmup", 5); }
|
||||
public int getChimaeraRecentlyHurtCooldown() { return config.getInt("Items.Chimaera_Wing.RecentlyHurt_Cooldown", 60); }
|
||||
public boolean getChimaeraSoundEnabled() { return config.getBoolean("Items.Chimaera_Wing.Sound_Enabled", true); }
|
||||
|
||||
/* Particles */
|
||||
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
||||
@ -399,6 +402,8 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
/* Repair */
|
||||
public boolean getRepairAnvilMessagesEnabled() { return config.getBoolean("Skills.Repair.Anvil_Messages", true); }
|
||||
public boolean getRepairAnvilPlaceSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Placed_Sounds", true); }
|
||||
public boolean getRepairAnvilUseSoundsEnabled() { return config.getBoolean("Skills.Repair.Anvil_Use_Sounds", true); }
|
||||
public Material getRepairAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Anvil_Material", "IRON_BLOCK")); }
|
||||
public Material getSalvageAnvilMaterial() { return Material.matchMaterial(config.getString("Skills.Repair.Salvage_Anvil_ID", "GOLD_BLOCK")); }
|
||||
public boolean getSalvageTools() { return config.getBoolean("Skills.Repair.Salvage_tools", true); }
|
||||
@ -420,6 +425,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
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); }
|
||||
|
||||
/* AFK Leveling */
|
||||
public boolean getAcrobaticsPreventAFK() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
|
||||
|
@ -561,7 +561,10 @@ public class McMMOPlayer {
|
||||
return;
|
||||
}
|
||||
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||
if (Config.getInstance().getLevelUpSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString(StringUtils.getCapitalized(skillType.toString()) + ".Skillup", levelsGained, getSkillLevel(skillType)));
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.HiddenConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
@ -32,7 +33,6 @@ import com.gmail.nossr50.runnables.StickyPistonTrackerTask;
|
||||
import com.gmail.nossr50.skills.excavation.ExcavationManager;
|
||||
import com.gmail.nossr50.skills.herbalism.HerbalismManager;
|
||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||
import com.gmail.nossr50.skills.repair.Repair;
|
||||
import com.gmail.nossr50.skills.smelting.SmeltingManager;
|
||||
import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
@ -112,7 +112,7 @@ public class BlockListener implements Listener {
|
||||
mcMMO.getPlaceStore().setTrue(blockState);
|
||||
}
|
||||
|
||||
if (Repair.anvilMessagesEnabled && BlockUtils.isMcMMOAnvil(blockState)) {
|
||||
if (BlockUtils.isMcMMOAnvil(blockState)) {
|
||||
UserManager.getPlayer(player).getRepairManager().placedAnvilCheck(blockState.getType());
|
||||
}
|
||||
}
|
||||
@ -301,7 +301,7 @@ public class BlockListener implements Listener {
|
||||
*
|
||||
* We don't need to check permissions here because they've already been checked for the ability to even activate.
|
||||
*/
|
||||
if (mcMMOPlayer.getAbilityMode(AbilityType.TREE_FELLER) && BlockUtils.isLog(blockState)) {
|
||||
if (mcMMOPlayer.getAbilityMode(AbilityType.TREE_FELLER) && BlockUtils.isLog(blockState) && Config.getInstance().getTreeFellerSoundsEnabled()) {
|
||||
player.playSound(blockState.getLocation(), Sound.FIZZ, Misc.FIZZ_VOLUME, Misc.getFizzPitch());
|
||||
}
|
||||
}
|
||||
|
@ -49,9 +49,14 @@ public class RepairManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendMessage(Repair.getAnvilMessage(anvilType));
|
||||
if (Repair.anvilMessagesEnabled) {
|
||||
player.sendMessage(Repair.getAnvilMessage(anvilType));
|
||||
}
|
||||
|
||||
if (Config.getInstance().getRepairAnvilPlaceSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
togglePlacedAnvil(anvilType);
|
||||
}
|
||||
|
||||
@ -141,7 +146,9 @@ public class RepairManager extends SkillManager {
|
||||
applyXpGain((float) ((getPercentageRepaired(startDurability, newDurability, repairable.getMaximumDurability()) * repairable.getXpMultiplier()) * ExperienceConfig.getInstance().getRepairXPBase() * ExperienceConfig.getInstance().getRepairXP(repairable.getRepairMaterialType())));
|
||||
|
||||
// BWONG BWONG BWONG
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
if (Config.getInstance().getRepairAnvilUseSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
// Repair the item!
|
||||
item.setDurability(newDurability);
|
||||
@ -165,7 +172,10 @@ public class RepairManager extends SkillManager {
|
||||
|
||||
Misc.dropItems(location, new ItemStack(Repair.getRepairAndSalvageItem(item)), Repair.getRepairAndSalvageQuantities(item) * item.getAmount());
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
if (Config.getInstance().getRepairAnvilUseSoundsEnabled()) {
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));
|
||||
}
|
||||
else {
|
||||
|
@ -134,10 +134,15 @@ public final class ChimaeraWing {
|
||||
player.updateInventory();
|
||||
mcMMOPlayer.actualizeChimeraWingLastUse();
|
||||
mcMMOPlayer.setTeleportCommenceLocation(null);
|
||||
|
||||
if (Config.getInstance().getStatsTrackingEnabled()) {
|
||||
MetricsManager.chimeraWingUsed();
|
||||
}
|
||||
player.playSound(location, Sound.BAT_TAKEOFF, Misc.BAT_VOLUME, Misc.BAT_PITCH);
|
||||
|
||||
if (Config.getInstance().getChimaeraSoundEnabled()) {
|
||||
player.playSound(location, Sound.BAT_TAKEOFF, Misc.BAT_VOLUME, Misc.BAT_PITCH);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@ General:
|
||||
Verbose_Logging: false
|
||||
# Should mcMMO over-write configs to update, or make new ones ending in .new?
|
||||
Config_Update_Overwrite: true
|
||||
# Play level-up sounds
|
||||
LevelUp_Sounds: true
|
||||
|
||||
#
|
||||
# Settings for the mcMMO scoreboards
|
||||
@ -170,6 +172,7 @@ Items:
|
||||
Use_Cost: 1
|
||||
Recipe_Cost: 5
|
||||
Item_Name: FEATHER
|
||||
Sound_Enabled: true
|
||||
|
||||
#
|
||||
# Settings for Parties
|
||||
@ -257,6 +260,8 @@ Skills:
|
||||
Repair:
|
||||
Level_Cap: 0
|
||||
Anvil_Messages: true
|
||||
Anvil_Placed_Sounds: true
|
||||
Anvil_Use_Sounds: true
|
||||
Anvil_Material: IRON_BLOCK
|
||||
Salvage_Anvil_Material: GOLD_BLOCK
|
||||
Salvage_tools: true
|
||||
@ -291,6 +296,7 @@ Skills:
|
||||
Block_Cracker:
|
||||
SmoothBrick_To_CrackedBrick: true
|
||||
Woodcutting:
|
||||
Tree_Feller_Sounds: true
|
||||
Level_Cap: 0
|
||||
|
||||
#
|
||||
@ -386,4 +392,4 @@ Particles:
|
||||
# These settings determine if fireworks should get launched when a player levels-up,
|
||||
# this will happen by default for every 100 levels.
|
||||
LevelUp_Enabled: true
|
||||
LevelUp_Tier: 100
|
||||
LevelUp_Tier: 100
|
Loading…
Reference in New Issue
Block a user