Bugfix Plugin Messaging Channel

This commit is contained in:
Jkobs 2022-01-27 00:58:22 +01:00
parent 051a858658
commit 87dd68d7cd
2 changed files with 21 additions and 13 deletions

20
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>Alias</artifactId>
<version>1.0.6-Snapshot</version>
<version>1.0.6-Snapshot-2</version>
<packaging>jar</packaging>
<name>T2C-Alias</name>
@ -56,16 +56,21 @@
<repositories>
<repository>
<id>Builders-Paradise</id>
<url>https://dojagames.net:8081/repository/Builders-Paradise/</url>
<id>T2Code</id>
<url>https://repo.t2code.net/repository/T2Code/</url>
</repository>
<repository>
<id>T2Code</id>
<url>https://dojagames.net:8081/repository/T2Code/</url>
<id>Builders-Paradise</id>
<url>https://repo.t2code.net/repository/Builders-Paradise/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>10.8</version>
</dependency>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>bungee</artifactId>
@ -76,11 +81,6 @@
<artifactId>PlugmanGUI</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>7.4</version>
</dependency>
<dependency>
<groupId>net.t2code.minecraft.1_18.r1</groupId>
<artifactId>spigot</artifactId>

View File

@ -29,7 +29,15 @@ public class BCommand_Sender_Reciver {
} catch (IOException e) {
e.printStackTrace();
}
Bukkit.getServer().sendPluginMessage(Main.plugin, "t2codealias:bungee", stream.toByteArray());
if (sender instanceof Player) {
Player player = (Player) sender;
player.sendPluginMessage(Main.plugin, "t2codealias:bungee", stream.toByteArray());
}else {
for(Player player : Bukkit.getOnlinePlayers()){
player.sendPluginMessage(Main.plugin, "t2codealias:bungee", stream.toByteArray());
return;
}
}
}
}