mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-21 11:26:13 +01:00
Fixed material name for milking check ("modifyworld.bucket.fill.milk")
This commit is contained in:
parent
aacbeeab65
commit
b26ce6491b
@ -108,6 +108,11 @@ public class PlayerListener extends ModifyworldListener {
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerBucketFill(PlayerBucketFillEvent event) {
|
||||
String materialName = event.getBlockClicked().getType().toString().toLowerCase().replace("stationary_", ""); // STATIONARY_WATER -> water
|
||||
|
||||
if ("air".equals(materialName)) { // This should be milk
|
||||
materialName = "milk";
|
||||
}
|
||||
|
||||
if (permissionDenied(event.getPlayer(), "modifyworld.bucket.fill", materialName)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user