From 4ca732f9abfa9bc7e1952c1e07aab349d3c24ee5 Mon Sep 17 00:00:00 2001 From: Andrew Wong <42793301+md5sha256@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:24:40 +1000 Subject: [PATCH] Refactor to use a permission check in the TestGuideCommand --- .../slimefun4/core/commands/TestGuideCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/core/commands/TestGuideCommand.java b/src/test/java/io/github/thebusybiscuit/slimefun4/core/commands/TestGuideCommand.java index 0612ade074..57560503a7 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/core/commands/TestGuideCommand.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/core/commands/TestGuideCommand.java @@ -38,9 +38,9 @@ public static void unload() { void testCommand(boolean op) { Player player = server.addPlayer(); player.setOp(op); + boolean hasPermission = player.hasPermission("slimefun.command.guide"); server.execute("slimefun", player, "guide").assertSucceeded(); - ItemStack guide = SlimefunGuide.getItem(SlimefunGuideMode.SURVIVAL_MODE); - Assertions.assertEquals(op, SlimefunUtils.containsSimilarItem(player.getInventory(), guide, true)); + Assertions.assertEquals(hasPermission, SlimefunUtils.containsSimilarItem(player.getInventory(), guide, true)); } }