Initial commit

This commit is contained in:
Scifi9902
2026-10-12 13:57:05 -03:00
commit 4bde3b176a
2576 changed files with 212659 additions and 0 deletions
@@ -0,0 +1,35 @@
package net.crankedpvp.hypeboxes.commands;
import me.mattstudios.mf.annotations.Command;
import me.mattstudios.mf.annotations.Default;
import me.mattstudios.mf.base.CommandBase;
import net.crankedpvp.crankedutils.utils.Arrow;
import net.crankedpvp.crankedutils.utils.CC;
import net.crankedpvp.crankedutils.utils.SoundUtils;
import net.crankedpvp.hypeboxes.HypeboxesPlugin;
import net.crankedpvp.hypeboxes.inventory.HypeBoxAnimationInventory;
import org.bukkit.entity.Player;
import java.util.UUID;
@Command("viewhypeboxopen")
public class ViewHypeboxOpenCommand extends CommandBase {
private final HypeboxesPlugin plugin;
public ViewHypeboxOpenCommand(HypeboxesPlugin plugin) {
this.plugin = plugin;
}
@Default
public void defaultCommand(final Player player, String crateID) {
if(!this.plugin.getHypeboxesBeingOpened().containsKey(UUID.fromString(crateID))) return;
HypeBoxAnimationInventory hypeBoxAnimationInventory = this.plugin.getHypeboxesBeingOpened().get(UUID.fromString(crateID));
if(!hypeBoxAnimationInventory.isActive()) {
player.sendMessage(CC.translate("&d&lHype Boxes &8" + Arrow.arrow() + " &eThis hype box has finished being opened"));
SoundUtils.tryPlayErrorSound(player);
return;
}
this.plugin.getHypeboxesBeingOpened().get(UUID.fromString(crateID)).getUI().open(player);
}
}