Implement IPlugin

This commit is contained in:
GeorgH93 2022-01-22 21:22:07 +01:00
parent 04cda9d490
commit 3617d5f5b9
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
2 changed files with 10 additions and 3 deletions

View File

@ -116,7 +116,7 @@ permissions:
description: Allows to reload the config.
default: op
backpack.migrate:
description: Allows to migrate data from one format to another.
description: Allows migrating data from one format to another.
default: op
backpack.backup:
description: Allows to create a backup of a backpack.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 GeorgH93
* Copyright (C) 2022 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
@ -32,6 +32,7 @@
import at.pcgamingfreaks.Minepacks.Bukkit.Listener.ItemFilter;
import at.pcgamingfreaks.Minepacks.Bukkit.Listener.*;
import at.pcgamingfreaks.Minepacks.Bukkit.SpecialInfoWorker.NoDatabaseWorker;
import at.pcgamingfreaks.Plugin.IPlugin;
import at.pcgamingfreaks.StringUtils;
import at.pcgamingfreaks.Updater.UpdateResponseCallback;
import at.pcgamingfreaks.Version;
@ -55,7 +56,7 @@
import java.util.Locale;
import java.util.Set;
public class Minepacks extends JavaPlugin implements MinepacksPlugin
public class Minepacks extends JavaPlugin implements MinepacksPlugin, IPlugin
{
private static Minepacks instance = null;
@ -400,4 +401,10 @@ public boolean isBackpackItem(final @Nullable ItemStack itemStack)
if(shortcut == null) return false;
return shortcut.isItemShortcut(itemStack);
}
@Override
public @NotNull Version getVersion()
{
return new Version(getDescription().getVersion());
}
}