fixed arena transfer with empty inventory slots and blocked advancements in the arena
This commit is contained in:
1 parent
8b616ba2a2
commit
65c48eae45
4 files changed
+24
-3
No files matched your search
+1
-3
@@ -20,7 +20,6 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -75,8 +74,7 @@ public class ArenaPortal extends Appliance {
|
||||
if(!this.pendingTransfers.add(player.getUniqueId())) return;
|
||||
player.sendActionBar(Component.text("Du wirst zur Arena gebracht...", NamedTextColor.GRAY));
|
||||
|
||||
List<ItemStack> contents = new ArrayList<>(List.of(player.getInventory().getContents()));
|
||||
String items = Base64.getEncoder().encodeToString(ItemStack.serializeItemsAsBytes(contents));
|
||||
String items = Base64.getEncoder().encodeToString(ItemStack.serializeItemsAsBytes(player.getInventory().getContents()));
|
||||
ArenaRepository.InventorySnapshot snapshot = new ArenaRepository.InventorySnapshot(player.getUniqueId(), items);
|
||||
|
||||
Bukkit.getScheduler().runTaskAsynchronously(Main.instance(), () -> {
|
||||
|
||||
Reference in new issue
Block a user