mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-28 12:35:41 +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)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onPlayerBucketFill(PlayerBucketFillEvent event) {
|
public void onPlayerBucketFill(PlayerBucketFillEvent event) {
|
||||||
String materialName = event.getBlockClicked().getType().toString().toLowerCase().replace("stationary_", ""); // STATIONARY_WATER -> water
|
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)) {
|
if (permissionDenied(event.getPlayer(), "modifyworld.bucket.fill", materialName)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user