Skip to content

Commit

Permalink
Фикс цветов
Browse files Browse the repository at this point in the history
  • Loading branch information
Spliterash committed Jan 17, 2021
1 parent 30d97f9 commit b7efad7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public BukkitDieListener(IDieListener listener) {

@EventHandler(ignoreCancelled = true)
public void onMessage(PlayerDeathEvent e) {
listener.onDie((AbstractPlayer) BukkitPlugin.wrapSender(e.getEntity()), ChatColor.stripColor(e.getDeathMessage()));
listener.onDie((AbstractPlayer) BukkitPlugin.wrapSender(e.getEntity()), e.getDeathMessage());
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ allprojects {
}

group = 'ru.spliterash'
version = '3.0.3'
version = '3.0.4'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down
2 changes: 1 addition & 1 deletion conf.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-libraryjars 'C:\Program Files\Java\jre1.8.0_261\lib\rt.jar'
-libraryjars 'C:\Program Files\Java\jre1.8.0_271\lib\rt.jar'
-printmapping 'VkChat.map'
-keepattributes *Annotation*,SourceFile,LineNumberTable,Signature
#-dontnote
Expand Down
27 changes: 15 additions & 12 deletions src/main/java/ru/spliterash/vkchat/VkChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,20 @@ public static void onDisable(boolean serverDisable) {
}

private static void sendMessage(VkApiClient client, GroupActor actor, int peer, String message) {
try {
client
.messages()
.send(actor)
.peerId(peer)
.randomId(random.nextInt())
.disableMentions(true)
.message(message)
.execute();
} catch (Exception e) {
e.printStackTrace();
if (message != null) {
message = ChatColor.stripColor(message);
try {
client
.messages()
.send(actor)
.peerId(peer)
.randomId(random.nextInt())
.disableMentions(true)
.message(message)
.execute();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down Expand Up @@ -330,7 +333,7 @@ private void processMessages(Message message) {
if (s == null || s.length == 0)
commandReply = Lang.CONSOLE_COMMAND.toString();
else
commandReply = ChatColor.stripColor(String.join("\n", s));
commandReply = String.join("\n", s);
sendMessage(message.getPeerId(), commandReply);
}));
} else if (text.startsWith("verify ")) {
Expand Down

0 comments on commit b7efad7

Please sign in to comment.