Skip to content

Commit 426ac90

Browse files
committed
Upload Voice Plugin
0 parents  commit 426ac90

5 files changed

Lines changed: 117 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Voice
2+
The most basic Voice Channel plugin for CheatBreaker.
3+
4+
##What does this do?
5+
This does the exact same thing as the "voice.protocol.rip" server, which is to make a voice channel of which everyone joins when they join the server and which everyone leaves when they leave the server.
6+
7+
##What Client does this work with?
8+
This works with any CheatBreaker with a voice chat server, This was created for use with Protocol's CheatBreaker but can be used for any.
9+
10+
##Compiling
11+
Simply replace the sourspigot dependency with your own spigot (server) and it will work, I am providing the Offical CheatBreakerAPI however you can use a custom one as long as it has Voice Chat in it.

lib/CheatBreakerAPI.jar

1.45 MB
Binary file not shown.

pom.xml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>me.kaboomb52</groupId>
8+
<artifactId>Voice</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>8</maven.compiler.source>
13+
<maven.compiler.target>8</maven.compiler.target>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
16+
</properties>
17+
18+
<build>
19+
<plugins>
20+
<plugin>
21+
<groupId>org.apache.maven.plugins</groupId>
22+
<artifactId>maven-compiler-plugin</artifactId>
23+
<version>3.5.1</version>
24+
<configuration>
25+
<source>1.8</source>
26+
<target>1.8</target>
27+
<annotationProcessorPaths>
28+
<path>
29+
<groupId>org.projectlombok</groupId>
30+
<artifactId>lombok</artifactId>
31+
<version>1.16.16</version>
32+
</path>
33+
</annotationProcessorPaths>
34+
</configuration>
35+
</plugin>
36+
</plugins>
37+
</build>
38+
39+
<repositories>
40+
<repository>
41+
<id>bukkit-repo</id>
42+
<url>https://maven.sk89q.com/artifactory/repo</url>
43+
</repository>
44+
</repositories>
45+
46+
<dependencies>
47+
48+
<!-- Offical CheatBreakerAPI, can be changed to any api with voice chat functionallity -->
49+
50+
<dependency>
51+
<groupId>com.cheatbreaker</groupId>
52+
<artifactId>CheatBreakerAPI</artifactId>
53+
<version>1.0-SNAPSHOT</version>
54+
<scope>system</scope>
55+
<systemPath>${project.basedir}/lib/CheatBreakerAPI.jar</systemPath>
56+
</dependency>
57+
58+
<!-- Using a custom spigot fork for a server jar, you must change it for this to work -->
59+
60+
<dependency>
61+
<groupId>net.frozenorb</groupId>
62+
<artifactId>sourspigot-server</artifactId>
63+
<version>1.7.10-R0.1-SNAPSHOT</version>
64+
</dependency>
65+
</dependencies>
66+
67+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package me.kaboomb52.voice;
2+
3+
import com.cheatbreaker.api.CheatBreakerAPI;
4+
import com.cheatbreaker.api.voice.VoiceChannel;
5+
import org.bukkit.event.EventHandler;
6+
import org.bukkit.event.Listener;
7+
import org.bukkit.event.player.PlayerJoinEvent;
8+
import org.bukkit.event.player.PlayerQuitEvent;
9+
import org.bukkit.plugin.java.JavaPlugin;
10+
11+
12+
public class Voice extends JavaPlugin {
13+
public void onEnable(){
14+
CheatBreakerAPI.getInstance().voiceEnabled(true);
15+
final VoiceChannel publicVoiceChannel = new VoiceChannel("Voice");
16+
17+
getServer().getPluginManager().registerEvents(
18+
new Listener() {
19+
20+
@EventHandler
21+
public void onPlayerJoin(PlayerJoinEvent event) {
22+
23+
publicVoiceChannel.addPlayer(event.getPlayer());
24+
CheatBreakerAPI.getInstance().setActiveChannel(event.getPlayer(), publicVoiceChannel);
25+
26+
}
27+
28+
@EventHandler
29+
public void onPlayerLeave(PlayerQuitEvent event){
30+
publicVoiceChannel.removePlayer(event.getPlayer());}
31+
32+
}, this
33+
);
34+
}
35+
}

src/main/resources/plugin.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: Voice
2+
version: 1.0
3+
author: KaboomB52
4+
main: me.kaboomb52.voice.Voice

0 commit comments

Comments
 (0)