Merge branch 'master' into vehicles
This commit is contained in:
@ -28,13 +28,13 @@ public class Gate {
|
||||
//Gate materials
|
||||
private Material portalOpenBlock;
|
||||
private Material portalClosedBlock;
|
||||
private Material portalButton;
|
||||
private final Material portalButton;
|
||||
|
||||
// Economy information
|
||||
private int useCost;
|
||||
private int createCost;
|
||||
private int destroyCost;
|
||||
private boolean toOwner;
|
||||
private final int useCost;
|
||||
private final int createCost;
|
||||
private final int destroyCost;
|
||||
private final boolean toOwner;
|
||||
|
||||
/**
|
||||
* Instantiates a new gate
|
||||
|
@ -25,9 +25,9 @@ public class GateHandler {
|
||||
private static final Character EXIT = '*';
|
||||
private static final Character CONTROL_BLOCK = '-';
|
||||
|
||||
private static Material defaultPortalBlockOpen = Material.NETHER_PORTAL;
|
||||
private static Material defaultPortalBlockClosed = Material.AIR;
|
||||
private static Material defaultButton = Material.STONE_BUTTON;
|
||||
private static final Material defaultPortalBlockOpen = Material.NETHER_PORTAL;
|
||||
private static final Material defaultPortalBlockClosed = Material.AIR;
|
||||
private static final Material defaultButton = Material.STONE_BUTTON;
|
||||
|
||||
private static final HashMap<String, Gate> gates = new HashMap<>();
|
||||
private static final HashMap<Material, List<Gate>> controlBlocks = new HashMap<>();
|
||||
@ -162,7 +162,7 @@ public class GateHandler {
|
||||
int useCost = readConfig(config, fileName, "usecost", -1);
|
||||
int createCost = readConfig(config, fileName, "createcost", -1);
|
||||
int destroyCost = readConfig(config, fileName, "destroycost", -1);
|
||||
boolean toOwner = (config.containsKey("toowner") ? Boolean.valueOf(config.get("toowner")) : EconomyHandler.toOwner);
|
||||
boolean toOwner = (config.containsKey("toowner") ? Boolean.parseBoolean(config.get("toowner")) : EconomyHandler.toOwner);
|
||||
|
||||
Gate gate = new Gate(fileName, new GateLayout(layout), types, portalOpenBlock, portalClosedBlock, portalButton, useCost,
|
||||
createCost, destroyCost, toOwner);
|
||||
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||
*/
|
||||
public class GateLayout {
|
||||
|
||||
private Character [][] layout;
|
||||
private final Character [][] layout;
|
||||
private final List<RelativeBlockVector> exits = new ArrayList<>();
|
||||
private RelativeBlockVector[] entrances = new RelativeBlockVector[0];
|
||||
private RelativeBlockVector[] border = new RelativeBlockVector[0];
|
||||
|
@ -64,11 +64,11 @@ public class Portal {
|
||||
private String destination;
|
||||
private String lastDestination = "";
|
||||
private String network;
|
||||
private String ownerName;
|
||||
private final String ownerName;
|
||||
private UUID ownerUUID;
|
||||
private boolean verified;
|
||||
private boolean fixed;
|
||||
private Map<PortalOption, Boolean> options;
|
||||
private final Map<PortalOption, Boolean> options;
|
||||
|
||||
// In-use information
|
||||
private Player player;
|
||||
|
@ -931,7 +931,7 @@ public class PortalHandler {
|
||||
}
|
||||
}
|
||||
PortalHandler.unregisterPortal(portal, false);
|
||||
Stargate.log.info(Stargate.getString("prefix") + "Destroying stargate at " + portal.toString());
|
||||
Stargate.log.info(Stargate.getString("prefix") + "Destroying stargate at " + portal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user