Disable respawn anchor explosions separately
Having it tied to TNT was a bad idea, since TNT is sometimes needed for mining and stuff.
This commit is contained in:
parent
654cdbd09a
commit
212f2db61a
|
@ -28,7 +28,7 @@ public abstract class MixinRespawnAnchorBlock extends Block {
|
||||||
|
|
||||||
@Inject(method = "explode", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "explode", at = @At("HEAD"), cancellable = true)
|
||||||
private void onExplode(CallbackInfo ci) {
|
private void onExplode(CallbackInfo ci) {
|
||||||
if (Config.getBool("disableTntExplosions") == true)
|
if (Config.getBool("disableRespawnAnchorExplosions") == true)
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class Config {
|
||||||
json = new JSONObject(jsonRaw);
|
json = new JSONObject(jsonRaw);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("Config not found, creating one");
|
LOGGER.info("Config not found, creating one");
|
||||||
json = new JSONObject("{\"disableTntExplosions\":false,\"spawn\":[0,0,0,0,0,\"\"],\"members\":[]}");
|
json = new JSONObject("{\"disableTntExplosions\":false,\"disableRespawnAnchorExplosions\":false,\"spawn\":[0,0,0,0,0,\"\"],\"members\":[]}");
|
||||||
saveConfig();
|
saveConfig();
|
||||||
}
|
}
|
||||||
LOGGER.info("Configuration loaded");
|
LOGGER.info("Configuration loaded");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user