Fixed material name for milking check ("modifyworld.bucket.fill.milk")

This commit is contained in:
t3hk0d3 2012-06-08 09:49:20 +04:00
parent aacbeeab65
commit b26ce6491b

View File

@ -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);
}