mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2025-10-02 12:37:27 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
3d5aa384b1 | |||
e728777aee | |||
ad932ecdef | |||
6532d6f546 | |||
3bcee64220 |
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.maxgamer</groupId>
|
<groupId>org.maxgamer</groupId>
|
||||||
<artifactId>QuickShop</artifactId>
|
<artifactId>QuickShop</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.3</version>
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}</finalName>
|
<finalName>${project.name}</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
|
@ -37,7 +37,7 @@ public class ConfigManager {
|
|||||||
protected int findDistance = 30;
|
protected int findDistance = 30;
|
||||||
protected Material superItem = Material.GOLD_AXE;
|
protected Material superItem = Material.GOLD_AXE;
|
||||||
protected double feeForPriceChange = 0.0;
|
protected double feeForPriceChange = 0.0;
|
||||||
|
protected boolean preventhopper = false;
|
||||||
/** Use SpoutPlugin to get item / block names */
|
/** Use SpoutPlugin to get item / block names */
|
||||||
protected boolean useSpout = false;
|
protected boolean useSpout = false;
|
||||||
|
|
||||||
@ -65,6 +65,7 @@ public class ConfigManager {
|
|||||||
this.priceChangeRequiresFee = plugin.getConfig().getBoolean("shop.price-change-requires-fee");
|
this.priceChangeRequiresFee = plugin.getConfig().getBoolean("shop.price-change-requires-fee");
|
||||||
this.findDistance = plugin.getConfig().getInt("shop.find-distance");
|
this.findDistance = plugin.getConfig().getInt("shop.find-distance");
|
||||||
this.feeForPriceChange = plugin.getConfig().getDouble("shop.fee-for-price-change");
|
this.feeForPriceChange = plugin.getConfig().getDouble("shop.fee-for-price-change");
|
||||||
|
this.preventhopper = plugin.getConfig().getBoolean("preventhopper");
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getFeeForPriceChange() {
|
public double getFeeForPriceChange() {
|
||||||
@ -107,6 +108,10 @@ public class ConfigManager {
|
|||||||
return logAction;
|
return logAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPreventHopper() {
|
||||||
|
return preventhopper;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPriceChangeRequiresFee() {
|
public boolean isPriceChangeRequiresFee() {
|
||||||
return priceChangeRequiresFee;
|
return priceChangeRequiresFee;
|
||||||
}
|
}
|
||||||
|
@ -12,20 +12,17 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.inventory.Inventory;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.BlockIterator;
|
import org.bukkit.util.BlockIterator;
|
||||||
import org.maxgamer.QuickShop.QuickShop;
|
import org.maxgamer.QuickShop.QuickShop;
|
||||||
import org.maxgamer.QuickShop.Shop.Info;
|
import org.maxgamer.QuickShop.Shop.Info;
|
||||||
import org.maxgamer.QuickShop.Shop.Shop;
|
import org.maxgamer.QuickShop.Shop.Shop;
|
||||||
import org.maxgamer.QuickShop.Shop.ShopAction;
|
import org.maxgamer.QuickShop.Shop.ShopAction;
|
||||||
import org.maxgamer.QuickShop.Util.MarkUtil;
|
|
||||||
import org.maxgamer.QuickShop.Util.MsgUtil;
|
import org.maxgamer.QuickShop.Util.MsgUtil;
|
||||||
import org.maxgamer.QuickShop.Util.Util;
|
import org.maxgamer.QuickShop.Util.Util;
|
||||||
|
|
||||||
@ -120,21 +117,6 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onItemClick(final InventoryClickEvent e) {
|
|
||||||
final Player p = (Player) e.getWhoClicked();
|
|
||||||
final ItemStack ci = e.getCurrentItem();
|
|
||||||
final Inventory inv = e.getInventory();
|
|
||||||
final int solt = e.getSlot();
|
|
||||||
try {
|
|
||||||
if (MarkUtil.hasMark(ci)) {
|
|
||||||
inv.setItem(solt, new ItemStack(Material.AIR));
|
|
||||||
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法获取快捷商店悬浮物品 已清理...");
|
|
||||||
}
|
|
||||||
} catch (final Exception ex) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onJoin(final PlayerJoinEvent e) {
|
public void onJoin(final PlayerJoinEvent e) {
|
||||||
// Notify the player any messages they were sent
|
// Notify the player any messages they were sent
|
||||||
|
@ -1,28 +1,81 @@
|
|||||||
package org.maxgamer.QuickShop.Listeners;
|
package org.maxgamer.QuickShop.Listeners;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||||
|
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||||
|
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.maxgamer.QuickShop.QuickShop;
|
||||||
import org.maxgamer.QuickShop.Util.MarkUtil;
|
import org.maxgamer.QuickShop.Util.MarkUtil;
|
||||||
|
|
||||||
public class ProtectListener {
|
public class ProtectListener implements Listener {
|
||||||
|
|
||||||
|
private final QuickShop plugin;
|
||||||
|
|
||||||
|
public ProtectListener(final QuickShop plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInvMove(final InventoryMoveItemEvent e) {
|
public void onInvMove(final InventoryMoveItemEvent e) {
|
||||||
final ItemStack ci = e.getItem();
|
final ItemStack ci = e.getItem();
|
||||||
if (MarkUtil.hasMark(ci)) {
|
if (MarkUtil.hasMark(ci)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
final ItemStack[] items = e.getSource().getContents();
|
||||||
|
for (final ItemStack itemStack : items) {
|
||||||
|
if (MarkUtil.hasMark(itemStack)) {
|
||||||
|
itemStack.setType(Material.AIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.getSource().setContents(items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @EventHandler
|
@EventHandler
|
||||||
// public void onInvPickup(final InventoryPickupItemEvent e) {
|
public void onInvPickup(final InventoryPickupItemEvent e) {
|
||||||
// final ItemStack ci = e.getItem().getItemStack();
|
if (!plugin.getConfigManager().isPreventHopper()) {
|
||||||
// if (MarkUtil.hasMark(ci)) {
|
return;
|
||||||
// e.setCancelled(true);
|
}
|
||||||
// }
|
final ItemStack ci = e.getItem().getItemStack();
|
||||||
// }
|
if (MarkUtil.hasMark(ci)) {
|
||||||
|
e.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onItemClick(final InventoryClickEvent e) {
|
||||||
|
final Player p = (Player) e.getWhoClicked();
|
||||||
|
final ItemStack ci = e.getCurrentItem();
|
||||||
|
final Inventory inv = e.getInventory();
|
||||||
|
final int solt = e.getSlot();
|
||||||
|
try {
|
||||||
|
if (MarkUtil.hasMark(ci)) {
|
||||||
|
inv.setItem(solt, new ItemStack(Material.AIR));
|
||||||
|
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法 §d§l获取 " + ci.getItemMeta().getDisplayName() + " §a已清理...");
|
||||||
|
}
|
||||||
|
} catch (final Exception ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerHandlerItem(final PlayerItemHeldEvent e) {
|
||||||
|
final Player p = e.getPlayer();
|
||||||
|
final ItemStack[] cis = p.getInventory().getArmorContents();
|
||||||
|
for (final ItemStack itemStack : cis) {
|
||||||
|
if (MarkUtil.hasMark(itemStack)) {
|
||||||
|
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法 §e§l穿戴 " + itemStack.getItemMeta().getDisplayName() + " §a已清理...");
|
||||||
|
itemStack.setType(Material.AIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p.getInventory().setArmorContents(cis);
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerPickup(final PlayerPickupItemEvent e) {
|
public void onPlayerPickup(final PlayerPickupItemEvent e) {
|
||||||
@ -31,5 +84,4 @@ public class ProtectListener {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
import org.maxgamer.QuickShop.Command.QS;
|
import org.maxgamer.QuickShop.Command.QS;
|
||||||
@ -38,6 +39,7 @@ import org.maxgamer.QuickShop.Listeners.ChatListener;
|
|||||||
import org.maxgamer.QuickShop.Listeners.ChunkListener;
|
import org.maxgamer.QuickShop.Listeners.ChunkListener;
|
||||||
import org.maxgamer.QuickShop.Listeners.LockListener;
|
import org.maxgamer.QuickShop.Listeners.LockListener;
|
||||||
import org.maxgamer.QuickShop.Listeners.PlayerListener;
|
import org.maxgamer.QuickShop.Listeners.PlayerListener;
|
||||||
|
import org.maxgamer.QuickShop.Listeners.ProtectListener;
|
||||||
import org.maxgamer.QuickShop.Listeners.WorldListener;
|
import org.maxgamer.QuickShop.Listeners.WorldListener;
|
||||||
import org.maxgamer.QuickShop.Shop.ContainerShop;
|
import org.maxgamer.QuickShop.Shop.ContainerShop;
|
||||||
import org.maxgamer.QuickShop.Shop.Shop;
|
import org.maxgamer.QuickShop.Shop.Shop;
|
||||||
@ -72,6 +74,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
// Listeners (These don't)
|
// Listeners (These don't)
|
||||||
private final BlockListener blockListener = new BlockListener(this);
|
private final BlockListener blockListener = new BlockListener(this);
|
||||||
private final PlayerListener playerListener = new PlayerListener(this);
|
private final PlayerListener playerListener = new PlayerListener(this);
|
||||||
|
private final ProtectListener protectListener = new ProtectListener(this);
|
||||||
private final ChunkListener chunkListener = new ChunkListener(this);
|
private final ChunkListener chunkListener = new ChunkListener(this);
|
||||||
private final WorldListener worldListener = new WorldListener(this);
|
private final WorldListener worldListener = new WorldListener(this);
|
||||||
private BukkitTask itemWatcherTask;
|
private BukkitTask itemWatcherTask;
|
||||||
@ -246,6 +249,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
/* Load shops from database to memory */
|
/* Load shops from database to memory */
|
||||||
int count = 0; // Shops count
|
int count = 0; // Shops count
|
||||||
|
int unload = 0;
|
||||||
Connection con;
|
Connection con;
|
||||||
try {
|
try {
|
||||||
getLogger().info("从数据库载入商店数据...");
|
getLogger().info("从数据库载入商店数据...");
|
||||||
@ -269,7 +273,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
final double price = rs.getDouble("price");
|
final double price = rs.getDouble("price");
|
||||||
final Location loc = new Location(world, x, y, z);
|
final Location loc = new Location(world, x, y, z);
|
||||||
/* Skip invalid shops, if we know of any */
|
/* Skip invalid shops, if we know of any */
|
||||||
if (world != null && (loc.getBlock().getState() instanceof InventoryHolder) == false) {
|
if (world != null && loc.getChunk().isLoaded() && (loc.getBlock().getState() instanceof InventoryHolder) == false) {
|
||||||
getLogger().info("商店不是一个可存储的方块 坐标 " + rs.getString("world") + " at: " + x + ", " + y + ", " + z + ". 删除...");
|
getLogger().info("商店不是一个可存储的方块 坐标 " + rs.getString("world") + " at: " + x + ", " + y + ", " + z + ". 删除...");
|
||||||
final PreparedStatement delps = getDB().getConnection().prepareStatement("DELETE FROM shops WHERE x = ? AND y = ? and z = ? and world = ?");
|
final PreparedStatement delps = getDB().getConnection().prepareStatement("DELETE FROM shops WHERE x = ? AND y = ? and z = ? and world = ?");
|
||||||
delps.setInt(1, x);
|
delps.setInt(1, x);
|
||||||
@ -288,6 +292,8 @@ public class QuickShop extends JavaPlugin {
|
|||||||
shop.onLoad();
|
shop.onLoad();
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
|
} catch (final IllegalStateException e) {
|
||||||
|
unload++;
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
errors++;
|
errors++;
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -303,6 +309,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
} else {
|
} else {
|
||||||
getLogger().warning("过多的错误数据 可能您的数据库文件已损坏! 请检查数据库文件!");
|
getLogger().warning("过多的错误数据 可能您的数据库文件已损坏! 请检查数据库文件!");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,14 +318,15 @@ public class QuickShop extends JavaPlugin {
|
|||||||
getLogger().warning("错误信息: " + e.getMessage());
|
getLogger().warning("错误信息: " + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
getLogger().info("已载入 " + count + " 个商店 剩余 " + unload + " 个商店将在区块载入后加载...");
|
||||||
getLogger().info("已载入 " + count + " 个商店...");
|
|
||||||
MsgUtil.loadTransactionMessages();
|
MsgUtil.loadTransactionMessages();
|
||||||
MsgUtil.clean();
|
MsgUtil.clean();
|
||||||
// Register events
|
// Register events
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(blockListener, this);
|
final PluginManager pm = this.getServer().getPluginManager();
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(playerListener, this);
|
pm.registerEvents(blockListener, this);
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(worldListener, this);
|
pm.registerEvents(playerListener, this);
|
||||||
|
pm.registerEvents(worldListener, this);
|
||||||
|
pm.registerEvents(protectListener, this);
|
||||||
if (configManager.isDisplay()) {
|
if (configManager.isDisplay()) {
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(chunkListener, this);
|
Bukkit.getServer().getPluginManager().registerEvents(chunkListener, this);
|
||||||
// Display item handler thread
|
// Display item handler thread
|
||||||
@ -334,6 +342,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
if (configManager.getFindDistance() > 100) {
|
if (configManager.getFindDistance() > 100) {
|
||||||
getLogger().warning("商店查找半径过大 可能导致服务器Lag! 推荐使用低于 100 的配置!");
|
getLogger().warning("商店查找半径过大 可能导致服务器Lag! 推荐使用低于 100 的配置!");
|
||||||
}
|
}
|
||||||
|
this.getLogger().info("载入完成! 版本: " + this.getDescription().getVersion() + " 重制 by 喵♂呜");
|
||||||
new VersionChecker(this);
|
new VersionChecker(this);
|
||||||
try {
|
try {
|
||||||
final Metrics metrics = new Metrics(this);
|
final Metrics metrics = new Metrics(this);
|
||||||
|
@ -17,9 +17,9 @@ import cn.citycraft.PluginHelper.config.FileConfig;
|
|||||||
import mkremins.fanciful.FancyMessage;
|
import mkremins.fanciful.FancyMessage;
|
||||||
|
|
||||||
public class MsgUtil {
|
public class MsgUtil {
|
||||||
private static QuickShop plugin;
|
|
||||||
private static FileConfig messages;
|
private static FileConfig messages;
|
||||||
private static HashMap<String, LinkedList<String>> player_messages = new HashMap<String, LinkedList<String>>();
|
private static HashMap<String, LinkedList<String>> player_messages = new HashMap<String, LinkedList<String>>();
|
||||||
|
private static QuickShop plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes any messages that are older than a week in the database, to save
|
* Deletes any messages that are older than a week in the database, to save
|
||||||
@ -141,7 +141,7 @@ public class MsgUtil {
|
|||||||
final double tax = plugin.getConfig().getDouble("tax");
|
final double tax = plugin.getConfig().getDouble("tax");
|
||||||
final double total = amount * shop.getPrice();
|
final double total = amount * shop.getPrice();
|
||||||
if (tax != 0) {
|
if (tax != 0) {
|
||||||
if (!p.getUniqueId().equals(shop.getOwner())) {
|
if (!p.getName().equals(shop.getOwner())) {
|
||||||
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.sell-tax", "" + Util.format((tax * total))));
|
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.sell-tax", "" + Util.format((tax * total))));
|
||||||
} else {
|
} else {
|
||||||
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.sell-tax-self"));
|
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.sell-tax-self"));
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.maxgamer.QuickShop.Util;
|
package org.maxgamer.QuickShop.Util;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -26,11 +25,11 @@ import org.maxgamer.QuickShop.Config.ItemConfig;
|
|||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class Util {
|
public class Util {
|
||||||
private static HashSet<Material> tools = new HashSet<Material>();
|
|
||||||
private static HashSet<Material> blacklist = new HashSet<Material>();
|
private static HashSet<Material> blacklist = new HashSet<Material>();
|
||||||
private static HashSet<Material> shoppables = new HashSet<Material>();
|
|
||||||
private static HashSet<Material> transparent = new HashSet<Material>();
|
|
||||||
private static QuickShop plugin;
|
private static QuickShop plugin;
|
||||||
|
private static HashSet<Material> shoppables = new HashSet<Material>();
|
||||||
|
private static HashSet<Material> tools = new HashSet<Material>();
|
||||||
|
private static HashSet<Material> transparent = new HashSet<Material>();
|
||||||
|
|
||||||
public static void addTransparentBlock(final Material m) {
|
public static void addTransparentBlock(final Material m) {
|
||||||
if (transparent.add(m) == false) {
|
if (transparent.add(m) == false) {
|
||||||
@ -228,8 +227,7 @@ public class Util {
|
|||||||
public static String getToolPercentage(final ItemStack item) {
|
public static String getToolPercentage(final ItemStack item) {
|
||||||
final double dura = item.getDurability();
|
final double dura = item.getDurability();
|
||||||
final double max = item.getType().getMaxDurability();
|
final double max = item.getType().getMaxDurability();
|
||||||
final DecimalFormat formatter = new DecimalFormat("0");
|
return String.format("%.2f(%s/%s)", (1 - dura / max) * 100.0, dura, max);
|
||||||
return dura + "/" + max + "(" + formatter.format((1 - dura / max) * 100.0) + ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
Version: 1.0
|
Version: 1.1
|
||||||
|
|
||||||
#超级工具(OP可以用该工具在创造模式打破所有商店)
|
#超级工具(OP可以用该工具在创造模式打破所有商店)
|
||||||
superitem: GOLD_AXE
|
superitem: GOLD_AXE
|
||||||
|
#阻止漏洞吸取商店物品(非特殊情况不要开启)
|
||||||
|
preventhopper: false
|
||||||
|
|
||||||
#Tax amount (decimal) - Eg, P1 buys $50 worth of stuff from P2. Therefore, P1 loses $50, P2 gains $(1-0.05)*50, and tax-account gains $(0.05)*50.
|
#Tax amount (decimal) - Eg, P1 buys $50 worth of stuff from P2. Therefore, P1 loses $50, P2 gains $(1-0.05)*50, and tax-account gains $(0.05)*50.
|
||||||
tax: 0.05
|
tax: 0.05
|
||||||
|
@ -4,6 +4,7 @@ main: ${project.groupId}.${project.artifactId}.${project.artifactId}
|
|||||||
version: ${project.version}
|
version: ${project.version}
|
||||||
authors: [Netherfoam,Timtower, KaiNoMood,喵♂呜]
|
authors: [Netherfoam,Timtower, KaiNoMood,喵♂呜]
|
||||||
softdepend: [Vault]
|
softdepend: [Vault]
|
||||||
|
website: http://ci.sumcraft.net:8080/job/${project.artifactId}/
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
qs:
|
qs:
|
||||||
|
Reference in New Issue
Block a user