File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/com/loohp/interactivechat Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22 <modelVersion >4.0.0</modelVersion >
33 <groupId >InteractiveChat</groupId >
44 <artifactId >InteractiveChat</artifactId >
5- <version >2.7.1 </version >
5+ <version >2.7.2 </version >
66 <build >
77 <sourceDirectory >src</sourceDirectory >
88 <resources >
Original file line number Diff line number Diff line change 4141import com .loohp .interactivechat .Utils .RarityUtils ;
4242
4343import net .md_5 .bungee .api .chat .ClickEvent ;
44+ import net .md_5 .bungee .api .chat .HoverEvent ;
4445import net .md_5 .bungee .api .chat .TextComponent ;
46+ import net .md_5 .bungee .api .chat .HoverEvent .Action ;
47+ import net .md_5 .bungee .api .chat .hover .content .Text ;
4548
4649public class InteractiveChat extends JavaPlugin {
4750
@@ -232,9 +235,11 @@ public void onEnable() {
232235 ClientSettingPackets .clientSettingsListener ();
233236
234237 try {
235- new TextComponent ("Legacy Bungeecord Chat API Test" ).getHoverEvent ().getContents ();
238+ TextComponent test = new TextComponent ("Legacy Bungeecord Chat API Test" );
239+ test .setHoverEvent (new HoverEvent (Action .SHOW_TEXT , new Text ("Test Hover Text" )));
240+ test .getHoverEvent ().getContents ();
236241 legacyChatAPI = false ;
237- } catch (Exception | NoSuchMethodError e ) {
242+ } catch (Throwable e ) {
238243 legacyChatAPI = true ;
239244 Bukkit .getConsoleSender ().sendMessage (ChatColor .YELLOW + "[InteractiveChat] Legacy Bungeecord Chat API detected, using legacy methods..." );
240245 };
You can’t perform that action at this time.
0 commit comments