mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Use lastIndexOf in Metrics class to futureproof
Because who's going to remember to change that line...
This commit is contained in:
parent
22e2858fee
commit
24f6670a17
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ decisions on behalf of the project.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
new file mode 100644
|
||||
index 000000000..91c2aae03
|
||||
index 000000000..9389f9a8c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -614,7 +614,7 @@ index 000000000..91c2aae03
|
|||
+ String javaVersion = System.getProperty("java.version");
|
||||
+ Map<String, Integer> entry = new HashMap<>();
|
||||
+ entry.put(javaVersion, 1);
|
||||
+ map.put("Java " + javaVersion.substring(0, 3), entry);
|
||||
+ map.put("Java " + javaVersion.substring(0, javaVersion.lastIndexOf('.')), entry);
|
||||
+ return map;
|
||||
+ }));
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue