mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-13 11:41:52 +01:00
Added withProperties in BlockAlternative.java
Example: blockAlternative.withProperties("facing"); Return the facing of the block a empty string
This commit is contained in:
parent
d83abcef85
commit
18ce3625c7
@ -31,6 +31,16 @@ public class BlockAlternative {
|
||||
return map;
|
||||
}
|
||||
|
||||
public String withProperties(String key) {
|
||||
for (String p : properties) {
|
||||
String[] parts = p.split("=");
|
||||
if (parts.length > 1)
|
||||
if (parts[0].equals(key))
|
||||
return parts[1];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BlockAlternative{" +
|
||||
|
Loading…
Reference in New Issue
Block a user