Removes the unused frameBlocks variable and isGateBlock

This commit is contained in:
Kristian Knarvik 2021-09-11 16:44:55 +02:00
parent a6fb7dcb62
commit 5c601710e7

View File

@ -32,7 +32,6 @@ public class GateHandler {
private static final HashMap<String, Gate> gates = new HashMap<>(); private static final HashMap<String, Gate> gates = new HashMap<>();
private static final HashMap<Material, List<Gate>> controlBlocks = new HashMap<>(); private static final HashMap<Material, List<Gate>> controlBlocks = new HashMap<>();
private static final HashSet<Material> frameBlocks = new HashSet<>();
private GateHandler() { private GateHandler() {
@ -139,9 +138,6 @@ public class GateHandler {
return null; return null;
} }
//Update list of all frame blocks
frameBlocks.addAll(frameTypes);
gate.save(parentFolder + "/"); // Updates format for version changes gate.save(parentFolder + "/"); // Updates format for version changes
return gate; return gate;
} }
@ -470,23 +466,12 @@ public class GateHandler {
return gates.size(); return gates.size();
} }
/**
* Checks whether the given material is used for the frame of any portals
*
* @param type <p>The material type to check</p>
* @return <p>True if the material is used for the frame of at least one portal</p>
*/
public static boolean isGateBlock(Material type) {
return frameBlocks.contains(type);
}
/** /**
* Clears all loaded gates * Clears all loaded gates
*/ */
public static void clearGates() { public static void clearGates() {
gates.clear(); gates.clear();
controlBlocks.clear(); controlBlocks.clear();
frameBlocks.clear();
} }
} }