4 APIv5 DataExtension API by Example
Aurora Lahtela edited this page 2022-10-30 11:23:57 +02:00

Plan Header

APIv5 - DataExtension API Examples

Images on this page have been taken using redesigned interface that will arrive in version 5.0

CodePlayer page / Server Page
Shift + Scroll to scroll the table sideways
// Code block to see the images clearly
@PluginInfo(
        name = "Example Extension",
        iconName = "check-circle",
        iconFamily = Family.REGULAR,
        color = Color.PURPLE
)

image

image

@BooleanProvider(
        text = "Displayed"
)
public boolean displayed(UUID playerUUID) {
    return true;
}

image

image

@BooleanProvider(
        text = "Displayed"
)
public boolean displayed(UUID playerUUID) {
    return false;
}

image

image

@BooleanProvider(
        text = "Description",
        description = "This provider has a description"
)
public boolean description(UUID playerUUID) {
    return true;
}

image

image

@BooleanProvider(
        text = "Shown in player table",
        showInPlayerTable = true
)
public boolean showInPlayerTable(UUID playerUUID) {
    return true;
}

image

image

@NumberProvider(
        text = "Number"
)
public long number(UUID playerUUID) {
    return 5;
}

image

image image

@NumberProvider(
        text = "Timestamp",
        format = FormatType.DATE_SECOND
)
public long timestamp(UUID playerUUID) {
    return System.currentTimeMillis();
}

image

Nothing

@NumberProvider(
        text = "Time",
        format = FormatType.TIME_MILLISECONDS
)
public long time(UUID playerUUID) {
    return TimeUnit.DAYS.toMillis(31) + 3333333;
}

image

image

@DoubleProvider(
        text = "Decimals"
)
public double decimals(UUID playerUUID) {
    return 4321.43241325342;
}

image

to be continued after image upload rate limit is reset


Example Example