Add final keywords
This commit is contained in:
parent
88642327e3
commit
b74ead594f
@ -30,10 +30,10 @@ import org.bukkit.block.data.type.WallSign;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class Blox {
|
public class Blox {
|
||||||
private int x;
|
private final int x;
|
||||||
private int y;
|
private final int y;
|
||||||
private int z;
|
private final int z;
|
||||||
private World world;
|
private final World world;
|
||||||
private Blox parent = null;
|
private Blox parent = null;
|
||||||
|
|
||||||
public Blox (World world, int x, int y, int z) {
|
public Blox (World world, int x, int y, int z) {
|
||||||
|
@ -39,18 +39,18 @@ public class Gate {
|
|||||||
private static final Character ANYTHING = ' ';
|
private static final Character ANYTHING = ' ';
|
||||||
private static final Character ENTRANCE = '.';
|
private static final Character ENTRANCE = '.';
|
||||||
private static final Character EXIT = '*';
|
private static final Character EXIT = '*';
|
||||||
private static HashMap<String, Gate> gates = new HashMap<>();
|
private static final HashMap<String, Gate> gates = new HashMap<>();
|
||||||
private static HashMap<Material, ArrayList<Gate>> controlBlocks = new HashMap<>();
|
private static final HashMap<Material, ArrayList<Gate>> controlBlocks = new HashMap<>();
|
||||||
private static HashSet<Material> frameBlocks = new HashSet<>();
|
private static final HashSet<Material> frameBlocks = new HashSet<>();
|
||||||
|
|
||||||
private String filename;
|
private final String filename;
|
||||||
private Character[][] layout;
|
private final Character[][] layout;
|
||||||
private HashMap<Character, Material> types;
|
private final HashMap<Character, Material> types;
|
||||||
private RelativeBlockVector[] entrances = new RelativeBlockVector[0];
|
private RelativeBlockVector[] entrances = new RelativeBlockVector[0];
|
||||||
private RelativeBlockVector[] border = new RelativeBlockVector[0];
|
private RelativeBlockVector[] border = new RelativeBlockVector[0];
|
||||||
private RelativeBlockVector[] controls = new RelativeBlockVector[0];
|
private RelativeBlockVector[] controls = new RelativeBlockVector[0];
|
||||||
private RelativeBlockVector exitBlock = null;
|
private RelativeBlockVector exitBlock = null;
|
||||||
private HashMap<RelativeBlockVector, Integer> exits = new HashMap<>();
|
private final HashMap<RelativeBlockVector, Integer> exits = new HashMap<>();
|
||||||
private Material portalBlockOpen = Material.NETHER_PORTAL;
|
private Material portalBlockOpen = Material.NETHER_PORTAL;
|
||||||
private Material portalBlockClosed = Material.AIR;
|
private Material portalBlockClosed = Material.AIR;
|
||||||
|
|
||||||
|
@ -31,12 +31,12 @@ import java.util.Set;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class LangLoader {
|
public class LangLoader {
|
||||||
private String UTF8_BOM = "\uFEFF";
|
private final String UTF8_BOM = "\uFEFF";
|
||||||
// Variables
|
// Variables
|
||||||
private String datFolder;
|
private final String datFolder;
|
||||||
private String lang;
|
private String lang;
|
||||||
private HashMap<String, String> strList;
|
private HashMap<String, String> strList;
|
||||||
private HashMap<String, String> defList;
|
private final HashMap<String, String> defList;
|
||||||
|
|
||||||
public LangLoader(String datFolder, String lang) {
|
public LangLoader(String datFolder, String lang) {
|
||||||
this.lang = lang;
|
this.lang = lang;
|
||||||
|
@ -70,14 +70,14 @@ public class Portal {
|
|||||||
private static final HashMap<String, Portal> bungeePortals = new HashMap<>();
|
private static final HashMap<String, Portal> bungeePortals = new HashMap<>();
|
||||||
|
|
||||||
// Gate location block info
|
// Gate location block info
|
||||||
private Blox topLeft;
|
private final Blox topLeft;
|
||||||
private int modX;
|
private final int modX;
|
||||||
private int modZ;
|
private final int modZ;
|
||||||
private float rotX;
|
private final float rotX;
|
||||||
private Axis rot;
|
private final Axis rot;
|
||||||
|
|
||||||
// Block references
|
// Block references
|
||||||
private Blox id;
|
private final Blox id;
|
||||||
private Blox button;
|
private Blox button;
|
||||||
private Blox[] frame;
|
private Blox[] frame;
|
||||||
private Blox[] entrances;
|
private Blox[] entrances;
|
||||||
@ -87,10 +87,10 @@ public class Portal {
|
|||||||
private String destination;
|
private String destination;
|
||||||
private String lastDest = "";
|
private String lastDest = "";
|
||||||
private String network;
|
private String network;
|
||||||
private Gate gate;
|
private final Gate gate;
|
||||||
private String ownerName = "";
|
private String ownerName = "";
|
||||||
private UUID ownerUUID = null;
|
private UUID ownerUUID = null;
|
||||||
private World world;
|
private final World world;
|
||||||
private boolean verified;
|
private boolean verified;
|
||||||
private boolean fixed;
|
private boolean fixed;
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ public class Stargate extends JavaPlugin {
|
|||||||
private static boolean destroyExplosion = false;
|
private static boolean destroyExplosion = false;
|
||||||
public static int maxGates = 0;
|
public static int maxGates = 0;
|
||||||
private static String langName = "en";
|
private static String langName = "en";
|
||||||
private static int activeTime = 10;
|
private static final int activeTime = 10;
|
||||||
private static int openTime = 10;
|
private static final int openTime = 10;
|
||||||
public static boolean destMemory = false;
|
public static boolean destMemory = false;
|
||||||
public static boolean handleVehicles = true;
|
public static boolean handleVehicles = true;
|
||||||
public static boolean sortLists = false;
|
public static boolean sortLists = false;
|
||||||
|
@ -24,7 +24,7 @@ import net.TheDgtl.Stargate.Portal;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargateAccessEvent extends StargateEvent {
|
public class StargateAccessEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private boolean deny;
|
private boolean deny;
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -26,7 +26,7 @@ import net.TheDgtl.Stargate.Portal;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargateActivateEvent extends StargateEvent {
|
public class StargateActivateEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private ArrayList<String> destinations;
|
private ArrayList<String> destinations;
|
||||||
private String destination;
|
private String destination;
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@ import org.bukkit.event.HandlerList;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargateCreateEvent extends StargateEvent {
|
public class StargateCreateEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private boolean deny;
|
private boolean deny;
|
||||||
private String denyReason;
|
private String denyReason;
|
||||||
private String[] lines;
|
private final String[] lines;
|
||||||
private int cost;
|
private int cost;
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -23,7 +23,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargateDestroyEvent extends StargateEvent {
|
public class StargateDestroyEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private boolean deny;
|
private boolean deny;
|
||||||
private String denyReason;
|
private String denyReason;
|
||||||
private int cost;
|
private int cost;
|
||||||
|
@ -24,7 +24,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargateOpenEvent extends StargateEvent {
|
public class StargateOpenEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private boolean force;
|
private boolean force;
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -25,8 +25,8 @@ import org.bukkit.event.HandlerList;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class StargatePortalEvent extends StargateEvent {
|
public class StargatePortalEvent extends StargateEvent {
|
||||||
private Player player;
|
private final Player player;
|
||||||
private Portal destination;
|
private final Portal destination;
|
||||||
private Location exit;
|
private Location exit;
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user