Hi guys, i recently started a server with some friends and decided to make use of my Java knowledge. I'll make it quick.. i was trying to do a plugin capable of planting crops in the area adjacent to the hand-planted one, so i thought a 4-ways flood-fill algorithm could work, and it probably does, but for some reason it just doesn't stop, it keeps going on quickly getting my cpu to 100% usage. This is the code i'm using: Code: EDIT: solved Note that i preferred to use a queue instead of a recursive implementation because of java limited stack capacity. I don't know why it's not stopping, theoretically once it starts encountering blocks that aren't farmland or that are covered by something else, it shouldn't add more blocks to the queue, but it just keeps going. I can't provide an error log because there are no errors, it just keeps going on. Also, if you search for the flood-fill algorithm you'll notice that: in the floodFill method there are some checks before the queue thing, but i skipped them because if the player plants a crop and the event is not cancelled, then i already know that the first blockBelow is farmland, while the others need to be checked. My question is, am i doing something wrong on the java end, or is there some bukkit knowledge i'm missing?