Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .changelog/SNAPSHOTS/6.3.0.0-SNAPSHOT-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@
- "TROPICAL_FISH/BASE_COLOR"

## Internal Changes
- Adjusted trade ui to use a stock variable instead of the cache, this should fix issues where stock information was sometimes inaccurate while not sacrificing performance.
- Adjusted trade ui to use a stock variable instead of the cache, this should fix issues where stock information was sometimes inaccurate while not sacrificing performance.
- A very minor improvement in the find subcommand, skips doing a sqrt and playerAuthorize test for shops that are outside of the max distance.(Thanks to Warriorrrr)

## Bug Fixes
- Corrected UI not showing correct items for potions and books
- Fixed issue where display-type 3 wasn't showing on rejoin
- Fixed issue with lower MC versions not being compatible with 6.3.0.0
- Fixed issue iwth lower versions of MC and protocollib not working.
- Fixed an issue where a warning was thrown during the first database initialization.(Thanks to YuanYuanOwO)
- Fix shop preview locales being sticky(Thanks to Warriorrrr)
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
snapshot_tag:
description: "Snapshot tag/version, example: snapshot/6.3.0.0-8"
description: "Snapshot tag/version, example: snapshot/6.3.0.0-SNAPSHOT-8"
required: true
type: string

Expand Down
2 changes: 1 addition & 1 deletion addon/reremake-migrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -396,7 +396,7 @@
<plugin>
<groupId>io.takari.maven.plugins</groupId>
<artifactId>takari-lifecycle-plugin</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<proc>proc</proc>
Expand Down Expand Up @@ -459,7 +459,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.38</version>
<version>1.18.46</version>
<scope>provided</scope>
</dependency>
<!-- SLF4J is a real dickhead. -->
Expand Down
2 changes: 1 addition & 1 deletion quickshop-bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<properties>
<tnml.version>1.7.0.1-SNAPSHOT-5</tnml.version>
<tnil.version>0.1.3.1-SNAPSHOT-1</tnil.version>
<tnil.version>0.2.0.0-SNAPSHOT-3</tnil.version>
</properties>

