mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
feat: 木牌第一行显示配置文件的guititle内容
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
b10c601ce7
commit
9fce7de6b4
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.maxgamer</groupId>
|
||||
<artifactId>QuickShop</artifactId>
|
||||
<version>1.9.2</version>
|
||||
<version>1.9.3</version>
|
||||
<description>快捷商店重置版本...</description>
|
||||
<build>
|
||||
<finalName>${project.name}</finalName>
|
||||
@ -60,9 +60,9 @@
|
||||
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
||||
<update.description>&a全新版本 &c虚拟悬浮物(橙子提供 对 就是那个汉化COI的逗比)&e7老板修复逗比BUG...</update.description>
|
||||
<update.changes>
|
||||
&b1.9.3 - &a木牌第一行显示配置文件的guititle内容...;
|
||||
&b1.9.2 - &c修复一个在删除商店时导致的报错...;
|
||||
&b1.9.1 - &c修复同一个玩家的商店直接漏洞不能传递的问题...;
|
||||
&b1.9.0 - &c修复1.9开始以后不允许异步更新木牌的问题...;
|
||||
</update.changes>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
@ -5,8 +5,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -22,14 +20,16 @@ import org.maxgamer.QuickShop.QuickShop;
|
||||
import org.maxgamer.QuickShop.Util.MsgUtil;
|
||||
import org.maxgamer.QuickShop.Util.Util;
|
||||
|
||||
import cn.citycraft.PluginHelper.kit.PKit;
|
||||
import cn.citycraft.PluginHelper.kit.PluginKit;
|
||||
|
||||
public class ContainerShop implements Shop {
|
||||
private final QuickShop plugin = (QuickShop) PKit.i();
|
||||
private final String signTitle = plugin.getConfigManager().getGuiTitle();
|
||||
private DisplayItem displayItem;
|
||||
private final ItemStack item;
|
||||
private final Location loc;
|
||||
private String owner;
|
||||
private final QuickShop plugin;
|
||||
private double price;
|
||||
private ShopType shopType;
|
||||
private boolean unlimited;
|
||||
@ -52,7 +52,6 @@ public class ContainerShop implements Shop {
|
||||
this.price = price;
|
||||
this.owner = owner;
|
||||
this.item = item.clone();
|
||||
this.plugin = (QuickShop) Bukkit.getPluginManager().getPlugin("QuickShop");
|
||||
this.item.setAmount(1);
|
||||
if (plugin.getConfigManager().isDisplay()) {
|
||||
if (plugin.getConfigManager().isFakeItem()) {
|
||||
@ -69,7 +68,6 @@ public class ContainerShop implements Shop {
|
||||
this.shopType = s.shopType;
|
||||
this.item = s.item;
|
||||
this.loc = s.loc;
|
||||
this.plugin = s.plugin;
|
||||
this.unlimited = s.unlimited;
|
||||
this.owner = s.owner;
|
||||
this.price = s.price;
|
||||
@ -379,7 +377,7 @@ public class ContainerShop implements Shop {
|
||||
continue;
|
||||
}
|
||||
final Sign sign = (Sign) b.getState();
|
||||
if (sign.getLine(0).contains("[QuickShop]")) {
|
||||
if (sign.getLine(0).contains("[QuickShop]") || sign.getLine(0).contains(signTitle)) {
|
||||
signs.add(sign);
|
||||
} else {
|
||||
boolean text = false;
|
||||
@ -610,7 +608,7 @@ public class ContainerShop implements Shop {
|
||||
@Override
|
||||
public void run() {
|
||||
final String[] lines = new String[4];
|
||||
lines[0] = ChatColor.RED + "[QuickShop]";
|
||||
lines[0] = signTitle;
|
||||
if (shop.isBuying()) {
|
||||
final int remsp = shop.getRemainingSpace();
|
||||
lines[1] = MsgUtil.p("signs.buying", "" + (remsp == 10000 ? "无限" : remsp));
|
||||
@ -659,8 +657,7 @@ public class ContainerShop implements Shop {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("商店 " + (loc.getWorld() == null ? "世界尚未载入" : "坐标: " + loc.getWorld().getName()) + "(" + loc.getBlockX() + ", " + loc.getBlockY() + ", "
|
||||
+ loc.getBlockZ() + ")");
|
||||
final StringBuilder sb = new StringBuilder("商店 " + (loc.getWorld() == null ? "世界尚未载入" : "坐标: " + loc.getWorld().getName()) + "(" + loc.getBlockX() + ", " + loc.getBlockY() + ", " + loc.getBlockZ() + ")");
|
||||
sb.append(" 所有者: " + getOwner());
|
||||
if (isUnlimited()) {
|
||||
sb.append(" 无限模式: true");
|
||||
|
Loading…
Reference in New Issue
Block a user