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

View File

@ -29,7 +29,15 @@ public class BCommand_Sender_Reciver {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); 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;
}
}
} }
} }