Cleans up permissions a lot and adds missing permissions to plugin.yml
Removes the checking of both parent and child by adding the child permissions to plugin.yml Cleans comments in the PermissionHelper class Renames hasPermDeep to hasPermissionImplicit as I finally understand how it's supposed to work Adds missing unmock() to prevent test errors Adds a ton of permissions which were mentioned in the code, but did not exist in the plugin.yml
This commit is contained in:
@ -6,6 +6,7 @@ import be.seeseemelk.mockbukkit.WorldMock;
|
||||
import net.knarcraft.stargate.Stargate;
|
||||
import net.knarcraft.stargate.container.RelativeBlockVector;
|
||||
import org.bukkit.Material;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@ -27,6 +28,11 @@ public class GateLayoutTest {
|
||||
layout = GateHandler.getGateByName("nethergate.gate").getLayout();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
public static void tearDown() {
|
||||
MockBukkit.unmock();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void gateLayoutExitTest() {
|
||||
assertEquals(new RelativeBlockVector(1, 3, 0), layout.getExit());
|
||||
|
@ -2,6 +2,7 @@ package net.knarcraft.stargate.utility;
|
||||
|
||||
import be.seeseemelk.mockbukkit.MockBukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -13,6 +14,11 @@ public class MaterialHelperTest {
|
||||
MockBukkit.mock();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
public static void tearDown() {
|
||||
MockBukkit.unmock();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isWallCoralTest() {
|
||||
Assertions.assertTrue(MaterialHelper.isWallCoral(Material.DEAD_BRAIN_CORAL_WALL_FAN));
|
||||
|
Reference in New Issue
Block a user