Remove air from unsafe-blocks.

That causes issues in force blocks mode and is checked internally already.
This commit is contained in:
Phoenix616 2022-12-10 15:07:33 +01:00
parent 8b282d5e76
commit 29f709a73e
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
2 changed files with 8 additions and 3 deletions

View File

@ -102,7 +102,7 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
.map(s -> {
Material mat = Material.matchMaterial(s);
if (mat == null) {
getLogger().log(Level.WARNING, "Error in save-blocks config! No material found with name " + s);
getLogger().log(Level.WARNING, "Error in safe blocks config! No material found with name " + s);
}
return mat;
})
@ -118,7 +118,13 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
.map(s -> {
Material mat = Material.matchMaterial(s);
if (mat == null) {
getLogger().log(Level.WARNING, "Error in unsave-blocks config! No material found with name " + s);
getLogger().log(Level.WARNING, "Error in unsafe blocks config! No material found with name " + s);
}
// Air was in the default for a while now but will cause issues. Don't allow that.
if (mat == Material.AIR) {
getLogger().log(Level.WARNING, "Your list of unsafe blocks contained 'air'!" +
" This will cause issues and has not been loaded. Remove it from your config to remove this warning!");
return null;
}
return mat;
})

View File

@ -26,7 +26,6 @@ safe-blocks:
# Blocks not to teleport on or into
unsafe-blocks:
- air
- water
- lava
- oak_sapling