mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Added block damage support to //replace and //replacenear
This commit is contained in:
@ -115,4 +115,26 @@ public class BaseBlock {
|
||||
public void flip(FlipDirection direction) {
|
||||
data = (char)BlockData.flip(type, data, direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof BaseBlock)) {
|
||||
return false;
|
||||
}
|
||||
return (type == ((BaseBlock)o).type) && (data == ((BaseBlock)o).data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BaseBlock id: " + getType() + " with damage: " + getData();
|
||||
}
|
||||
|
||||
public boolean inIterable(Iterable<BaseBlock> iter) {
|
||||
for (BaseBlock block : iter) {
|
||||
if (block.equals(this)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user