This is a follow up to the issue here: https://hub.spigotmc.org/jira/browse/SPIGOT-4674
I'm not sure why my fix worked, but your same implementation did not...
Here is the code being used:
ItemFrame frame = (ItemFrame) itemFrameLocation.getWorld().spawn(itemFrameLocation, ItemFrame.class, (iFrame) -> { iFrame.setFacingDirection(BlockFace.UP); });
It is throwing a new error copied here:
[17:03:38 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'bj' in plugin CasinoPlus v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:48) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:704) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1620) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1460) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:9) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_191] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_191] at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:896) [spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] Caused by: java.lang.IllegalStateException: Unable to get CCW facing of up at net.minecraft.server.v1_13_R2.EnumDirection.f(SourceFile:250) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at net.minecraft.server.v1_13_R2.EntityHanging.calculateBoundingBox(EntityHanging.java:56) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at org.bukkit.craftbukkit.v1_13_R2.CraftWorld.createEntity(CraftWorld.java:1295) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at org.bukkit.craftbukkit.v1_13_R2.CraftWorld.spawn(CraftWorld.java:1382) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at org.bukkit.craftbukkit.v1_13_R2.CraftWorld.spawn(CraftWorld.java:997) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] at reesercollins.CasinoPlus.games.BlackjackGame.createBoard(BlackjackGame.java:87) ~[?:?] at reesercollins.CasinoPlus.commands.blackjack.BlackjackCreateCommand.runCommand(BlackjackCreateCommand.java:33) ~[?:?] at reesercollins.CasinoPlus.commands.CommandBase.onCommand(CommandBase.java:47) ~[?:?] at reesercollins.CasinoPlus.commands.CommandBase.onCommand(CommandBase.java:44) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.13.2.jar:git-Spigot-f09662d-7c395d4] ... 15 more
It seems the error is caused by the calculateBoundingBox function in EntityHanging no liking to calculate bounding boxes of stuff hanging on the ceiling or floor.
Since EntityHanging is a NMS class, I think it might be best to ignore bounding box calculation for the up and down faces until a solution can be found.