mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Use WE Expressions instead of js evaluation (#2941)
* Implement thread-safe expression evaluation * Update `{args}` to `plot` automatically * Stringify more money/balance/price occurrences with EconHandler#format
This commit is contained in:
@ -36,6 +36,7 @@ import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
@Singleton public class BukkitEconHandler extends EconHandler {
|
||||
|
||||
@ -84,6 +85,11 @@ import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
return plotArea.useEconomy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String format(double balance) {
|
||||
return this.econ.format(balance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user