diff --git a/ToDo.txt b/ToDo.txt deleted file mode 100644 index ec9a06c..0000000 --- a/ToDo.txt +++ /dev/null @@ -1,4 +0,0 @@ -Multi Page -API -BungeeCord Sync -Item filter - test \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3ce1d88..2511fe4 100644 --- a/pom.xml +++ b/pom.xml @@ -1,20 +1,3 @@ - - 4.0.0 @@ -56,7 +39,7 @@ pcgf-repo - https://repo.pcgamingfreaks.at/repository/everything/ + https://repo.pcgamingfreaks.at/repository/maven-everything/ spigot-nexus @@ -65,12 +48,30 @@ + + + at.pcgamingfreaks + Minepacks-API + 2.0 + + + org.bukkit + bukkit + + + at.pcgamingfreaks + PluginLib + + + + org.bukkit bukkit 1.13.2-R0.1-SNAPSHOT provided + at.pcgamingfreaks PluginLib @@ -79,7 +80,7 @@ - clean install + clean package src @@ -105,6 +106,29 @@ 1.8 + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + package + + shade + + + false + false + + + at.pcgamingfreaks:Minepacks-API + + + + + + diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Backpack.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Backpack.java deleted file mode 100644 index 22e4341..0000000 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Backpack.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2016, 2017 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package at.pcgamingfreaks.Minepacks.Bukkit.API; - -import org.bukkit.Location; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; -import org.bukkit.inventory.InventoryHolder; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public interface Backpack extends InventoryHolder -{ - /** - * Gets the owner of the backpack. - * - * @return The owner of the backpack; - */ - @NotNull OfflinePlayer getOwner(); - - /** - * Let a given player open this backpack. - * - * @param player The player who opens the backpack. - * @param editable Defines if the player who has opened the backpack can change the items inside. - */ - void open(@NotNull Player player, boolean editable); - - /** - * Let a given player open this backpack. - * - * @param player The player who opens the backpack. - * @param editable Defines if the player who has opened the backpack can change the items inside. - * @param title Custom title for the backpack (will be shown to the player who opened the backpack. - */ - void open(@NotNull Player player, boolean editable, @Nullable String title); - - /** - * Checks if the backpack is currently opened by a player. - * - * @return True if the backpack is open, false if not. - */ - boolean isOpen(); - - /** - * Checks if a player can change the content of the backpack. - * - * @param player The player to be checked. - * @return True if he can change the content, false if not. - */ - boolean canEdit(@NotNull Player player); - - /** - * Gets the size of the backpack. - * - * @return The size of the backpack. - */ - @SuppressWarnings("unused") - int getSize(); - - /** - * Checks if the backpack has changed since it was last saved. - * - * @return True if it has been changed, false if not. - */ - boolean hasChanged(); - - /** - * Marks that the content of the backpack a changed. It will be saved when the next player closes the backpack or before it gets removed from the cache. - */ - void setChanged(); - - /** - * Forces the backpack to be saved - */ - void save(); - - /** - * Removes all items from the backpack. - */ - void clear(); - - /** - * Drops the content of the backpack to the ground on a given location. - * - * @param location The location the content of the backpack should be dropped to. - */ - void drop(Location location); -} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Callback.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Callback.java deleted file mode 100644 index 03bfe6c..0000000 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/Callback.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2016 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package at.pcgamingfreaks.Minepacks.Bukkit.API; - -public interface Callback -{ - void onResult(T done); - - void onFail(); -} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java deleted file mode 100644 index 001b509..0000000 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (C) 2018 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package at.pcgamingfreaks.Minepacks.Bukkit.API; - -import at.pcgamingfreaks.Bukkit.Command.SubCommand; -import at.pcgamingfreaks.Bukkit.Message.Message; -import at.pcgamingfreaks.Command.HelpData; - -import org.bukkit.ChatColor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.lang.reflect.Method; -import java.util.LinkedList; -import java.util.List; - -public abstract class MinepacksCommand extends SubCommand -{ - private static MinepacksPlugin minepacksPlugin = null; - private static Method showHelp = null; - private static Message messageNoPermission = new Message(ChatColor.RED + "You don't have the permission to do that."); - private static Message messageNotFromConsole = new Message(ChatColor.RED + "This command can't be used from console!"); - protected final JavaPlugin plugin; - private final boolean playerOnly; - - //region Constructors - /** - * Creates a new command instance. - * - * @param plugin The plugin owning the command. - * @param name The command used. - * @param description The description of the command. - * @param aliases List of aliases for that command. - */ - public MinepacksCommand(@NotNull JavaPlugin plugin, @NotNull String name, @NotNull String description, @Nullable String... aliases) - { - this(plugin, name, description, null, aliases); - } - - /** - * Creates a new command instance. - * - * @param plugin The plugin owning the command. - * @param name The command used. - * @param description The description of the command. - * @param permission The permission to be checked for this command. Players without the permission neither can use the command nor will they see it in help. - * @param aliases List of aliases for that command. - */ - public MinepacksCommand(@NotNull JavaPlugin plugin, @NotNull String name, @NotNull String description, @Nullable String permission, @Nullable String... aliases) - { - this(plugin, name, description, permission, false, aliases); - } - - /** - * Creates a new command instance. - * - * @param plugin The plugin owning the command. - * @param name The command used. - * @param description The description of the command. - * @param permission The permission to be checked for this command. Players without the permission neither can use the command nor will they see it in help. - * @param playerOnly Limits the command to players, console can't use and can't see the command. - * @param aliases List of aliases for that command. - */ - public MinepacksCommand(@NotNull JavaPlugin plugin, @NotNull String name, @NotNull String description, @Nullable String permission, boolean playerOnly, @Nullable String... aliases) - { - super(name, description, permission, aliases); - this.plugin = plugin; - this.playerOnly = playerOnly; - } - //endregion - - /** - * Gets the instance of the marriage master plugin. - * - * @return The instance of the marriage master plugin. - */ - protected @NotNull MinepacksPlugin getMinepacksPlugin() - { - return minepacksPlugin; - } - - //region Command Stuff - /** - * Executes some basic checks and runs the command afterwards. - * - * @param sender Source of the command. - * @param mainCommandAlias Alias of the plugins main command which was used. - * @param alias Alias of the command which has been used. - * @param args Passed command arguments. - */ - @Override - public void doExecute(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String... args) - { - if(playerOnly && !(sender instanceof Player)) - { - messageNotFromConsole.send(sender); - } - else if(getPermission() != null && !sender.hasPermission(getPermission())) - { - messageNoPermission.send(sender); - } - else - { - execute(sender, mainCommandAlias, alias, args); - } - } - - /** - * Executes some basic checks and generates list for tab completion. - * - * @param sender Source of the command. - * @param mainCommandAlias Alias of the plugins main command which has been used. - * @param alias The alias used. - * @param args The arguments passed to the command, including final partial argument to be completed and command label. - * @return A List of possible completions for the final argument, or null to default to the command executor. - */ - @Override - public List doTabComplete(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String... args) - { - if(playerOnly && !(sender instanceof Player)) - { - messageNotFromConsole.send(sender); - } - else if(getPermission() != null && !sender.hasPermission(getPermission())) - { - messageNoPermission.send(sender); - } - else - { - return tabComplete(sender, mainCommandAlias, alias, args); - } - return null; - } - - /** - * Gets the help for a given {@link CommandSender}. - * - * @param requester The {@link CommandSender} that requested help. - * @return All the help data for this command. - */ - @Override - public @Nullable List getHelp(@NotNull CommandSender requester) - { - List help = new LinkedList<>(); - help.add(new HelpData(getTranslatedName(), null, getDescription())); - return help; - } - - /** - * Shows the help to a given command sender. - * - * @param sendTo The command sender that requested help. - * @param usedMainCommandAlias The used backpack alias to replace the /backpack with the used alias. - */ - @Override - public void showHelp(@NotNull CommandSender sendTo, @NotNull String usedMainCommandAlias) - { - try - { - showHelp.invoke(getMinepacksPlugin().getCommandManager(), sendTo, usedMainCommandAlias, doGetHelp(sendTo)); - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - /** - * Checks if a user can use the command. Checks permission, marriage status and player/console. - * - * @param sender The player/console that should be checked. - * @return True if it can use the command, false if not. - */ - @Override - public boolean canUse(@NotNull CommandSender sender) - { - return (!playerOnly || sender instanceof Player) && (getPermission() == null || sender.hasPermission(getPermission())); - } - //endregion -} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java deleted file mode 100644 index 910455e..0000000 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2018 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package at.pcgamingfreaks.Minepacks.Bukkit.API; - -import org.jetbrains.annotations.NotNull; - -@SuppressWarnings("unused") -public interface MinepacksCommandManager -{ - /** - * Registers a new sub-command for /backpack. - * - * @param command The command that should be registered. - */ - void registerSubCommand(@NotNull MinepacksCommand command); - - /** - * Unregisters a sub-command for /backpack. - * - * @param command The command that should be unregistered. - */ - void unRegisterSubCommand(@NotNull MinepacksCommand command); -} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java deleted file mode 100644 index dcafee8..0000000 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2016-2018 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package at.pcgamingfreaks.Minepacks.Bukkit.API; - -import at.pcgamingfreaks.Version; - -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@SuppressWarnings("unused") -public interface MinepacksPlugin -{ - /** - * Gets the instance of the minepacks plugin. - * WARNING use this function at your own risk! If the plugin is not installed the MinepacksPlugin class will be unknown! - * - * @return The instance of the minepacks plugin. - */ - static @Nullable MinepacksPlugin getInstance() - { - Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("Minepacks"); - return (plugin instanceof MinepacksPlugin && plugin.isEnabled()) ? (MinepacksPlugin) plugin : null; - } - - /** - * Gets the currently running {@link Version} of the plugin. - * Version 0.0 if plugin is not loaded or enabled. - * - * @return The currently running version of the plugin. - */ - static @NotNull Version getVersion() - { - Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("Minepacks"); - if(plugin instanceof MinepacksPlugin && plugin.isEnabled()) - { - return new Version(plugin.getDescription().getVersion()); - } - return new Version("0.0"); - } - - /** - * Let a given player open the backpack of an other player. - * - * @param opener The player who opens the backpack. - * @param owner The owner of the backpack that should be opened. - * @param editable Defines if the player who has opened the backpack can change the items inside. - */ - void openBackpack(@NotNull final Player opener, @NotNull final OfflinePlayer owner, final boolean editable); - - /** - * Let a given player open a given {@link Backpack}. - * - * @param opener The player who opens the backpack. - * @param backpack The backpack to be opened. null will result in an error message for the player. - * @param editable Defines if the player who has opened the backpack can change the items inside. - */ - void openBackpack(@NotNull final Player opener, @Nullable final Backpack backpack, boolean editable); - - /** - * Let a given player open the backpack of an other player. - * - * @param opener The player who opens the backpack. - * @param owner The owner of the backpack that should be opened. - * @param editable Defines if the player who has opened the backpack can change the items inside. - * @param title Custom title for the backpack (will be shown to the player who opened the backpack. - */ - void openBackpack(@NotNull final Player opener, @NotNull final OfflinePlayer owner, final boolean editable, @Nullable String title); - - /** - * Let a given player open a given {@link Backpack}. - * - * @param opener The player who opens the backpack. - * @param backpack The backpack to be opened. null will result in an error message for the player. - * @param editable Defines if the player who has opened the backpack can change the items inside. - * @param title Custom title for the backpack (will be shown to the player who opened the backpack. - */ - void openBackpack(@NotNull final Player opener, @Nullable final Backpack backpack, boolean editable, @Nullable String title); - - /** - * Retrieves the backpack for a given player. - * This method only returns a backpack if it is in the cache. - * - * @param owner The player who's backpack should be retrieved. - * @return The backpack of the given player. null if the backpack is in the cache. - */ - @Nullable Backpack getBackpackCachedOnly(@NotNull final OfflinePlayer owner); - - /** - * Retrieves the backpack for a given player. - * This method runs async! The result will be delivered with a callback. - * If no backpack exists a new one will be created. - * - * @param owner The player who's backpack should be retrieved. - * @param callback The callback delivering the result of the request. - */ - void getBackpack(@NotNull final OfflinePlayer owner, @NotNull final Callback callback); - - /** - * Retrieves the backpack for a given player. - * This method runs async! The result will be delivered with a callback. - * - * @param owner The player who's backpack should be retrieved. - * @param callback The callback delivering the result of the request. - * @param createNewIfNotExists If set to true, a new backpack will be created if there currently is no backpack for this player. - */ - void getBackpack(@NotNull final OfflinePlayer owner, @NotNull final Callback callback, boolean createNewIfNotExists); - - /** - * Gets the command manager of the Minepacks plugin. - * - * @return The command manager instance. - */ - MinepacksCommandManager getCommandManager(); - - /** - * Checks if the player is allowed to open a backpack based on is permissions and current game-mode. - * - * @param player The player to be checked. - * @return True if the player can use a backpack. False if not. - */ - boolean isPlayerGameModeAllowed(Player player); -} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/BackupCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/BackupCommand.java index 6df8744..baaacb7 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/BackupCommand.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/BackupCommand.java @@ -19,9 +19,9 @@ import at.pcgamingfreaks.Bukkit.Message.Message; import at.pcgamingfreaks.Command.HelpData; +import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.API.Callback; import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand; -import at.pcgamingfreaks.Minepacks.Bukkit.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; import org.bukkit.command.CommandSender; @@ -53,7 +53,7 @@ public void execute(final @NotNull CommandSender sender, final @NotNull String m @Override public void onResult(Backpack backpack) { - backpack.backup(); + ((at.pcgamingfreaks.Minepacks.Bukkit.Backpack) backpack).backup(); messageCreated.send(sender); } diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/ClearCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/ClearCommand.java index 4e7ca85..ba0e2c0 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/ClearCommand.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/ClearCommand.java @@ -19,9 +19,9 @@ import at.pcgamingfreaks.Bukkit.Message.Message; import at.pcgamingfreaks.Command.HelpData; +import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.API.Callback; import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand; -import at.pcgamingfreaks.Minepacks.Bukkit.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; import org.bukkit.Bukkit; diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java index 6cefc1c..2d9ca2f 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java @@ -20,9 +20,9 @@ import at.pcgamingfreaks.Bukkit.Message.Message; import at.pcgamingfreaks.Command.HelpData; import at.pcgamingfreaks.Message.MessageClickEvent; +import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.API.Callback; import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand; -import at.pcgamingfreaks.Minepacks.Bukkit.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; import at.pcgamingfreaks.StringUtils; diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java index 6c23c5d..eb1d70d 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java @@ -198,7 +198,7 @@ protected String getPlayerFormattedUUID(OfflinePlayer player) return (player == null) ? null : backpacks.get(player); } - public void getBackpack(final OfflinePlayer player, final Callback callback, final boolean createNewOnFail) + public void getBackpack(final OfflinePlayer player, final Callback callback, final boolean createNewOnFail) { if(player == null) { @@ -238,7 +238,7 @@ public void onFail() } } - public void getBackpack(final OfflinePlayer player, final Callback callback) + public void getBackpack(final OfflinePlayer player, final Callback callback) { getBackpack(player, callback, true); } diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Files.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Files.java index ff6b576..976799e 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Files.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Files.java @@ -143,7 +143,7 @@ public void saveBackpack(Backpack backpack) @Override protected void loadBackpack(final OfflinePlayer player, final Callback callback) - { + { //TODO this needs to be done async! File save = new File(saveFolder, getFileName(player)); ItemStack[] itemStacks = readFile(itsSerializer, save, plugin.getLogger()); if(itemStacks != null) diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/DropOnDeath.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/DropOnDeath.java index d9870e6..56f7b4a 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/DropOnDeath.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/DropOnDeath.java @@ -17,8 +17,8 @@ package at.pcgamingfreaks.Minepacks.Bukkit.Listener; +import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.API.Callback; -import at.pcgamingfreaks.Minepacks.Bukkit.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.Database.Helper.WorldBlacklistMode; import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks; diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java index 06b3678..796b739 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java @@ -247,10 +247,10 @@ public void openBackpack(@NotNull final Player opener, @Nullable final Backpack public void openBackpack(@NotNull Player opener, @NotNull OfflinePlayer owner, boolean editable, @Nullable String title) { Validate.notNull(owner); - database.getBackpack(owner, new Callback() + database.getBackpack(owner, new Callback() { @Override - public void onResult(at.pcgamingfreaks.Minepacks.Bukkit.Backpack backpack) + public void onResult(Backpack backpack) { openBackpack(opener, backpack, editable, title); } @@ -289,13 +289,13 @@ public void openBackpack(@NotNull Player opener, @Nullable Backpack backpack, bo } @Override - public void getBackpack(@NotNull OfflinePlayer owner, @NotNull Callback callback) + public void getBackpack(@NotNull OfflinePlayer owner, @NotNull Callback callback) { database.getBackpack(owner, callback); } @Override - public void getBackpack(@NotNull final OfflinePlayer owner, @NotNull final Callback callback, boolean createNewIfNotExists) + public void getBackpack(@NotNull final OfflinePlayer owner, @NotNull final Callback callback, boolean createNewIfNotExists) { database.getBackpack(owner, callback, createNewIfNotExists); }