Merge pull request #3 from IronApollo/master

Bypass warning invalid block registered for __RESERVED__
Dieser Commit ist enthalten in:
Jesse Boyd 2018-10-03 14:49:11 +10:00 committet von GitHub
Commit a8a35352cc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -259,7 +259,7 @@ public class DefaultBlockParser extends InputParser<BlockStateHolder> {
if (context.isRestricted()) { if (context.isRestricted()) {
Actor actor = context.requireActor(); Actor actor = context.requireActor();
if (actor != null) { if (actor != null) {
if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().disallowedBlocks.contains(blockType.getId())) { if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().disallowedBlocks.contains(blockType)) {
throw new DisallowedUsageException("You are not allowed to use '" + input + "'"); throw new DisallowedUsageException("You are not allowed to use '" + input + "'");
} }
if (nbt != null) { if (nbt != null) {

Datei anzeigen

@ -1015,7 +1015,7 @@ public enum BlockTypes implements BlockType {
for (BlockTypes type : oldValues) { for (BlockTypes type : oldValues) {
if (!blockMap.containsKey(type.getId())) { if (!blockMap.containsKey(type.getId())) {
type.init(type.getId(), 0, new ArrayList<>()); type.init(type.getId(), 0, new ArrayList<>());
Fawe.debug("Invalid block registered " + type.getId()); if (type != __RESERVED__) Fawe.debug("Invalid block registered " + type.getId());
size++; size++;
} }
if (type != __RESERVED__) { if (type != __RESERVED__) {