mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Consistent exception catching in BlockSign#activate() and #deactivate()
This commit is contained in:
parent
f19417ceeb
commit
82cb68c3b5
@ -125,7 +125,12 @@ public class BlockSign extends Rocker {
|
||||
@Override
|
||||
public void deactivate() {
|
||||
getSign().getBlock().setType(offBlock.getMaterial());
|
||||
MagicValueUtil.setBlockData(getSign().getBlock(), offBlockData);
|
||||
try {
|
||||
MagicValueUtil.setBlockData(getSign().getBlock(), offBlockData);
|
||||
} catch (IllegalArgumentException exception) {
|
||||
markAsErroneous("onBlock data value " + offBlockData + " cannot be applied to given type " + onBlock.getId());
|
||||
return;
|
||||
}
|
||||
active = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user