Open TheAwoo opened 3 years ago
Update
Managed to debug and reproduce the issue on my end. As it turns out, some economy plugins do not provide a meaningful implementation of Economy.format(double)
and instead just return null
.
That, in turn, causes the following code to throw on a null value:
switch (placeholder) {
case BUY_PRICE:
replace = plugin.getEconomy().format(getBuyPrice()); // sets replace to null
break;
case SELL_PRICE:
replace = plugin.getEconomy().format(getSellPrice()); // also sets replace to null
break;
default:
replace = String.valueOf(placeholders.get(placeholder));
}
format = format.replace(placeholder.toString(), replace); // consumes the null and throws
Despite the issue being caused by incomplete implementations of Economy
in other plugins I'd still recommend handling this case more gracefully, perhaps even printing out a message to nag the authors of used econ plugin to provide a proper format
implementation.
The issue
Created shops display no holograms whatsoever. Still able to buy/sell; player balance changes properly.
PaperMC version: paper-1.16.5-428
Plugin version: Build #99
Hologram format config:
Relevant logs:
on using a shop