Make backwards premium only, rename LibsVersion to LibsPremium
This commit is contained in:
parent
3c8ef42522
commit
b98e3b92bf
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import me.libraryaddict.disguise.utilities.LibsVersion;
|
||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
@ -58,7 +58,7 @@ public class LibsDisguisesCommand implements CommandExecutor, TabCompleter {
|
||||
+ "/libsdisguises reload" + ChatColor.DARK_GREEN
|
||||
+ " to reload the config. All disguises will be blown by doing this.");
|
||||
|
||||
if (LibsVersion.isPremium()) {
|
||||
if (LibsPremium.isPremium()) {
|
||||
sender.sendMessage(ChatColor.DARK_GREEN + "This server supports the plugin developer!");
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
public static void saveDisguises(UUID owningEntity, Disguise[] disguise) {
|
||||
if (!LibsVersion.isPremium())
|
||||
if (!LibsPremium.isPremium())
|
||||
return;
|
||||
|
||||
try {
|
||||
@ -171,7 +171,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
public static Disguise[] getSavedDisguises(UUID entityUUID, boolean remove) {
|
||||
if (!isSavedDisguise(entityUUID) || !LibsVersion.isPremium())
|
||||
if (!isSavedDisguise(entityUUID) || !LibsPremium.isPremium())
|
||||
return new Disguise[0];
|
||||
|
||||
File disguiseFile = new File(savedDisguises, entityUUID.toString());
|
||||
@ -849,7 +849,7 @@ public class DisguiseUtilities {
|
||||
savedDisguiseList.add(UUID.fromString(key));
|
||||
}
|
||||
|
||||
LibsVersion.check(libsDisguises);
|
||||
LibsPremium.check(libsDisguises);
|
||||
}
|
||||
|
||||
public static boolean isDisguiseInUse(Disguise disguise) {
|
||||
|
@ -10,7 +10,7 @@ import java.net.URLClassLoader;
|
||||
/**
|
||||
* Created by libraryaddict on 2/06/2017.
|
||||
*/
|
||||
public class LibsVersion {
|
||||
public class LibsPremium {
|
||||
/**
|
||||
* If you're seriously going to modify this to get the premium stuff for free, can you at least not
|
||||
* distribute it? You didn't pay for it despite how cheap it is. You spend $8 on a trip to McDonalds
|
||||
@ -53,7 +53,7 @@ public class LibsVersion {
|
||||
|
||||
try {
|
||||
ClassLoader cl = new URLClassLoader(new URL[]{file.toURI().toURL()});
|
||||
Class c = cl.loadClass(LibsVersion.class.getName());
|
||||
Class c = cl.loadClass(LibsPremium.class.getName());
|
||||
|
||||
Method m = c.getMethod("isPremium");
|
||||
thisPluginIsPaidFor = (Boolean) m.invoke(null);
|
@ -1,7 +1,7 @@
|
||||
package me.libraryaddict.disguise.utilities.backwards;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
||||
import me.libraryaddict.disguise.utilities.LibsVersion;
|
||||
import me.libraryaddict.disguise.utilities.LibsPremium;
|
||||
import me.libraryaddict.disguise.utilities.ReflectionManager;
|
||||
import me.libraryaddict.disguise.utilities.backwards.metadata.Version_1_1;
|
||||
|
||||
@ -15,7 +15,7 @@ public class BackwardsSupport {
|
||||
try {
|
||||
String version = ReflectionManager.getBukkitVersion();
|
||||
|
||||
if (LibsVersion.isPremium()) {
|
||||
if (LibsPremium.isPremium()) {
|
||||
if (version.equals("v1_11_R1")) {
|
||||
return setupMetadata(Version_1_1.class);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user