im haveing a problem running a setline command witch i want to set the line of a sign with.. it isn't doing anything
This is the part of the code that has the setline method in it it will run with a few other things when the player will give the input (the "if (SignEvent.isNumericArray(times))" is true for sure and the code is running i did check that )
if (SignEvent.isNumericArray(times)){
double uses = Double.parseDouble(times);
uses = uses -1;
sign.setLine(2 , uses + "/" + str[1] + parts[1]);
if (uses <= 0){
sign.setLine(0, ChatColor.STRIKETHROUGH + "StartPayment");
}
}
i did check a few things :
checked by doing e.getPlayer().sendMessage(sign.getLine(0));
it worked..i just have no idea what could i do to fix it i tried a lot of things and im pretty sure the problem is in the
sign.setLine(2 , uses + "/" + str[1] + parts[1]);
line
any one have any idea for what did i do wrong ?
Note: no matter where in this method i put the setline method or with what string/lineIndex ,it isn't doing anything
I think you have to execute sign.update(); after a modification to apply changes.