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:
2021-10-28 18:29:33 +02:00
parent 3fc0e6963a
commit 544384f69b
10 changed files with 231 additions and 142 deletions

View File

@ -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());