Browse Source

Update to ChestShop 3.12

master
Phoenix616 2 years ago
parent
commit
3cc406db26
No known key found for this signature in database GPG Key ID: 40E2321E71738EB0
3 changed files with 11 additions and 5 deletions
  1. +1
    -1
      pom.xml
  2. +10
    -2
      src/main/java/de/themoep/chestshoptools/ShopInfoCommand.java
  3. +0
    -2
      src/main/java/de/themoep/chestshoptools/Utils.java

+ 1
- 1
pom.xml View File

@@ -36,7 +36,7 @@
<dependency>
<groupId>com.acrobot.chestshop</groupId>
<artifactId>chestshop</artifactId>
<version>3.11.1-SNAPSHOT</version>
<version>3.12-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>


+ 10
- 2
src/main/java/de/themoep/chestshoptools/ShopInfoCommand.java View File

@@ -2,10 +2,11 @@ package de.themoep.chestshoptools;

import com.Acrobot.Breeze.Utils.MaterialUtil;
import com.Acrobot.Breeze.Utils.NumberUtil;
import com.Acrobot.ChestShop.ChestShop;
import com.Acrobot.ChestShop.Configuration.Messages;
import com.Acrobot.ChestShop.Events.AccountQueryEvent;
import com.Acrobot.ChestShop.Events.ItemInfoEvent;
import com.Acrobot.ChestShop.Signs.ChestShopSign;
import com.Acrobot.ChestShop.UUIDs.NameManager;
import com.Acrobot.ChestShop.Utils.uBlock;
import de.themoep.ShowItem.api.ItemDataTooLongException;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
@@ -77,7 +78,14 @@ public class ShopInfoCommand implements CommandExecutor {
String prices = shopSign.getLine(ChestShopSign.PRICE_LINE);
String material = shopSign.getLine(ChestShopSign.ITEM_LINE);

String ownerName = NameManager.getFullUsername(name);
AccountQueryEvent queryEvent = new AccountQueryEvent(name);
ChestShop.callEvent(queryEvent);
if (queryEvent.getAccount() == null) {
Messages.INVALID_SHOP_DETECTED.sendWithPrefix(sender);
return true;
}

String ownerName = queryEvent.getAccount().getName();
ownerName = ownerName != null ? ownerName : name;
ItemStack item = MaterialUtil.getItem(material);



+ 0
- 2
src/main/java/de/themoep/chestshoptools/Utils.java View File

@@ -1,7 +1,5 @@
package de.themoep.chestshoptools;

import java.util.logging.Level;

/**
* Copyright 2016 Max Lee (https://github.com/Phoenix616/)
* <p/>


Loading…
Cancel
Save