public Particles(Main plugin) { super("particles.yml", plugin); this.plugin = plugin; Config pluginConfig = plugin.getBabies(); this.enabled = this.config.getBoolean("Enabled"); this.worldsBlacklist = this.config.getStringList("WorldsBlacklist"); this.command = this.config.getString("Command"); this.noPermissionMessage = this.config.getString("NoPermissionMessage"); this.giveSound = Sound.valueOf(this.config.getString("GiveSound")); this.removeSound = Sound.valueOf(this.config.getString("RemoveSound")); this.updateInterval = this.config.getDouble("UpdateInterval"); this.viewDistance = this.config.getInt("ViewDistance"); this.guiName = this.config.getString("GUIName"); this.guiSize = Parsing.parseInt(this.config.getString("GUISize")); this.noPermissionItem = Methods.getNoPermissionItem(this.config); this.noPermissionItem_Enabled = this.config.getBoolean("NoPermissionItem.Enabled"); this.removeItem = Methods.getGuiItem(this.config, "RemoveItem"); this.homeItem = Methods.getGuiItem(this.config, "HomeItem"); this.previousItem = Methods.getGuiItem(this.config, "PreviousItem"); this.nextItem = Methods.getGuiItem(this.config, "NextItem"); this.particles = getParticlesInternal(); this.maxPage = getMaxPageInternal(); if (pluginConfig.getLoggingLevel() >= 2) General.sendColoredMessage(plugin, "Particles config successfully loaded!", ChatColor.GREEN); }
public void sendFailedSound(Player p) { if (EnderChest.is19Server == true) { p.playSound(p.getLocation(), Sound.BLOCK_NOTE_PLING, 3F, 3F); } else { p.playSound(p.getLocation(), Sound.valueOf("NOTE_PLING"), 3F, 3F); } }
public void sendEnderchestOpenSound(Player p) { if (EnderChest.is19Server == true) { p.playSound(p.getLocation(), Sound.BLOCK_ENDERCHEST_OPEN, 1F, 1F); } else { p.playSound(p.getLocation(), Sound.valueOf("CHEST_OPEN"), 1F, 1F); } }
public void sendCompleteSound(Player p) { if (EnderChest.is19Server == true) { p.playSound(p.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1F, 1F); } else { p.playSound(p.getLocation(), Sound.valueOf("LEVEL_UP"), 1F, 1F); } }
public void sendAnvilLandSound(Player p) { if (EnderChest.is19Server == true) { p.playSound(p.getLocation(), Sound.BLOCK_ANVIL_LAND, 1F, 1F); } else { p.playSound(p.getLocation(), Sound.valueOf("ANVIL_LAND"), 1F, 1F); } }
public static String getSound(String flag) throws CommandException { try { String ret = CraftSound.getSound(Sound.valueOf(flag.toUpperCase())); if (ret == null) throw new CommandException(Messages.INVALID_SOUND); return ret; } catch (Exception e) { throw new CommandException(Messages.INVALID_SOUND); } }