mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
commit
2d3d11ec2d
@ -533,4 +533,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* 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); }
|
||||||
|
|
||||||
|
public float getMasterVolume() { return (float) config.getDouble("Sounds.MasterVolume", 1.0); }
|
||||||
}
|
}
|
||||||
|
@ -50,13 +50,21 @@ public class HerbalismManager extends SkillManager {
|
|||||||
|
|
||||||
public boolean canGreenThumbBlock(BlockState blockState) {
|
public boolean canGreenThumbBlock(BlockState blockState) {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
|
ItemStack item = player.getInventory().getItemInMainHand();
|
||||||
|
|
||||||
return player.getItemInHand().getType() == Material.SEEDS && BlockUtils.canMakeMossy(blockState) && Permissions.greenThumbBlock(player, blockState.getType());
|
if (item.getAmount() <= 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return item.getType() == Material.SEEDS && BlockUtils.canMakeMossy(blockState) && Permissions.greenThumbBlock(player, blockState.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUseShroomThumb(BlockState blockState) {
|
public boolean canUseShroomThumb(BlockState blockState) {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
Material itemType = player.getItemInHand().getType();
|
ItemStack item = player.getInventory().getItemInMainHand();
|
||||||
|
Material itemType = item.getType();
|
||||||
|
|
||||||
|
if (item.getAmount() <= 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
return (itemType == Material.RED_MUSHROOM || itemType == Material.BROWN_MUSHROOM) && BlockUtils.canMakeShroomy(blockState) && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);
|
return (itemType == Material.RED_MUSHROOM || itemType == Material.BROWN_MUSHROOM) && BlockUtils.canMakeShroomy(blockState) && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.SHROOM_THUMB);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,11 @@ public final class BlockUtils {
|
|||||||
case ENCHANTMENT_TABLE:
|
case ENCHANTMENT_TABLE:
|
||||||
case ENDER_CHEST:
|
case ENDER_CHEST:
|
||||||
case FENCE_GATE:
|
case FENCE_GATE:
|
||||||
|
case ACACIA_FENCE_GATE:
|
||||||
|
case DARK_OAK_FENCE_GATE:
|
||||||
|
case SPRUCE_FENCE_GATE:
|
||||||
|
case BIRCH_FENCE_GATE:
|
||||||
|
case JUNGLE_FENCE_GATE:
|
||||||
case FURNACE:
|
case FURNACE:
|
||||||
case IRON_DOOR_BLOCK:
|
case IRON_DOOR_BLOCK:
|
||||||
case JUKEBOX:
|
case JUKEBOX:
|
||||||
@ -70,10 +75,12 @@ public final class BlockUtils {
|
|||||||
case BIRCH_DOOR:
|
case BIRCH_DOOR:
|
||||||
case JUNGLE_DOOR:
|
case JUNGLE_DOOR:
|
||||||
case DARK_OAK_DOOR:
|
case DARK_OAK_DOOR:
|
||||||
|
case FENCE:
|
||||||
case ACACIA_FENCE:
|
case ACACIA_FENCE:
|
||||||
case DARK_OAK_FENCE:
|
case DARK_OAK_FENCE:
|
||||||
case BIRCH_FENCE:
|
case BIRCH_FENCE:
|
||||||
case JUNGLE_FENCE:
|
case JUNGLE_FENCE:
|
||||||
|
case SPRUCE_FENCE:
|
||||||
case ARMOR_STAND:
|
case ARMOR_STAND:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.events.items.McMMOItemSpawnEvent;
|
import com.gmail.nossr50.events.items.McMMOItemSpawnEvent;
|
||||||
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
|
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@ -30,14 +31,14 @@ public final class Misc {
|
|||||||
|
|
||||||
// Sound Pitches & Volumes from CB
|
// Sound Pitches & Volumes from CB
|
||||||
public static final float ANVIL_USE_PITCH = 0.3F; // Not in CB directly, I went off the place sound values
|
public static final float ANVIL_USE_PITCH = 0.3F; // Not in CB directly, I went off the place sound values
|
||||||
public static final float ANVIL_USE_VOLUME = 1.0F; // Not in CB directly, I went off the place sound values
|
public static final float ANVIL_USE_VOLUME = 1.0F * Config.getInstance().getMasterVolume(); // Not in CB directly, I went off the place sound values
|
||||||
public static final float FIZZ_VOLUME = 0.5F;
|
public static final float FIZZ_VOLUME = 0.5F * Config.getInstance().getMasterVolume();
|
||||||
public static final float POP_VOLUME = 0.2F;
|
public static final float POP_VOLUME = 0.2F * Config.getInstance().getMasterVolume();
|
||||||
public static final float BAT_VOLUME = 1.0F;
|
public static final float BAT_VOLUME = 1.0F * Config.getInstance().getMasterVolume();
|
||||||
public static final float BAT_PITCH = 0.6F;
|
public static final float BAT_PITCH = 0.6F;
|
||||||
public static final float GHAST_VOLUME = 1.0F;
|
public static final float GHAST_VOLUME = 1.0F * Config.getInstance().getMasterVolume();
|
||||||
public static final float LEVELUP_PITCH = 0.5F; // Reduced to differentiate between vanilla level-up
|
public static final float LEVELUP_PITCH = 0.5F; // Reduced to differentiate between vanilla level-up
|
||||||
public static final float LEVELUP_VOLUME = 0.75F; // Use max volume always
|
public static final float LEVELUP_VOLUME = 0.75F * Config.getInstance().getMasterVolume(); // Use max volume always
|
||||||
|
|
||||||
public static final Set<String> modNames = ImmutableSet.of("LOTR", "BUILDCRAFT", "ENDERIO", "ENHANCEDBIOMES", "IC2", "METALLURGY", "FORESTRY", "GALACTICRAFT", "RAILCRAFT", "TWILIGHTFOREST", "THAUMCRAFT", "GRAVESTONEMOD", "GROWTHCRAFT", "ARCTICMOBS", "DEMONMOBS", "INFERNOMOBS", "SWAMPMOBS", "MARICULTURE", "MINESTRAPPOLATION");
|
public static final Set<String> modNames = ImmutableSet.of("LOTR", "BUILDCRAFT", "ENDERIO", "ENHANCEDBIOMES", "IC2", "METALLURGY", "FORESTRY", "GALACTICRAFT", "RAILCRAFT", "TWILIGHTFOREST", "THAUMCRAFT", "GRAVESTONEMOD", "GROWTHCRAFT", "ARCTICMOBS", "DEMONMOBS", "INFERNOMOBS", "SWAMPMOBS", "MARICULTURE", "MINESTRAPPOLATION");
|
||||||
|
|
||||||
|
@ -502,3 +502,10 @@ Particles:
|
|||||||
# this will happen by default for every 100 levels.
|
# this will happen by default for every 100 levels.
|
||||||
LevelUp_Enabled: true
|
LevelUp_Enabled: true
|
||||||
LevelUp_Tier: 100
|
LevelUp_Tier: 100
|
||||||
|
#
|
||||||
|
# Settings for sounds
|
||||||
|
###
|
||||||
|
Sounds:
|
||||||
|
# This setting controls the master volume. 1.0 is Max, 0 would be off
|
||||||
|
MasterVolume: 1.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user