mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 02:57:37 +01:00
Merge pull request #110 from MrBretze/patch-1
Added withProperties in BlockAlternative.java
This commit is contained in:
commit
5eb5f32095
@ -31,6 +31,16 @@ public class BlockAlternative {
|
||||
return map;
|
||||
}
|
||||
|
||||
public String getProperty(String key) {
|
||||
for (String p : properties) {
|
||||
String[] parts = p.split("=");
|
||||
if (parts.length > 1)
|
||||
if (parts[0].equals(key))
|
||||
return parts[1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BlockAlternative{" +
|
||||
|
Loading…
Reference in New Issue
Block a user