<artifactId>quickshop-bukkit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ public void open(final PageOpenCallback open) {
final ItemStack shopItem = shop.get().getItem();
final int shopItemSlot = shopItemConfig != null? shopItemConfig.getSlot() : 4;
final AbstractItemStack<ItemStack> shopItemStack = QuickShop.getInstance().stack(shopItem);
if(shopItem.getItemMeta() instanceof final EnchantmentStorageMeta enchantmentStorageMeta) {

final LinkedList<Component> lore = new LinkedList<>();
for(final Map.Entry<Enchantment, Integer> entry : enchantmentStorageMeta.getStoredEnchants().entrySet()) {

lore.add(Util.enchantmentDataToComponent(entry.getKey(), entry.getValue()));
}
shopItemStack.lore(lore);
}
open.getPage().addIcon(new IconBuilder(shopItemStack).withSlot(shopItemSlot).build());

// Always read price directly from shop to get the latest value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public void handle(final PageOpenCallback open) {
// Set up our borders from config (gray for modern look)
final String borderMaterial = (borderConfig != null)? borderConfig.getMaterial() : "GRAY_STAINED_GLASS_PANE";
final IconBuilder borderBuilder = new IconBuilder(QuickShop.getInstance().stack().of(borderMaterial, 1));

// Get border rows from config or use defaults (rows 1, 4, 6 for modern 6-row layout)
final List<Integer> borderRows = (borderConfig != null)? borderConfig.getRows() : List.of(1, 4, 6);
for(final int row : borderRows) {
Expand Down Expand Up @@ -128,15 +127,6 @@ public void handle(final PageOpenCallback open) {
final int shopItemSlot = (shopItemConfig != null)? shopItemConfig.getSlot() : 13;

final AbstractItemStack<ItemStack> shopItemStack = QuickShop.getInstance().stack(shopItem);
if(shopItem.getItemMeta() instanceof final EnchantmentStorageMeta enchantmentStorageMeta) {

final LinkedList<Component> lore = new LinkedList<>();
for(final Map.Entry<Enchantment, Integer> entry : enchantmentStorageMeta.getStoredEnchants().entrySet()) {

lore.add(Util.enchantmentDataToComponent(entry.getKey(), entry.getValue()));
}
shopItemStack.lore(lore);
}

open.getPage().addIcon(new IconBuilder(shopItemStack).withSlot(shopItemSlot).build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ public void checkDisplay() {
return;
}
}

if(this.displayItem != null) {
if(!this.displayItem.isSpawned()) {
/* Not spawned yet. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import org.joml.AxisAngle4f;
import org.joml.Vector3f;

import java.util.concurrent.TimeUnit;

import static com.ghostchu.quickshop.shop.display.display.DisplayEntityItemManager.DISPLAY_ITEM_KEY_INSTANCE;

/**
Expand Down Expand Up @@ -215,7 +217,6 @@ public void remove(final boolean dontTouchWorld) {
}

if (isSpawned()) {

isSpawned = false;

if(QuickShop.getInstance().getDisplayManager() instanceof DisplayEntityItemManager) {
Expand Down Expand Up @@ -293,7 +294,10 @@ public void spawn() {
}

initEntities();
sendFakeItemToAll();
//sendFakeItemToAll();
QuickShop.folia().getScheduler().runAtLocationLater(getDisplayLocation(), task -> {
sendFakeItemToAll();
}, 1, TimeUnit.SECONDS);

isSpawned = true;
}
Expand All @@ -311,6 +315,7 @@ public void sendFakeItemToPlayer(final Player player) {
public void sendFakeItemToAll() {

for(final Player player : Bukkit.getOnlinePlayers()) {

player.showEntity(QuickShop.getInstance().getJavaPlugin(), itemDisplay);
player.showEntity(QuickShop.getInstance().getJavaPlugin(), interactionEntity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,19 @@ public DisplayEntityDisplayItem create(@NotNull final Shop shop) {

final ShopChunk chunk = SimpleShopChunk.fromLocation(shop.bukkitLocation());

return chunksMapping
.computeIfAbsent(chunk, k -> new ConcurrentHashMap<>())
//output if display is in chunks map

return chunksMapping.computeIfAbsent(chunk, k -> new ConcurrentHashMap<>())
.computeIfAbsent(shop.bukkitLocation().hashCode(),
k -> new DisplayEntityDisplayItem(shop, chunk));
}

public void addPlayer(final Player player) {

chunksMapping.values().forEach(map ->map.values().forEach(display -> display.sendFakeItemToPlayer(player)));
final ShopChunk chunk = SimpleShopChunk.fromLocation(player.getLocation());
chunksMapping.computeIfPresent(chunk, (k, v) -> {
v.values().forEach(display -> display.sendFakeItemToPlayer(player));
return v;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ public PacketContainer createTextDisplaySpawnPacket(final int id, @NotNull final
packet.getDoubles().write(0, location.getX());
packet.getDoubles().write(1, location.getY());
packet.getDoubles().write(2, location.getZ());

packet.getIntegers().write(4, 0);
packet.getIntegers().write(5, 0);
return packet;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ public PacketContainer createTextDisplaySpawnPacket(final int id, @NotNull final
packet.getDoubles().write(0, location.getX());
packet.getDoubles().write(1, location.getY());
packet.getDoubles().write(2, location.getZ());

packet.getIntegers().write(4, 0);
packet.getIntegers().write(5, 0);
return packet;
}

Expand Down
1 change: 0 additions & 1 deletion quickshop-bukkit/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ limits:
shop-blocks:
- CHEST
- TRAPPED_CHEST
- ENDER_CHEST
- BARREL

shop:
Expand Down
Loading