mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Debug for Removing Casting Mode particles.
This commit is contained in:
parent
37220d5a3a
commit
a6b2fa594e
@ -10,40 +10,44 @@ import org.bukkit.Particle;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
public class CastingParticle {
|
||||
private final Consumer<Location> display;
|
||||
private final Consumer<Location> display;
|
||||
|
||||
public CastingParticle(ConfigurationSection config) {
|
||||
Validate.notNull(config, "Casting particle config cannot be null");
|
||||
public CastingParticle(ConfigurationSection config) {
|
||||
Validate.notNull(config, "Casting particle config cannot be null");
|
||||
|
||||
String format = config.getString("particle");
|
||||
Validate.notNull(format, "Could not read particle name");
|
||||
Particle particle = Particle.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
String format = config.getString("particle");
|
||||
Validate.notNull(format, "Could not read particle name");
|
||||
Particle particle = Particle.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
|
||||
if (config.contains("color")) {
|
||||
final float size = (float) config.getDouble("size") == 0 ? 1 : (float) Math.max(config.getDouble("size"), 0);
|
||||
Color color = Color.fromRGB(config.getInt("color.red"), config.getInt("color.green"), config.getInt("color.blue"));
|
||||
if (config.contains("color")) {
|
||||
final float size = (float) config.getDouble("size") == 0 ? 1 : (float) Math.max(config.getDouble("size"), 0);
|
||||
Color color = Color.fromRGB(config.getInt("color.red"), config.getInt("color.green"), config.getInt("color.blue"));
|
||||
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size));
|
||||
return;
|
||||
}
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size));
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.contains("material")) {
|
||||
format = config.getString("material");
|
||||
Validate.notNull(format, "Could not read material name");
|
||||
Material material = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
if (config.contains("material")) {
|
||||
format = config.getString("material");
|
||||
Validate.notNull(format, "Could not read material name");
|
||||
Material material = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
if (material == Material.DIRT && particle == Particle.SUSPENDED)
|
||||
display = (loc) -> {
|
||||
return;
|
||||
};
|
||||
else
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, material.createBlockData());
|
||||
return;
|
||||
}
|
||||
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, material.createBlockData());
|
||||
return;
|
||||
}
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
}
|
||||
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
}
|
||||
|
||||
public CastingParticle(Particle particle) {
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
}
|
||||
public CastingParticle(Particle particle) {
|
||||
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 0);
|
||||
}
|
||||
|
||||
public void display(Location loc) {
|
||||
display.accept(loc);
|
||||
}
|
||||
public void display(Location loc) {
|
||||
display.accept(loc);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import java.util.logging.Level;
|
||||
public class ConfigManager {
|
||||
public final CommandVerbose commandVerbose = new CommandVerbose();
|
||||
|
||||
public boolean overrideVanillaExp, canCreativeCast, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo, splitProfessionExp, questBossBar;
|
||||
public boolean overrideVanillaExp, canCreativeCast, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo, splitProfessionExp, disableQuestBossBar;
|
||||
public String partyChatPrefix, noSkillBoundPlaceholder;
|
||||
public ChatColor staminaFull, staminaHalf, staminaEmpty;
|
||||
public long combatLogTimer, lootChestExpireTime, lootChestPlayerCooldown, globalSkillCooldown;
|
||||
@ -109,7 +109,7 @@ public class ConfigManager {
|
||||
fishingDropsChanceWeight = MMOCore.plugin.getConfig().getDouble("chance-stat-weight.fishing-drops");
|
||||
maxPartyLevelDifference = MMOCore.plugin.getConfig().getInt("party.max-level-difference");
|
||||
splitProfessionExp = MMOCore.plugin.getConfig().getBoolean("party.profession-exp-split");
|
||||
questBossBar = MMOCore.plugin.getConfig().getBoolean("mmocore-quests.disable-boss-bar");
|
||||
disableQuestBossBar = MMOCore.plugin.getConfig().getBoolean("mmocore-quests.disable-boss-bar");
|
||||
|
||||
staminaFull = getColorOrDefault("stamina-whole", ChatColor.GREEN);
|
||||
staminaHalf = getColorOrDefault("stamina-half", ChatColor.DARK_GREEN);
|
||||
|
Loading…
Reference in New Issue
Block a user