Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMicky-FR committed Jun 28, 2020
1 parent 230a9b8 commit 99ef96d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.inventory.ItemStack;


public class ExampleInventory extends FastInv {

private boolean preventClose = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/mrmicky/fastinv/FastInv.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public int[] getBorders() {
*/
public int[] getCorners() {
int size = inventory.getSize();
return IntStream.range(0, size).filter(i -> i % 9 == 0 && (i < 10 || i > size - 19) || (i - 1) % 9 == 0 && (i < 2 || i > size - 9) || (i - 7) % 9 == 0 && (i < 9 || i > size - 3) || (i - 8) % 9 == 0 && (i < 18 || i > size - 11)).toArray();
return IntStream.range(0, size).filter(i -> i < 2 || (i > 6 && i < 10) || i == 17 || i == size - 18 || (i > size - 11 && i < size - 7) || i > size - 3).toArray();
}

/**
Expand Down

0 comments on commit 99ef96d

Please sign in to comment.