geforkt von Mirrors/FastAsyncWorldEdit
Removed unnecessary valid block checking (already in LocalWorld)
Dieser Commit ist enthalten in:
Ursprung
a313f2e93e
Commit
c99d64cfa0
@ -40,16 +40,6 @@ public abstract class ServerInterface {
|
|||||||
*/
|
*/
|
||||||
public abstract boolean isValidMobType(String type);
|
public abstract boolean isValidMobType(String type);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether a block has a valid ID.
|
|
||||||
*
|
|
||||||
* @param type
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean isValidBlockType(int type) {
|
|
||||||
return !((type > 32 && type < 35) || type == 36 || type == 29 || type > 96);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload WorldEdit configuration.
|
* Reload WorldEdit configuration.
|
||||||
*/
|
*/
|
||||||
|
@ -289,7 +289,7 @@ public class WorldEdit {
|
|||||||
blockId = blockType.getID();
|
blockId = blockType.getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!server.isValidBlockType(blockId)) {
|
if (!player.getWorld().isValidBlockType(blockId)) {
|
||||||
throw new UnknownItemException(arg);
|
throw new UnknownItemException(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,11 +43,6 @@ public class BukkitServerInterface extends ServerInterface {
|
|||||||
return CreatureType.fromName(type) != null;
|
return CreatureType.fromName(type) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isValidBlockType(int type) {
|
|
||||||
return Material.getMaterial(type) != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload() {
|
public void reload() {
|
||||||
plugin.loadConfiguration();
|
plugin.loadConfiguration();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren