Skip to content

Commit

Permalink
2.5.1 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
LOOHP committed Jul 4, 2020
1 parent 3c9dad3 commit dfacbbf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/com/loohp/interactivechat/Listeners/ChatPackets.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public void onPacketSending(PacketEvent event) {
longerThanMaxLength = true;
}
debug++;
//Bukkit.getConsoleSender().sendMessage(ComponentSerializer.toString(basecomponent));
if (field == 0) {
packet.getChatComponents().write(0, WrappedChatComponent.fromJson(json));
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/com/loohp/interactivechat/Utils/ChatColorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static String getFirstColors(String input) {
break;
}
i++;
}
}

return result;
}
Expand Down
6 changes: 4 additions & 2 deletions src/com/loohp/interactivechat/Utils/ChatComponentUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder.FormatRetention;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.HoverEvent.Content;
import net.md_5.bungee.api.chat.HoverEvent.ContentEntity;
Expand Down Expand Up @@ -265,10 +266,11 @@ public static BaseComponent cleanUpLegacyText(BaseComponent basecomponent, Playe
List<TextComponent> texts = Arrays.asList(TextComponent.fromLegacyText(base.toLegacyText())).stream().map(each -> (TextComponent) each).collect(Collectors.toList());
texts.forEach(each -> {
if (InteractiveChat.version.isLegacy() && !InteractiveChat.version.equals(MCVersion.V1_12)) {
each = (TextComponent) CustomStringUtils.copyFormattingNoReplace(each, base);
each = (TextComponent) CustomStringUtils.copyFormattingEventsNoReplace(each, base);
} else {
each.copyFormatting(base, false);
each.copyFormatting(base, FormatRetention.EVENTS, false);
}
//Bukkit.getConsoleSender().sendMessage(ComponentSerializer.toString(each).replace("§", "&"));
});
newlist.addAll(texts);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: InteractiveChat
author: loohp
version: 2.5.0
version: 2.5.1
main: com.loohp.interactivechat.InteractiveChat
api-version: 1.13
description: Make the chat interactive
Expand Down

0 comments on commit dfacbbf

Please sign in to comment.