mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-04 09:10:17 +01:00
Remove unused code
Or at least I made it unused lul
This commit is contained in:
parent
38d0cc1b29
commit
6d779dad05
@ -60,18 +60,14 @@ import lombok.NonNull;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -79,7 +75,6 @@ import java.util.Arrays;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -1606,18 +1601,6 @@ import java.util.zip.ZipInputStream;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Settings.load(configFile);
|
Settings.load(configFile);
|
||||||
//Sets the version information for the settings.yml file
|
|
||||||
try (InputStream stream = getClass().getResourceAsStream("/plugin.properties")) {
|
|
||||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(stream))) {
|
|
||||||
String versionString = br.readLine();
|
|
||||||
String commitString = br.readLine();
|
|
||||||
String dateString = br.readLine();
|
|
||||||
this.version = PlotVersion.tryParse(versionString, commitString, dateString);
|
|
||||||
System.out.println("Version is " + this.version);
|
|
||||||
}
|
|
||||||
} catch (IOException throwable) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
}
|
|
||||||
Settings.save(configFile);
|
Settings.save(configFile);
|
||||||
config = YamlConfiguration.loadConfiguration(configFile);
|
config = YamlConfiguration.loadConfiguration(configFile);
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,6 @@ package com.github.intellectualsites.plotsquared.plot;
|
|||||||
public class PlotVersion {
|
public class PlotVersion {
|
||||||
public final int year, month, day, hash, build;
|
public final int year, month, day, hash, build;
|
||||||
|
|
||||||
public PlotVersion(int year, int month, int day, int hash, int build) {
|
|
||||||
this.year = year;
|
|
||||||
this.month = month;
|
|
||||||
this.day = day;
|
|
||||||
this.hash = hash;
|
|
||||||
this.build = build;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlotVersion(String version, String commit, String date) {
|
public PlotVersion(String version, String commit, String date) {
|
||||||
String[] split = version.substring(version.indexOf('=') + 1).split("\\.");
|
String[] split = version.substring(version.indexOf('=') + 1).split("\\.");
|
||||||
this.build = Integer.parseInt(split[1]);
|
this.build = Integer.parseInt(split[1]);
|
||||||
@ -21,23 +13,8 @@ public class PlotVersion {
|
|||||||
this.day = Integer.parseInt(split1[2]);
|
this.day = Integer.parseInt(split1[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlotVersion tryParse(String version, String commit, String date) {
|
@Override
|
||||||
try {
|
public String toString() {
|
||||||
return new PlotVersion(version, commit, date);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return new PlotVersion(0, 0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String versionString() {
|
|
||||||
if (hash == 0 && build == 0) {
|
|
||||||
return "NoVer-SNAPSHOT";
|
|
||||||
} else {
|
|
||||||
return "5." + build;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override public String toString() {
|
|
||||||
if (hash == 0 && build == 0) {
|
if (hash == 0 && build == 0) {
|
||||||
return "PlotSquared-NoVer-SNAPSHOT";
|
return "PlotSquared-NoVer-SNAPSHOT";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user