X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FProfile.java;h=0c86732fb4a979f872620933dbeabfd6f50e5382;hb=2090deb8b70b2d7e1399fb1233f46c2579379a48;hp=64aeae4ccd212e6c05d54915632590662e352cd5;hpb=3abc078471d7e7516599eda01de011a23c328d63;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Profile.java b/src/main/java/net/pterodactylus/sone/data/Profile.java index 64aeae4..0c86732 100644 --- a/src/main/java/net/pterodactylus/sone/data/Profile.java +++ b/src/main/java/net/pterodactylus/sone/data/Profile.java @@ -318,6 +318,19 @@ public class Profile implements Fingerprintable { /** * Sets the value of the field with the given name. * + * @param fieldIndex + * The index of the field + * @param value + * The value of the field + */ + public void setField(int fieldIndex, String value) { + Validation.begin().isGreaterOrEqual("Field Index", fieldIndex, 0).isLess("Field Index", fieldIndex, fields.size()).check(); + setField(fields.get(fieldIndex), value); + } + + /** + * Sets the value of the field with the given name. + * * @param field * The name of the field * @param value