import { Player } from "@minecraft/server";
import { ModalFormData } from "@minecraft/server-ui";

/**
 * @param {Player} player 
 * @param {String} propId 
 * @param {Number} propCurrentValue 
 * @param {Number} propMinValue 
 * @param {Number} porpMaxValue 
 */
export function intPropTestForm(player,propId,propCurrentValue,propMinValue,porpMaxValue){
	new ModalFormData()
	.title("intPropTestForm")
	.slider("prop",propMinValue,porpMaxValue,{valueStep:1,defaultValue:propCurrentValue})
	.show(player)
	.then(res => {
		if(res.canceled) return;

		player.setProperty(propId,res.formValues[0]);
		
	});
}