Skip to content

Commit

Permalink
Add warning about not supported paper version
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed May 14, 2024
1 parent 0811e56 commit 41644b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 GeorgH93
* Copyright (C) 2024 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -38,10 +38,10 @@
import at.pcgamingfreaks.Minepacks.MagicValues;
import at.pcgamingfreaks.Plugin.IPlugin;
import at.pcgamingfreaks.ServerType;
import at.pcgamingfreaks.Util.StringUtils;
import at.pcgamingfreaks.Updater.UpdateResponseCallback;
import at.pcgamingfreaks.Util.StringUtils;
import at.pcgamingfreaks.Version;
import lombok.Getter;

import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.OfflinePlayer;
Expand All @@ -54,6 +54,8 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import lombok.Getter;

import java.io.File;
import java.util.Collection;
import java.util.Locale;
Expand Down Expand Up @@ -121,7 +123,14 @@ public void onEnable()

private boolean checkMcVersion()
{
if(MCVersion.is(MCVersion.UNKNOWN) || !MCVersion.isUUIDsSupportAvailable() || MCVersion.isNewerThan(MCVersion.MC_NMS_1_20_R4))
if ((MCVersion.isNewerThan(MCVersion.MC_NMS_1_20_R4) || MCVersion.is(MCVersion.UNKNOWN)))
{
getLogger().warning("Minepacks is not yet compatible with Paper 1.20.5 and up!");
getLogger().warning("To use this plugin please switch to spigot or wait for an update.");
this.setEnabled(false);
return false;
}
if (MCVersion.is(MCVersion.UNKNOWN) || !MCVersion.isUUIDsSupportAvailable() || MCVersion.isNewerThan(MCVersion.MC_NMS_1_20_R4))
{
this.warnOnVersionIncompatibility();
this.setEnabled(false);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>pom</packaging>

<properties>
<revision>2.4.29-SNAPSHOT</revision>
<revision>2.4.29</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down

0 comments on commit 41644b2

Please sign in to comment.