mirror of
https://github.com/Artillex-Studios/AxTrade.git
synced 2025-01-07 19:17:53 +01:00
Progress
This commit is contained in:
parent
ba1e3fb28b
commit
b1132eb6b4
33
pom.xml
33
pom.xml
@ -30,7 +30,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.5.3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<shadedPattern>com.artillexstudios.axtrade.libs.gui</shadedPattern>
|
<shadedPattern>com.artillexstudios.axtrade.libs.gui</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>net.kyori.adventure</pattern>
|
<pattern>net.kyori</pattern>
|
||||||
<shadedPattern>com.artillexstudios.axtrade.libs.kyori</shadedPattern>
|
<shadedPattern>com.artillexstudios.axtrade.libs.kyori</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
<relocation>
|
||||||
@ -109,8 +109,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.artillexstudios.axapi</groupId>
|
<groupId>com.artillexstudios.axapi</groupId>
|
||||||
<artifactId>axapi</artifactId>
|
<artifactId>axapi</artifactId>
|
||||||
<version>1.4.136</version>
|
<version>1.4.224</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
<classifier>all</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
@ -127,7 +128,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.11.3</version>
|
<version>2.11.5</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -136,6 +137,30 @@
|
|||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.kyori</groupId>
|
||||||
|
<artifactId>adventure-platform-bukkit</artifactId>
|
||||||
|
<version>4.3.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.kyori</groupId>
|
||||||
|
<artifactId>adventure-text-minimessage</artifactId>
|
||||||
|
<version>4.16.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.kyori</groupId>
|
||||||
|
<artifactId>adventure-text-serializer-legacy</artifactId>
|
||||||
|
<version>4.16.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.kyori</groupId>
|
||||||
|
<artifactId>adventure-api</artifactId>
|
||||||
|
<version>4.16.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.aglerr.mobcoins</groupId>
|
<groupId>me.aglerr.mobcoins</groupId>
|
||||||
|
@ -26,6 +26,8 @@ public class Trade {
|
|||||||
this.player2 = new TradePlayer(this, p2);
|
this.player2 = new TradePlayer(this, p2);
|
||||||
player1.setOtherPlayer(player2);
|
player1.setOtherPlayer(player2);
|
||||||
player2.setOtherPlayer(player1);
|
player2.setOtherPlayer(player1);
|
||||||
|
|
||||||
|
HistoryUtils.writeToHistory(String.format("Started: %s - %s", player1.getPlayer().getName(), player2.getPlayer().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
@ -43,6 +45,7 @@ public class Trade {
|
|||||||
if (itemStack == null) return;
|
if (itemStack == null) return;
|
||||||
player2.getPlayer().getInventory().addItem(itemStack);
|
player2.getPlayer().getInventory().addItem(itemStack);
|
||||||
});
|
});
|
||||||
|
HistoryUtils.writeToHistory(String.format("Aborted: %s - %s", player1.getPlayer().getName(), player2.getPlayer().getName()));
|
||||||
MESSAGEUTILS.sendLang(player1.getPlayer(), "trade.aborted", Map.of("%player%", player2.getPlayer().getName()));
|
MESSAGEUTILS.sendLang(player1.getPlayer(), "trade.aborted", Map.of("%player%", player2.getPlayer().getName()));
|
||||||
MESSAGEUTILS.sendLang(player2.getPlayer(), "trade.aborted", Map.of("%player%", player1.getPlayer().getName()));
|
MESSAGEUTILS.sendLang(player2.getPlayer(), "trade.aborted", Map.of("%player%", player1.getPlayer().getName()));
|
||||||
SoundUtils.playSound(player1.getPlayer(), "aborted");
|
SoundUtils.playSound(player1.getPlayer(), "aborted");
|
||||||
|
@ -23,14 +23,14 @@ public class ItemBuilderUtil {
|
|||||||
final ItemBuilder builder = new ItemBuilder(section);
|
final ItemBuilder builder = new ItemBuilder(section);
|
||||||
|
|
||||||
section.getOptionalString("name").ifPresent((name) -> {
|
section.getOptionalString("name").ifPresent((name) -> {
|
||||||
if (ClassUtils.classExists("me.clip.placeholderapi.PlaceholderAPI")) {
|
if (ClassUtils.INSTANCE.classExists("me.clip.placeholderapi.PlaceholderAPI")) {
|
||||||
name = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(player, name);
|
name = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(player, name);
|
||||||
}
|
}
|
||||||
builder.setName(name, replacements);
|
builder.setName(name, replacements);
|
||||||
});
|
});
|
||||||
|
|
||||||
section.getOptionalStringList("lore").ifPresent((lore) -> {
|
section.getOptionalStringList("lore").ifPresent((lore) -> {
|
||||||
if (ClassUtils.classExists("me.clip.placeholderapi.PlaceholderAPI")) {
|
if (ClassUtils.INSTANCE.classExists("me.clip.placeholderapi.PlaceholderAPI")) {
|
||||||
lore = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(player, lore);
|
lore = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(player, lore);
|
||||||
}
|
}
|
||||||
builder.setLore(lore, replacements);
|
builder.setLore(lore, replacements);
|
||||||
|
@ -15,7 +15,7 @@ public class ShulkerUtils {
|
|||||||
final BlockStateMeta meta = (BlockStateMeta) item.getItemMeta();
|
final BlockStateMeta meta = (BlockStateMeta) item.getItemMeta();
|
||||||
if (meta.getBlockState() instanceof ShulkerBox) {
|
if (meta.getBlockState() instanceof ShulkerBox) {
|
||||||
final ShulkerBox shulker = (ShulkerBox) meta.getBlockState();
|
final ShulkerBox shulker = (ShulkerBox) meta.getBlockState();
|
||||||
if (ClassUtils.classExists("com.artillexstudios.axshulkers.utils.ShulkerUtils") && com.artillexstudios.axshulkers.utils.ShulkerUtils.getShulkerUUID(item) != null) {
|
if (ClassUtils.INSTANCE.classExists("com.artillexstudios.axshulkers.utils.ShulkerUtils") && com.artillexstudios.axshulkers.utils.ShulkerUtils.getShulkerUUID(item) != null) {
|
||||||
return com.artillexstudios.axshulkers.AxShulkers.getDB().getShulker(com.artillexstudios.axshulkers.utils.ShulkerUtils.getShulkerUUID(item));
|
return com.artillexstudios.axshulkers.AxShulkers.getDB().getShulker(com.artillexstudios.axshulkers.utils.ShulkerUtils.getShulkerUUID(item));
|
||||||
}
|
}
|
||||||
return shulker.getInventory().getContents();
|
return shulker.getInventory().getContents();
|
||||||
|
@ -11,7 +11,7 @@ command-aliases:
|
|||||||
- "trade"
|
- "trade"
|
||||||
|
|
||||||
# the time after clicking the trade confirm button before the trade finishes
|
# the time after clicking the trade confirm button before the trade finishes
|
||||||
trade-confirm-seconds: 10
|
trade-confirm-seconds: 5
|
||||||
|
|
||||||
# how fast should trade requests expire?
|
# how fast should trade requests expire?
|
||||||
trade-request-expire-seconds: 60
|
trade-request-expire-seconds: 60
|
||||||
|
@ -60,7 +60,6 @@ own:
|
|||||||
- "�ffdd&l> �ffddClick &8- �ffddChange Amount"
|
- "�ffdd&l> �ffddClick &8- �ffddChange Amount"
|
||||||
currency2:
|
currency2:
|
||||||
slot: 3
|
slot: 3
|
||||||
# you need Vault installed for this
|
|
||||||
currency: "Experience"
|
currency: "Experience"
|
||||||
material: "EXPERIENCE_BOTTLE"
|
material: "EXPERIENCE_BOTTLE"
|
||||||
name: "�ffdd&lᴇxᴘᴇʀɪᴇɴᴄᴇ"
|
name: "�ffdd&lᴇxᴘᴇʀɪᴇɴᴄᴇ"
|
||||||
|
Loading…
Reference in New Issue
Block a user