mirror of
https://github.com/songoda/EpicVouchers.git
synced 2025-01-09 01:17:39 +01:00
Second hotfix for: SD-3014.
This time, it REALLY fixed the problem.
This commit is contained in:
parent
19abda9d85
commit
e0e7cab543
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicVouchers"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "2.1.4"
|
||||
version: "2.1.5"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -18,7 +18,6 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.songoda.epicvouchers.utils.Methods.format;
|
||||
@ -144,15 +143,15 @@ public class Voucher {
|
||||
public void give(CommandSender sender, List<Player> players, int amount) {
|
||||
|
||||
String giveMessage = instance.getLocale().getMessage("command.give.send")
|
||||
.replaceAll(Pattern.quote("%player%"), players.size() == 1 ? players.get(0).getName() : "everyone")
|
||||
.replaceAll(Pattern.quote("%voucher%"), Matcher.quoteReplacement(getName(true)))
|
||||
.replaceAll(Pattern.quote("%amount%"), String.valueOf(amount));
|
||||
.replaceAll("%player%", players.size() == 1 ? players.get(0).getName() : "everyone")
|
||||
.replaceAll("%voucher%", Matcher.quoteReplacement(getName(true)))
|
||||
.replaceAll("%amount%", String.valueOf(amount));
|
||||
|
||||
for (Player player : players) {
|
||||
String receiveMessage = instance.getLocale().getMessage("command.give.receive")
|
||||
.replaceAll(Pattern.quote("%voucher%"), getName(true))
|
||||
.replaceAll(Pattern.quote("%player%"), player.getName())
|
||||
.replaceAll(Pattern.quote("%amount%"), String.valueOf(amount));
|
||||
.replaceAll("%voucher%", Matcher.quoteReplacement(getName(true)))
|
||||
.replaceAll("%player%", player.getName())
|
||||
.replaceAll("%amount%", String.valueOf(amount));
|
||||
|
||||
VoucherReceiveEvent event = new VoucherReceiveEvent(player, getName(true), toItemStack(amount), amount, sender);
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
|
Loading…
Reference in New Issue
Block a user