mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-25 18:47:40 +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
@ -30,6 +30,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() {
|
||||
|
Loading…
Reference in New Issue
Block a user