Prevents loading of gate files using non-blocks as part of the border
This commit is contained in:
parent
2ed0fe7817
commit
f92fd2de5d
@ -395,6 +395,7 @@ portalInfoServer=Server: %server%
|
|||||||
players accidentally losing the creatures during teleportation
|
players accidentally losing the creatures during teleportation
|
||||||
- Fixes a potential exception when a gate's open-block or closed-block is set to a material which isn't a block
|
- Fixes a potential exception when a gate's open-block or closed-block is set to a material which isn't a block
|
||||||
- Fixes a potential exception when a portal without a sign has an invalid gate type
|
- Fixes a potential exception when a portal without a sign has an invalid gate type
|
||||||
|
- Prevents loading of gate files using non-blocks as part of the border
|
||||||
|
|
||||||
#### \[Version 0.9.2.1] EpicKnarvik97 fork
|
#### \[Version 0.9.2.1] EpicKnarvik97 fork
|
||||||
|
|
||||||
|
@ -69,6 +69,15 @@ public class Gate {
|
|||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a copy of the character to material mapping for this gate
|
||||||
|
*
|
||||||
|
* @return <p>The character to material map</p>
|
||||||
|
*/
|
||||||
|
public Map<Character, Material> getCharacterMaterialMap() {
|
||||||
|
return new HashMap<>(characterMaterialMap);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the material type used for this gate's control blocks
|
* Gets the material type used for this gate's control blocks
|
||||||
*
|
*
|
||||||
|
@ -209,6 +209,14 @@ public class GateHandler {
|
|||||||
Stargate.logSevere(String.format(failString, "Gate closed block must be a type of block."));
|
Stargate.logSevere(String.format(failString, "Gate closed block must be a type of block."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Material material : gate.getCharacterMaterialMap().values()) {
|
||||||
|
if (!material.isBlock()) {
|
||||||
|
Stargate.logSevere(String.format(failString, "Every gate border block must be a type of block."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user