Add function like Java Edition