mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-03 19:00:30 +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{
|
||||
initTools(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.
|
||||
// TODO: Add registry for further BlockPropertiesSetup instances.
|
||||
try{
|
||||
BlockPropertiesSetup bpSetup = new BlocksMC1_5();
|
||||
try{
|
||||
|
@ -379,6 +368,17 @@ public class BlockProperties {
|
|||
}
|
||||
}
|
||||
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){
|
||||
LogUtil.logSevere(t);
|
||||
|
|
Loading…
Reference in New Issue
Block a user