Skip to content

Commit

Permalink
Version 1.0.5
Browse files Browse the repository at this point in the history
Added So Many Features.
  • Loading branch information
Mehran1022mm committed Jun 26, 2023
1 parent 36a9329 commit 0ad6c4e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public boolean onCommand(@NotNull CommandSender sender, Command command, @NotNul
BossBar Bossbar = Bukkit.createBossBar(BossbarString, BarColor.RED, BarStyle.SOLID);
Bossbar.setProgress(1.0);
Bukkit.broadcastMessage(Common.Color(ConfigManager.PREFIX + EventDesc));

Common.SendMessageToBungee(ConfigManager.PREFIX + EventDesc);
for (Player P : Bukkit.getOnlinePlayers()) {
Bossbar.addPlayer(P);
P.sendTitle(Common.Color(ConfigManager.TITLE), Common.Color(ConfigManager.SUBTITLE), ConfigManager.FADEIN, ConfigManager.STAY, ConfigManager.FADEOUT);
Expand Down
67 changes: 0 additions & 67 deletions src/main/java/ir/Mehran1022/EventCore/Commands/TabCompleter.java

This file was deleted.

98 changes: 0 additions & 98 deletions src/main/java/ir/Mehran1022/EventCore/Configuration.java

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/java/ir/Mehran1022/EventCore/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ private void LoadThings () {
Common.RegisterCommand("event", new EventCommand());
Common.RegisterEvent(new InventoryClickListener(), this);
Common.RegisterTabCompleter(new EventCommand(), "event");
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
getServer().getMessenger().registerOutgoingPluginChannel(this, "EventCore");
getServer().getMessenger().registerOutgoingPluginChannel(this, "EventCoreMessage");
EconomyPluginFound = setupEconomy();
UpdateManager UM = new UpdateManager(); UM.Start();
Metrics Metrics = new Metrics(this, 18612);
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/ir/Mehran1022/EventCore/Utils/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,23 @@ public static void SendToAnotherServer (Player Player, String ServerName) {
DataOutputStream out = new DataOutputStream(b);
out.writeUTF("Connect");
out.writeUTF(ServerName);
Player.sendPluginMessage(Main.getInstance(), "BungeeCord", b.toByteArray());
Player.sendPluginMessage(Main.getInstance(), "EventCore", b.toByteArray());
b.close();
out.close();
} catch (Exception e) {
Common.SendMessage(Player, "&cError When Trying To Send You To " + ServerName);
e.printStackTrace();
}
}
public static void SendMessageToBungee (String Message) {
try {
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
out.writeUTF(Color(Message));
Bukkit.getServer().sendPluginMessage(Main.getInstance(), "EventCoreMessage", b.toByteArray());
} catch (Exception e) {
Common.Log("&cError When Trying To Send Message To Bungee");
e.printStackTrace();
}
}
public static void Confirmation (Player Player, String Message, String Command) {
Expand Down

0 comments on commit 0ad6c4e

Please sign in to comment.