Skip to content

Commit 0135f78

Browse files
committed
Drop internal version listing
With the move to a rolling window of supported releases rather than last major version + all current major version, maintaining an internal list is a little annoying and impedes the ability to make pre-release announcements.
1 parent 2284352 commit 0135f78

2 files changed

Lines changed: 1 addition & 129 deletions

File tree

plugin/src/main/java/com/lishid/openinv/OpenInv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private void setCommandExecutor(@NotNull CommandExecutor executor, String @NotNu
188188
private void sendVersionError(@NotNull Consumer<String> messageMethod) {
189189
if (!accessor.isSupported()) {
190190
messageMethod.accept("Your server version (" + accessor.getVersion() + ") is not supported.");
191-
messageMethod.accept("Please download the correct version of OpenInv here: " + accessor.getReleasesLink());
191+
messageMethod.accept("Please check https://github.com/Jikoo/OpenInv/wiki/Supported-Versions to find a matching OI version.");
192192
}
193193
if (!isSpigot) {
194194
messageMethod.accept("OpenInv requires that you use Spigot or a Spigot fork. Per the 1.14 update thread");

plugin/src/main/java/com/lishid/openinv/util/InternalAccessor.java

Lines changed: 0 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -98,134 +98,6 @@ public InternalAccessor(@NotNull Logger logger, @NotNull LanguageManager lang) {
9898
return new com.lishid.openinv.internal.paper1_21_10.InternalAccessor(logger, lang);
9999
}
100100

101-
public String getReleasesLink() {
102-
if (PAPER) {
103-
// Paper 1.21.1+
104-
return getPaperReleaseLink();
105-
}
106-
// Spigot 1.21.1+
107-
return getSpigotReleaseLink();
108-
}
109-
110-
private String getPaperReleaseLink() {
111-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 9))) {
112-
return "https://github.com/Jikoo/OpenInv/releases";
113-
}
114-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 6))) {
115-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.3.2";
116-
}
117-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 1))) {
118-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.3.0";
119-
}
120-
return getLegacyReleaseLink();
121-
}
122-
123-
private String getSpigotReleaseLink() {
124-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(26, 1))) {
125-
return "https://github.com/Jikoo/OpenInv/releases";
126-
}
127-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 11))) { // 1.21.11
128-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.3.0";
129-
}
130-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 10))) { // 1.21.10
131-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.15";
132-
}
133-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 9))) { // 1.21.9
134-
return "Unsupported; upgrade to 1.21.10: https://github.com/Jikoo/OpenInv/releases/tag/5.1.15";
135-
}
136-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 8))) { // 1.21.8, 1.21.7
137-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.13";
138-
}
139-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 6))) { // 1.21.6
140-
return "Unsupported; upgrade to 1.21.7: https://github.com/Jikoo/OpenInv/releases/tag/5.1.13";
141-
}
142-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 5))) { // 1.21.5
143-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.11";
144-
}
145-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 4))) { // 1.21.4
146-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.9";
147-
}
148-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 3))) { // 1.21.3
149-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.6";
150-
}
151-
if (BukkitVersions.MINECRAFT.greaterThanOrEqual(Version.of(1, 21, 1))) { // 1.21.1, 1.21.2
152-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.3";
153-
}
154-
// 1.21.0 and lower
155-
return getLegacyReleaseLink();
156-
}
157-
158-
private String getLegacyReleaseLink() {
159-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 4, 4))) { // Good luck.
160-
return "https://dev.bukkit.org/projects/openinv/files?&sort=datecreated";
161-
}
162-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 8, 8))) { // 1.8.8
163-
return "https://github.com/lishid/OpenInv/releases/tag/4.1.5";
164-
}
165-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 13))) { // 1.4.4+ had versioned packages.
166-
return "https://github.com/lishid/OpenInv/releases/tag/4.0.0 (OpenInv-legacy)";
167-
}
168-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 13))) { // 1.13
169-
return "https://github.com/lishid/OpenInv/releases/tag/4.0.0";
170-
}
171-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 14))) { // 1.13.1, 1.13.2
172-
return "https://github.com/lishid/OpenInv/releases/tag/4.0.7";
173-
}
174-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 14))) { // 1.14 to 1.14.1 had no revision bump.
175-
return "https://github.com/lishid/OpenInv/releases/tag/4.0.0";
176-
}
177-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 14, 1))) { // 1.14.1 to 1.14.2 had no revision bump.
178-
return "https://github.com/lishid/OpenInv/releases/tag/4.0.1";
179-
}
180-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 15))) { // 1.14.2
181-
return "https://github.com/lishid/OpenInv/releases/tag/4.1.1";
182-
}
183-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 15, 1))) { // 1.15, 1.15.1
184-
return "https://github.com/lishid/OpenInv/releases/tag/4.1.5";
185-
}
186-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 16))) { // 1.15.2
187-
return "https://github.com/Jikoo/OpenInv/commit/502f661be39ee85d300851dd571f3da226f12345 (never released)";
188-
}
189-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 16, 1))) { // 1.16, 1.16.1
190-
return "https://github.com/lishid/OpenInv/releases/tag/4.1.4";
191-
}
192-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 16, 3))) { // 1.16.2, 1.16.3
193-
return "https://github.com/lishid/OpenInv/releases/tag/4.1.5";
194-
}
195-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 17))) { // 1.16.4, 1.16.5
196-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.1.8";
197-
}
198-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 18, 1))) { // 1.17, 1.18, 1.18.1
199-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.1.10";
200-
}
201-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 19))) { // 1.18.2
202-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.3.0";
203-
}
204-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 19))) { // 1.19
205-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.2.0";
206-
}
207-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 19, 1))) { // 1.19.1
208-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.2.2";
209-
}
210-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 19, 3))) { // 1.19.2, 1.19.3
211-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.3.0";
212-
}
213-
if (BukkitVersions.MINECRAFT.lessThan(Version.of(1, 20))) { // 1.19.4
214-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.4.3";
215-
}
216-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 20, 1))) { // 1.20, 1.20.1
217-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.4.1";
218-
}
219-
if (BukkitVersions.MINECRAFT.lessThanOrEqual(Version.of(1, 20, 3))) { // 1.20.2, 1.20.3
220-
return "https://github.com/Jikoo/OpenInv/releases/tag/4.4.3";
221-
}
222-
if (BukkitVersions.MINECRAFT.equals(Version.of(1, 20, 5))) { // 1.20.5
223-
return "Unsupported; upgrade to 1.20.6: https://github.com/Jikoo/OpenInv/releases/tag/5.1.2";
224-
}
225-
// 1.20.4, 1.20.6, 1.21
226-
return "https://github.com/Jikoo/OpenInv/releases/tag/5.1.2";
227-
}
228-
229101
/**
230102
* Reload internal features.
231103
*/

0 commit comments

Comments
 (0)