Skip to content

Commit 13fbec7

Browse files
committed
ensure that the position starts with 1
1 parent 6cf0197 commit 13fbec7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/me/hsgamer/bettergui/util/SlotUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static Optional<Position> getPosition(Map<String, Object> map) {
3333
Optional<Integer> x = Validate.getNumber(String.valueOf(map.get(POS_X))).map(BigDecimal::intValue);
3434
Optional<Integer> y = Validate.getNumber(String.valueOf(map.get(POS_Y))).map(BigDecimal::intValue);
3535
if (x.isPresent() && y.isPresent()) {
36-
return Optional.of(Position.of(x.get(), y.get()));
36+
return Optional.of(Position.of(x.get() - 1, y.get() - 1));
3737
}
3838
}
3939
return Optional.empty();

0 commit comments

Comments
 (0)