Compare commits

..

No commits in common. "6cb0f04170530fd6e3b1f79f838b55254d7574bb" and "26971e75bbdf16532d0042ba82e59205f8c358c9" have entirely different histories.

5 changed files with 18 additions and 15 deletions

1
.gitignore vendored
View file

@ -4,4 +4,3 @@ test_server/
build/
server/
bin/
bin/*

View file

@ -0,0 +1,7 @@
api-version: "1.21"
name: CivilCore
version: 0.1.0
main: rip.iwakura.civil.Core
authors:
- hex
- grng

Binary file not shown.

View file

@ -47,27 +47,24 @@ public class Core extends JavaPlugin {
.color(NamedTextColor.BLUE)
.decoration(TextDecoration.BOLD, true)
.append(Component.text(" Discord", NamedTextColor.BLUE).decoration(TextDecoration.BOLD, false)
.appendSpace()
.append(Component.text(author.getName())
.append(Component.text(": "))
.append(Component.text(message))
.color(NamedTextColor.WHITE).decoration(TextDecoration.BOLD, false)));
.appendSpace()
.append(Component.text(author.getName())
.append(Component.text(": "))
.append(Component.text(message))
.color(NamedTextColor.WHITE).decoration(TextDecoration.BOLD, false)));
}
public void sendTeamMessage(CivilPlayer author, Component message) throws SQLException {
Component deserializedMessage = renderTeamChat(author, message);
discord.sendMessage(author, PlainTextComponentSerializer.plainText().serialize(message));
for (CivilPlayer member : database.getAllPlayers(author.getTeam())) {
try {
Player player = Bukkit.getPlayer(member.getName());
Player player = Bukkit.getPlayer(member.getName());
if (player == null || !player.isOnline())
continue;
player.sendMessage(deserializedMessage);
} catch (Exception e) {
if (!player.isOnline())
continue;
}
player.sendMessage(deserializedMessage);
}
}

View file

@ -136,7 +136,7 @@ public class Team {
try {
CivilPlayer p = database.getPlayer((Player) sender);
core.sendTeamMessage(p, MiniMessage.miniMessage().deserialize(message));
core.sendTeamMessage(p, message);
return Command.SINGLE_SUCCESS;