Vom Bra muss der Benzer
This commit is contained in:
parent
e2bd886eb9
commit
054d967b70
3 changed files with 51 additions and 1 deletions
|
|
@ -103,7 +103,8 @@ public class Hadder {
|
||||||
new StopCommand(),
|
new StopCommand(),
|
||||||
new BlacklistCommand(),
|
new BlacklistCommand(),
|
||||||
new PauseCommand(),
|
new PauseCommand(),
|
||||||
new LoopCommand()), config, helpCommand);
|
new LoopCommand(),
|
||||||
|
new BassCommand()), config, helpCommand);
|
||||||
|
|
||||||
builder.addEventListeners(
|
builder.addEventListeners(
|
||||||
new MentionListener(rethink),
|
new MentionListener(rethink),
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ public class AudioManager {
|
||||||
|
|
||||||
public AudioManager() {
|
public AudioManager() {
|
||||||
AudioSourceManagers.registerRemoteSources(myManager);
|
AudioSourceManagers.registerRemoteSources(myManager);
|
||||||
|
myManager.getConfiguration().setFilterHotSwapEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPlayer(Guild guild) {
|
public boolean hasPlayer(Guild guild) {
|
||||||
|
|
|
||||||
48
src/main/java/com/bbn/hadder/commands/music/BassCommand.java
Normal file
48
src/main/java/com/bbn/hadder/commands/music/BassCommand.java
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* @author Hax / Hax6775 / Schlauer_Hax
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.bbn.hadder.commands.music;
|
||||||
|
|
||||||
|
import com.bbn.hadder.commands.Command;
|
||||||
|
import com.bbn.hadder.commands.CommandEvent;
|
||||||
|
import com.sedmelluq.discord.lavaplayer.filter.equalizer.EqualizerFactory;
|
||||||
|
|
||||||
|
public class BassCommand implements Command {
|
||||||
|
private static final float[] BASS_BOOST = { 0.2f, 0.15f, 0.1f, 0.05f, 0.0f, -0.05f, -0.1f, -0.1f, -0.1f, -0.1f, -0.1f,
|
||||||
|
-0.1f, -0.1f, -0.1f, -0.1f };
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void executed(String[] args, CommandEvent event) {
|
||||||
|
if (args.length==1) {
|
||||||
|
float value = Float.parseFloat(args[0]);
|
||||||
|
EqualizerFactory equalizer = new EqualizerFactory();
|
||||||
|
for (int i = 0; i < BASS_BOOST.length; i++) {
|
||||||
|
equalizer.setGain(i, BASS_BOOST[i] + value);
|
||||||
|
}
|
||||||
|
event.getAudioManager().getPlayer(event.getGuild()).setFrameBufferDuration(500);
|
||||||
|
event.getAudioManager().getPlayer(event.getGuild()).setFilterFactory(equalizer);
|
||||||
|
event.getTextChannel().sendMessage("Bruh, set dae bass").queue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] labels() {
|
||||||
|
return new String[]{"bass"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String description() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String usage() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String example() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue