12.3 | Bugfix

BUGFIX: In the 1.8 the plugin info texts were not displayed and it triggered a bug
This commit is contained in:
JaTiTV 2022-06-30 20:26:09 +02:00
parent d4f311493f
commit c92e36163e
4 changed files with 8 additions and 7 deletions

View File

@ -13,7 +13,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="16" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View File

@ -48,7 +48,7 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: com.bencodez:votingplugin:6.9.2" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.bencodez:votingplugin:6.9.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-velocity:2.2.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-velocity:2.2.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-base:2.2.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-base:2.2.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.bencodez:advancedcore:master-8e0687ecee-1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.github.bencodez:advancedcore:master-1634c37011-1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.zaxxer:HikariCP:3.4.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: com.zaxxer:HikariCP:3.4.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-simple:1.7.5" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-simple:1.7.5" level="project" />

View File

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>12.2</version> <version>12.3</version>
<!-- <classifier>dev-#2</classifier> --> <!-- <classifier>dev-#2</classifier> -->
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>

View File

@ -103,14 +103,14 @@ public class T2CodeTemplate {
send.sender(sender, prefix + "§4======= " + prefix + " §4======="); send.sender(sender, prefix + "§4======= " + prefix + " §4=======");
send.sender(sender, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", "")); send.sender(sender, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
if (sender instanceof Player) { if (sender instanceof Player) {
Player player = (Player) sender;
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 || if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 ||
MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15) { MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15) {
send.sender(sender, prefix + " §2Version: §6" + pluginVersion); send.sender(sender, prefix + " §2Version: §6" + pluginVersion);
} else { } else {
TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion) TextComponent comp2 = new TextBuilder(prefix + " §2Version: §6" + pluginVersion)
.addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build(); .addHover("§8Click to copy").addClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, Replace.removeColorCode(prefix) + " - " + pluginVersion).build();
sender.spigot().sendMessage(comp2); player.spigot().sendMessage(comp2);
} }
if (!publicVersion.equalsIgnoreCase(pluginVersion)) { if (!publicVersion.equalsIgnoreCase(pluginVersion)) {
@ -118,10 +118,11 @@ public class T2CodeTemplate {
} }
TextComponent comp3 = new TextBuilder(prefix + " §2Spigot: §6" + spigot) TextComponent comp3 = new TextBuilder(prefix + " §2Spigot: §6" + spigot)
.addHover("§8Open Spigot").addClickEvent(ClickEvent.Action.OPEN_URL, spigot).build(); .addHover("§8Open Spigot").addClickEvent(ClickEvent.Action.OPEN_URL, spigot).build();
sender.spigot().sendMessage(comp3);
player.spigot().sendMessage(comp3);
TextComponent comp4 = new TextBuilder(prefix + " §2Discord: §6" + discord) TextComponent comp4 = new TextBuilder(prefix + " §2Discord: §6" + discord)
.addHover("§8Open Discord").addClickEvent(ClickEvent.Action.OPEN_URL, discord).build(); .addHover("§8Open Discord").addClickEvent(ClickEvent.Action.OPEN_URL, discord).build();
sender.spigot().sendMessage(comp4); player.spigot().sendMessage(comp4);
} else { } else {
if (publicVersion.equalsIgnoreCase(pluginVersion)) { if (publicVersion.equalsIgnoreCase(pluginVersion)) {
send.sender(sender, prefix + " §2Version: §6" + pluginVersion); send.sender(sender, prefix + " §2Version: §6" + pluginVersion);