Skip to content

Commit

Permalink
Merge pull request #85 from MultiChat/localrefactor
Browse files Browse the repository at this point in the history
Complete Refactor of MultiChatSpigot and MultiChatSponge to MultiChatLocal
  • Loading branch information
OllieMartin authored May 2, 2020
2 parents b50fa36 + 55cda38 commit 77ce8e5
Show file tree
Hide file tree
Showing 217 changed files with 8,055 additions and 7,203 deletions.
74 changes: 64 additions & 10 deletions multichat/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.7.4</version>
<version>1.9-snapshot.20.5.1</version>
<build>
<plugins>
<plugin>
Expand All @@ -20,8 +20,8 @@
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>xyz.olivermartin.bungee</shadedPattern>
<pattern>com.zaxxer.hikari</pattern>
<shadedPattern>xyz.olivermartin.shadedlib.hikari</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down Expand Up @@ -67,12 +67,22 @@
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.27.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.1.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>error_prone_annotations</artifactId>
<groupId>com.google.errorprone</groupId>
Expand Down Expand Up @@ -134,7 +144,7 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.14-SNAPSHOT</version>
<version>1.15-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -153,12 +163,24 @@
<artifactId>bungeecord-protocol</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>netty-transport-native-unix-common</artifactId>
<groupId>io.netty</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.14-SNAPSHOT</version>
<version>1.15-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -178,22 +200,30 @@
<artifactId>bungeecord-protocol</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>netty-transport-native-unix-common</artifactId>
<groupId>io.netty</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.2-R0.1-SNAPSHOT</version>
<version>1.15.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>gson</artifactId>
<groupId>com.google.code.gson</groupId>
Expand All @@ -202,6 +232,14 @@
<artifactId>bungeecord-chat</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -222,6 +260,22 @@
<version>2.9.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.rojo8399</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>master-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>reflections</artifactId>
<groupId>org.reflections</groupId>
</exclusion>
<exclusion>
<artifactId>configurate-hocon</artifactId>
<groupId>ninja.leaping.configurate</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

41 changes: 29 additions & 12 deletions multichat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.8.1</version>
<version>1.9-snapshot.20.5.1</version>

<repositories>

Expand Down Expand Up @@ -48,11 +48,27 @@

<build>
<plugins>
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version> <configuration> <relocations> <relocation> <pattern>org.bstats</pattern>
<shadedPattern>xyz.olivermartin.bungee</shadedPattern> </relocation> </relocations>
</configuration> <executions> <execution> <phase>package</phase> <goals>
<goal>shade</goal> </goals> </execution> </executions> </plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<relocations>
<relocation>
<pattern>com.zaxxer.hikari</pattern>
<shadedPattern>xyz.olivermartin.shadedlib.hikari</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -68,17 +84,17 @@

<dependencies>

<!-- <dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bungeecord</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency> -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.6.1</version>
</dependency>

<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.27.2.1</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -129,6 +145,7 @@
<groupId>com.github.rojo8399</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>master-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

</dependencies>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-beta.1.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-beta.2.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-beta.3.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-pre.1.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-pre.2.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-pre.3.jar
Binary file not shown.
Binary file added multichat/releases/1.9/multichat-1.9-pre.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.ObjectOutputStream;
import java.util.Optional;
import java.util.UUID;
import java.util.regex.PatternSyntaxException;

import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ServerInfo;
Expand Down Expand Up @@ -166,9 +167,6 @@ public static void sendPlayerChannelMessage(String playerName, String channel, C
oout.writeBoolean(channelObject.isWhitelistMembers());
oout.writeObject(channelObject.getMembers());




} catch (IOException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -199,6 +197,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:chat")) {

ev.setCancelled(true);

DebugManager.log("{multichat:chat} Got a plugin message");

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
Expand All @@ -221,7 +221,7 @@ public static void onPluginMessage(PluginMessageEvent ev) {
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(uuid);

if (player == null) {
DebugManager.log("{multichat:chat} Could not get player! Abandoning chat message...");
DebugManager.log("{multichat:chat} Could not get player! Abandoning chat message... (Is IP-Forwarding on?)");
return;
}

Expand All @@ -246,6 +246,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:nick")) {

ev.setCancelled(true);

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
DataInputStream in = new DataInputStream(stream);

Expand Down Expand Up @@ -284,6 +286,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:prefix")) {

ev.setCancelled(true);

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
DataInputStream in = new DataInputStream(stream);

Expand Down Expand Up @@ -322,6 +326,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:suffix")) {

ev.setCancelled(true);

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
DataInputStream in = new DataInputStream(stream);

Expand Down Expand Up @@ -360,6 +366,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:dn")) {

ev.setCancelled(true);

DebugManager.log("[multichat:dn] Got an incoming channel message!");

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
Expand Down Expand Up @@ -400,6 +408,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:world")) {

ev.setCancelled(true);

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
DataInputStream in = new DataInputStream(stream);

Expand Down Expand Up @@ -444,6 +454,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:pxe")) {

ev.setCancelled(true);

DebugManager.log("[multichat:pxe] Got an incoming pexecute message!");

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
Expand All @@ -463,6 +475,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

if (ev.getTag().equals("multichat:ppxe")) {

ev.setCancelled(true);

DebugManager.log("[multichat:ppxe] Got an incoming pexecute message (for a player)!");

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
Expand All @@ -488,6 +502,8 @@ public static void onPluginMessage(PluginMessageEvent ev) {

} catch (IOException e) {
e.printStackTrace();
} catch (PatternSyntaxException e2) {
MessageManager.sendMessage(ProxyServer.getInstance().getConsole(), "command_execute_regex");
}

}
Expand Down
Loading

0 comments on commit 77ce8e5

Please sign in to comment.