diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java
index fc0b3d5..699090f 100644
--- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java
+++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/RestoreCommand.java
@@ -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
@@ -12,7 +12,7 @@
* 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 .
+ * along with this program. If not, see .
*/
package at.pcgamingfreaks.Minepacks.Bukkit.Command;
@@ -21,10 +21,12 @@
import at.pcgamingfreaks.Command.HelpData;
import at.pcgamingfreaks.Message.MessageClickEvent;
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand;
+import at.pcgamingfreaks.Minepacks.Bukkit.Backpack;
import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks;
import at.pcgamingfreaks.Minepacks.Bukkit.Permissions;
import at.pcgamingfreaks.Minepacks.Bukkit.Placeholders;
import at.pcgamingfreaks.Util.StringUtils;
+
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
@@ -113,6 +115,11 @@ else if(components.length == 3)
return;
}
getMinepacksPlugin().getBackpack(target, backpack -> {
+ if (backpack.getSize() != items.length)
+ {
+ backpack.clear();
+ ((Backpack) backpack).setSize(items.length);
+ }
backpack.getInventory().setContents(items);
backpack.setChanged();
messageRestored.send(sender);
diff --git a/pom.xml b/pom.xml
index a2407ed..ab63cb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
pom
- 2.4.31.2
+ 2.4.31.3-SNAPSHOT
UTF-8
UTF-8