Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,26 @@
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
</transformers>
<!-- The shaded plugin is not a JPMS module. -->
<filters>
<!-- Keep the plugin manifest; dependency manifests describe separate JARs. -->
<filter>
<artifact>org.bstats:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/versions/**/module-info.class</exclude>
</excludes>
</filter>
</filters>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.tfminecraft.geigercounters.managers;

import net.tfminecraft.tlibs.enums.APIType;
import net.tfminecraft.tlibs.objects.api.ItemAPI;
import net.tfminecraft.tlibs.TLibs;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -57,7 +56,7 @@ public static GeigerManager getInstance() {
// Initialize the Geiger Counter system
// ====================================
public void initialize() {
api = (ItemAPI) TLibs.getApiInstance(APIType.ITEM_API);
api = TLibs.getItemAPI();

configuration = new GeigerConfiguration(plugin);
configuration.load();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/tfminecraft/geigercounters/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class Utils {
// Durations like "12h", "90m", "1d", "30s" - or a bare number, read as seconds
private static final Pattern DURATION_PATTERN = Pattern.compile("(?i)^[ \t]*([0-9]+(?:[.][0-9]+)?)[ \t]*([smhd]?)[ \t]*$");

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public static String colorize(String msg) {
Matcher match = Pattern.compile("#[a-fA-F0-9]{6}").matcher(msg);
while (match.find()) {
Expand Down