mirror of
https://github.com/Artillex-Studios/AxTrade.git
synced 2025-01-04 18:47:51 +01:00
1.1.1
This commit is contained in:
parent
bd508c1d5e
commit
f66d9edad3
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.artillexstudios</groupId>
|
||||
<artifactId>AxTrade</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>AxTrade</name>
|
||||
|
@ -53,7 +53,7 @@ public class PlaceholderCurrencyHook implements CurrencyHook {
|
||||
final OfflinePlayer pl = Bukkit.getOfflinePlayer(player);
|
||||
if (pl.getName() == null) return;
|
||||
final String placeholder = section.getString("settings.give-command")
|
||||
.replace("%amount%", "" + amount)
|
||||
.replace("%amount%", parseNumber(amount))
|
||||
.replace("%player%", pl.getName());
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), placeholder);
|
||||
}
|
||||
@ -63,8 +63,12 @@ public class PlaceholderCurrencyHook implements CurrencyHook {
|
||||
final OfflinePlayer pl = Bukkit.getOfflinePlayer(player);
|
||||
if (pl.getName() == null) return;
|
||||
final String placeholder = section.getString("settings.take-command")
|
||||
.replace("%amount%", "" + amount)
|
||||
.replace("%amount%", parseNumber(amount))
|
||||
.replace("%player%", pl.getName());
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), placeholder);
|
||||
}
|
||||
|
||||
private String parseNumber(double amount) {
|
||||
return usesDouble() ? "" + amount : "" + Math.round(amount);
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ public class PlayerInteractEntityListener implements Listener {
|
||||
public void onClick(@NotNull PlayerInteractEntityEvent event) {
|
||||
if (!CONFIG.getBoolean("shift-click-send-request", true)) return;
|
||||
final Player player = event.getPlayer();
|
||||
if (!player.hasPermission("axtrade.trade")) return;
|
||||
|
||||
if (cd.containsKey(player) && System.currentTimeMillis() - cd.get(player) < 100L) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user