Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
abf0676
Added an empty database manager class to spigot
OllieMartin Apr 4, 2019
f942646
SQLite is now a maven dependency
OllieMartin Apr 4, 2019
939e242
Merge branch 'master' of https://github.com/MultiChat/Development.git
OllieMartin Apr 4, 2019
d827400
Generic database manager work
OllieMartin Apr 4, 2019
4e61e45
More setup stuff for databases in 1.8
OllieMartin Apr 4, 2019
499148f
Implemented changeable nickname max length in spigot
OllieMartin Apr 5, 2019
0b6f38a
Merge pull request #48 from MultiChat/nicknames
OllieMartin Apr 5, 2019
c045c36
Made all channel lengths compatible with 1.7
OllieMartin Apr 5, 2019
c000680
Added bstats metrics
OllieMartin Apr 6, 2019
9cf408b
added other generated pom
OllieMartin Apr 6, 2019
987bedc
Merge branch 'database' into bstats
OllieMartin Apr 6, 2019
9116254
Merge pull request #49 from MultiChat/bstats
OllieMartin Apr 6, 2019
ef17645
Attempt to fetch spigot and sponge displaynames to bungeecord
OllieMartin Apr 7, 2019
290bf4a
More debug messages for display name channel
OllieMartin Apr 7, 2019
79a9522
Fixed error getting the correct spigot display names
OllieMartin Apr 7, 2019
c15e8b1
Stopped multichat:dn messages being ignored
OllieMartin Apr 7, 2019
5986fec
Merge pull request #50 from MultiChat/displayname
OllieMartin Apr 7, 2019
1869391
Updated POM to 1.14
OllieMartin May 28, 2019
ebedd5a
Fixed the server name issue introduced in 1.14
OllieMartin May 28, 2019
a4c5be4
Removed unecessary import
OllieMartin May 28, 2019
c267dae
MultiChat 1.7.4 Release with BStats Metrics
OllieMartin Aug 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 227 additions & 0 deletions multichat/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.7.4</version>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>xyz.olivermartin.bungee</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>
<repository>
<id>sponge</id>
<url>http://repo.spongepowered.org/maven</url>
</repository>
<repository>
<id>bungeecord-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.1.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>error_prone_annotations</artifactId>
<groupId>com.google.errorprone</groupId>
</exclusion>
<exclusion>
<artifactId>gson</artifactId>
<groupId>com.google.code.gson</groupId>
</exclusion>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>guice</artifactId>
<groupId>com.google.inject</groupId>
</exclusion>
<exclusion>
<artifactId>caffeine</artifactId>
<groupId>com.github.ben-manes.caffeine</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.github.ben-manes.caffeine</groupId>
</exclusion>
<exclusion>
<artifactId>plugin-meta</artifactId>
<groupId>org.spongepowered</groupId>
</exclusion>
<exclusion>
<artifactId>configurate-hocon</artifactId>
<groupId>org.spongepowered</groupId>
</exclusion>
<exclusion>
<artifactId>configurate-gson</artifactId>
<groupId>org.spongepowered</groupId>
</exclusion>
<exclusion>
<artifactId>configurate-yaml</artifactId>
<groupId>org.spongepowered</groupId>
</exclusion>
<exclusion>
<artifactId>flow-math</artifactId>
<groupId>com.flowpowered</groupId>
</exclusion>
<exclusion>
<artifactId>flow-noise</artifactId>
<groupId>com.flowpowered</groupId>
</exclusion>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.14-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>bungeecord-chat</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-config</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-event</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-protocol</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.14-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>bungeecord-chat</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-config</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-event</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-protocol</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.2-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>
</exclusion>
<exclusion>
<artifactId>bungeecord-chat</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.6</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>org.bukkit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.9.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

32 changes: 28 additions & 4 deletions multichat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@

<groupId>xyz.olivermartin.multichat</groupId>
<artifactId>multichat</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>

<repositories>

<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>

<repository>
<id>sponge</id>
<url>http://repo.spongepowered.org/maven</url>
Expand Down Expand Up @@ -43,6 +48,12 @@

<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-compiler-plugin</artifactId>
Expand All @@ -57,6 +68,19 @@

<dependencies>

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

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

<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
Expand All @@ -67,23 +91,23 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.13-SNAPSHOT</version>
<version>1.14-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.13-SNAPSHOT</version>
<version>1.14-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.1-R0.1-SNAPSHOT</version>
<version>1.14.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Expand Down
Binary file added multichat/releases/1.7.4/multichat-1.7.4.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static void sendCommandMessage(String command, ServerInfo server) {
e.printStackTrace();
}

server.sendData("multichat:action", stream.toByteArray());
server.sendData("multichat:act", stream.toByteArray());

}

Expand All @@ -107,7 +107,7 @@ public static void sendPlayerCommandMessage(String command, String playerRegex,
e.printStackTrace();
}

server.sendData("multichat:paction", stream.toByteArray());
server.sendData("multichat:pact", stream.toByteArray());

}

Expand Down Expand Up @@ -173,16 +173,16 @@ public static void sendPlayerChannelMessage(String playerName, String channel, C
e.printStackTrace();
}

server.sendData("multichat:channel", stream.toByteArray());
server.sendData("multichat:ch", stream.toByteArray());

DebugManager.log("Sent message on multichat:channel channel!");
DebugManager.log("Sent message on multichat:ch channel!");

}

@EventHandler
public static void onPluginMessage(PluginMessageEvent ev) {

if (! (ev.getTag().equals("multichat:comm") || ev.getTag().equals("multichat:chat") || ev.getTag().equals("multichat:prefix") || ev.getTag().equals("multichat:suffix") || ev.getTag().equals("multichat:world") || ev.getTag().equals("multichat:nick")) ) {
if (! (ev.getTag().equals("multichat:comm") || ev.getTag().equals("multichat:chat") || ev.getTag().equals("multichat:prefix") || ev.getTag().equals("multichat:suffix") || ev.getTag().equals("multichat:dn") || ev.getTag().equals("multichat:world") || ev.getTag().equals("multichat:nick")) ) {
return;
}

Expand Down Expand Up @@ -358,6 +358,46 @@ public static void onPluginMessage(PluginMessageEvent ev) {

}

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

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

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

try {

UUID uuid = UUID.fromString(in.readUTF());
String spigotDisplayName = in.readUTF();
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(uuid);

if (player == null) return;

synchronized (player) {

DebugManager.log("[multichat:dn] Player exists!");

Optional<PlayerMeta> opm = PlayerMetaManager.getInstance().getPlayer(uuid);

if (opm.isPresent()) {

DebugManager.log("[multichat:dn] Player meta exists!");

DebugManager.log("[multichat:dn] The displayname received is: " + spigotDisplayName);

opm.get().spigotDisplayName = spigotDisplayName;
PlayerMetaManager.getInstance().updateDisplayName(uuid);

}

}

} catch (IOException e) {
e.printStackTrace();
}

}

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

ByteArrayInputStream stream = new ByteArrayInputStream(ev.getData());
Expand Down
Loading