mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-18 18:01:17 +02:00
Run "hand-picked" before MCAccess, if it implements
BlockPropertiesSetup.
This commit is contained in:
parent
f99e562842
commit
f42817a6f2
@ -355,18 +355,7 @@ public class BlockProperties {
|
|||||||
try{
|
try{
|
||||||
initTools(mcAccess, worldConfigProvider);
|
initTools(mcAccess, worldConfigProvider);
|
||||||
initBlocks(mcAccess, worldConfigProvider);
|
initBlocks(mcAccess, worldConfigProvider);
|
||||||
// Allow mcAccess to setup block properties.
|
|
||||||
if (mcAccess instanceof BlockPropertiesSetup){
|
|
||||||
try{
|
|
||||||
((BlockPropertiesSetup) mcAccess).setupBlockProperties(worldConfigProvider);
|
|
||||||
}
|
|
||||||
catch(Throwable t){
|
|
||||||
LogUtil.logSevere("[NoCheatPlus] McAccess.setupBlockProperties could not execute properly: " + t.getClass().getSimpleName());
|
|
||||||
LogUtil.logSevere(t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Extra hand picked setups.
|
// Extra hand picked setups.
|
||||||
// TODO: Add registry for further BlockPropertiesSetup instances.
|
|
||||||
try{
|
try{
|
||||||
BlockPropertiesSetup bpSetup = new BlocksMC1_5();
|
BlockPropertiesSetup bpSetup = new BlocksMC1_5();
|
||||||
try{
|
try{
|
||||||
@ -379,6 +368,17 @@ public class BlockProperties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Throwable t){}
|
catch(Throwable t){}
|
||||||
|
// Allow mcAccess to setup block properties.
|
||||||
|
if (mcAccess instanceof BlockPropertiesSetup){
|
||||||
|
try{
|
||||||
|
((BlockPropertiesSetup) mcAccess).setupBlockProperties(worldConfigProvider);
|
||||||
|
}
|
||||||
|
catch(Throwable t){
|
||||||
|
LogUtil.logSevere("[NoCheatPlus] McAccess.setupBlockProperties could not execute properly: " + t.getClass().getSimpleName());
|
||||||
|
LogUtil.logSevere(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TODO: Add registry for further BlockPropertiesSetup instances.
|
||||||
}
|
}
|
||||||
catch(Throwable t){
|
catch(Throwable t){
|
||||||
LogUtil.logSevere(t);
|
LogUtil.logSevere(t);
|
||||||
|
Loading…
Reference in New Issue
Block a user