private Stage stop() {
if (tube.size() == 0)
return null;
// Check which mode the pump should operate in.
FurnaceInventory inventory = ((Furnace) anchor.getRelative(backward).getBlock().getState()).getInventory();
ItemStack item = inventory.getFuel();
if (item != null && item.getType() == filledBucketMaterial) {
if (filledBucketMaterial == Material.WATER_BUCKET && anchor.getWorld().getEnvironment() == World.Environment.NETHER && !player.hasPermission("machinapump.nether-water")) {
player.sendMessage("You do not have permission to pour water with a pump in the nether.");
return new Retract();
} else if (filledBucketMaterial == Material.LAVA_BUCKET && !player.hasPermission("machinapump.lava.fill")) {
player.sendMessage("You do not have permission to pour lava with a pump.");
return new Retract();
}
return new Fill();
}
if (liquidMaterial == Material.LAVA && !player.hasPermission("machinapump.lava.drain")) {
player.sendMessage("You do not have permission to drain lava with a pump.");
return new Retract();
}
return new Drain();
}
Pump.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:StarQuestCode
作者:
评论列表
文章目录