1
mirror of https://github.com/CarmJos/UltraDepository.git synced 2026-06-05 00:58:22 +08:00

[v1.3.1] 版本更新

- [U] 修改预测仓库配置文件的位置,使其在初次启动时自动生成,避免用户完全不知道还有预设仓库这回事。
This commit is contained in:
2022-01-21 13:03:43 +08:00
parent fa07564548
commit 54cc9c070b
8 changed files with 17 additions and 11 deletions
@@ -6,6 +6,7 @@ import cc.carm.plugin.ultradepository.configuration.PluginMessages;
import cc.carm.plugin.ultradepository.configuration.depository.Depository;
import cc.carm.plugin.ultradepository.configuration.depository.DepositoryItem;
import cc.carm.plugin.ultradepository.event.DepositoryCollectItemEvent;
import cc.carm.plugin.ultradepository.util.JarUtil;
import com.google.common.collect.HashMultimap;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -18,6 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
@@ -45,10 +47,14 @@ public class DepositoryManager {
File folder = new File(UltraDepository.getInstance().getDataFolder(), "depositories");
if (!folder.exists()) {
folder.mkdir();
UltraDepository.getInstance().saveResource(
"depositories/.example-depository.yml", false
);
try {
JarUtil.copyFolderFromJar(
"depositories", UltraDepository.getInstance().getDataFolder(),
JarUtil.CopyOption.COPY_IF_NOT_EXIST
);
} catch (IOException ignore) {
}
} else if (folder.isDirectory()) {
folder.delete();
+129
View File
@@ -0,0 +1,129 @@
name: "&a&l农夫仓库"
capacity:
default: 500 # 若为0则默认不可以使用该仓库
permissions:
- "ud.farmer.vip:1000"
gui:
title: "&a&l农夫仓库"
lines: 6
items:
"INFO":
material: CHEST
data: 0
slot: 49
name: "&2&l背包信息"
lore:
- " "
- "&f仓库最大容量&a %UltraDepository_capacity_farmer%"
- "&f仓库已用容量&a %UltraDepository_used_farmer%"
- "&f仓库剩余容量&a %UltraDepository_usable_farmer%"
- " "
items:
"WHEAT_SEEDS":
slot: 10
price: 0.1
limit: 500
name: "&a&l小麦种子"
"MELON_SEEDS":
slot: 11
price: 0.1
limit: 500
name: "&8&l西瓜种子"
"PUMPKIN_SEEDS":
slot: 12
price: 0.1
limit: 500
name: "&f&l南瓜种子"
"BEETROOT_SEEDS":
slot: 13
price: 0.1
limit: 500
name: "&7&l甜菜种子"
"NETHER_WART":
slot: 14
price: 0.1
limit: 500
name: "&c&l地狱疣"
"COCOA_BEANS":
slot: 15
price: 0.1
limit: 500
name: "&6&l可可豆"
"SWEET_BERRIES":
slot: 16
price: 0.1
limit: 500
name: "&c&l树莓"
"BEETROOT":
slot: 19
price: 0.1
limit: 500
name: "&c&l甜菜根"
"CARROT":
slot: 20
price: 0.1
limit: 500
name: "&6&l胡萝卜"
"POTATO":
slot: 21
price: 0.1
limit: 500
name: "&e&l土豆"
"WHEAT":
slot: 22
price: 0.1
limit: 500
name: "&e&l小麦"
"MELON_SLICE":
slot: 23
price: 0.1
limit: 500
name: "&c&l西瓜片"
"PUMPKIN":
slot: 24
price: 0.1
limit: 500
name: "&6&l南瓜"
"CACTUS":
slot: 25
price: 0.1
limit: 500
name: "&2&l仙人掌"
"POISONOUS_POTATO":
slot: 28
price: 0.1
limit: 500
name: "&a&l毒土豆"
"KELP":
slot: 29
price: 0.1
limit: 500
name: "&2&l海带"
"SUGAR_CANE":
slot: 30
price: 0.1
limit: 500
name: "&a&l甘蔗"
"BAMBOO":
slot: 31
price: 0.1
limit: 500
name: "&a&l竹子"
"VINE":
slot: 32
price: 0.1
limit: 500
name: "&2&l藤蔓"
"CHORUS_FRUIT":
slot: 33
price: 0.1
limit: 500
name: "&d&l紫颂果"
"CHORUS_PLANT":
slot: 34
price: 0.1
limit: 500
name: "&5&l紫颂植株"
@@ -0,0 +1,64 @@
name: "&b&l渔夫仓库"
capacity:
default: 500 # 若为0则默认不可以使用该仓库
permissions:
- "ud.fishman.vip:1000"
gui:
title: "&b&l渔夫仓库"
lines: 4
items:
"INFO":
material: CHEST
data: 0
slot: 31
name: "&9&l背包信息"
lore:
- " "
- "&f仓库最大容量&b %UltraDepository_capacity_fishman%"
- "&f仓库已用容量&b %UltraDepository_used_fishman%"
- "&f仓库剩余容量&b %UltraDepository_usable_fishman%"
- " "
items:
"INK_SAC":
slot: 11
price: 0.1
limit: 500
name: "&8&l墨囊"
lore:
- " "
- "&f抓住墨鱼!"
"TROPICAL_FISH":
slot: 12
price: 0.1
limit: 500
name: "&(#EE7942)&l小丑鱼"
lore:
- " "
- "&f不是小丑!"
"SALMON":
slot: 13
price: 0.1
limit: 500
name: "&c&l鲑鱼"
lore:
- " "
- "&f肉质鲜美!"
"COD":
slot: 14
price: 0.1
limit: 500
name: "&f&l鳕鱼"
lore:
- " "
- "&f十分美味!"
"PUFFERFISH":
slot: 15
price: 0.1
limit: 500
name: "&6&L河豚"
lore:
- " "
- "&f小心有毒!"
+130
View File
@@ -0,0 +1,130 @@
name: "&5&l猎人仓库"
capacity:
default: 500 # 若为0则默认不可以使用该仓库
permissions:
- "ud.hunter.vip:1000"
gui:
title: "&5&l猎人仓库"
lines: 6
items:
"INFO":
material: CHEST
data: 0
slot: 49
name: "&5&l背包信息"
lore:
- " "
- "&f仓库最大容量&d %UltraDepository_capacity_hunter%"
- "&f仓库已用容量&d %UltraDepository_used_hunter%"
- "&f仓库剩余容量&d %UltraDepository_usable_hunter%"
- " "
items:
"CHICKEN":
slot: 10
price: 0.1
limit: 500
name: "&6&l鸡肉"
"PORKCHOP":
slot: 11
price: 0.1
limit: 500
name: "&c&l猪肉"
"BEEF":
slot: 12
price: 0.1
limit: 500
name: "&c&l牛肉"
"MUTTON":
slot: 13
price: 0.1
limit: 500
name: "&6&l羊肉"
"RABBIT":
slot: 14
price: 0.1
limit: 500
name: "&f&l兔肉"
"RABBIT_HIDE":
slot: 15
price: 0.1
limit: 500
name: "&f&l兔子皮"
"LEATHER":
slot: 16
price: 0.1
limit: 500
name: "&c&l皮革"
"EGG":
slot: 19
price: 0.1
limit: 500
name: "&f&l鸡蛋"
"RABBIT_FOOT":
slot: 20
price: 0.1
limit: 500
name: "&f&l兔子脚"
"FEATHER":
slot: 21
price: 0.1
limit: 500
name: "&f&l羽毛"
"GOLD_NUGGET":
slot: 22
price: 0.1
limit: 500
name: "&e&l金粒"
"GHAST_TEAR":
slot: 23
price: 0.1
limit: 500
name: "&7&l恶魂之泪"
"BLAZE_ROD":
slot: 24
price: 0.1
limit: 500
name: "&e&l烈焰棒"
"MAGMA_CREAM":
slot: 25
price: 0.1
limit: 500
name: "&c&l岩浆球"
"SLIME_BALL":
slot: 28
price: 0.1
limit: 500
name: "&a&l粘液球"
"BONE":
slot: 29
price: 0.1
limit: 500
name: "&f&l骨头"
"SPIDER_EYE":
slot: 30
price: 0.1
limit: 500
name: "&4&l蜘蛛眼"
"GUNPOWDER":
slot: 31
price: 0.1
limit: 500
name: "&7&l火药"
"ROTTEN_FLESH":
slot: 32
price: 0.1
limit: 500
name: "&2&l腐肉"
"STRING":
slot: 33
price: 0.1
limit: 500
name: "&f&l线"
"ENDER_PEARL":
slot: 34
price: 0.1
limit: 500
name: "&5&l末影珍珠"
+136
View File
@@ -0,0 +1,136 @@
name: "&e&l矿工仓库"
capacity:
default: 5000 # 若为0则默认不可以使用该仓库
permissions:
- "ud.miner.vip:10000"
gui:
title: "&e&l矿工仓库"
lines: 6
items:
"INFO":
material: CHEST
data: 0
slot: 49
name: "&e&l背包信息"
lore:
- " "
- "&f仓库最大容量&6 %UltraDepository_capacity_miner%"
- "&f仓库已用容量&6 %UltraDepository_used_miner%"
- "&f仓库剩余容量&6 %UltraDepository_usable_miner%"
- " "
items:
"COBBLESTONE":
slot: 11
price: 0.1
limit: 500
name: "&f&l圆石"
lore:
- " "
- "&f方块!"
"IRON_ORE":
slot: 12
price: 0.1
limit: 500
name: "&f&l铁矿"
lore:
- " "
- "&f升级!"
"GOLD_ORE":
slot: 13
price: 0.1
limit: 500
name: "&e&l金矿"
lore:
- " "
- "&f财富!"
"COAL":
slot: 14
price: 0.1
limit: 500
name: "&8&l煤炭"
lore:
- " "
- "&f燃料!"
"FLINT":
slot: 15
price: 0.1
limit: 500
name: "&7&l燧石"
lore:
- " "
- "&f点火!"
"IRON_INGOT":
slot: 20
price: 0.1
limit: 500
name: "&f&l铁锭"
lore:
- " "
- "&f制造!"
"GOLD_INGOT":
slot: 21
price: 0.1
limit: 500
name: "&e&l金锭"
lore:
- " "
- "&f高贵!"
"LAPIS_LAZULI":
slot: 22
price: 0.1
limit: 500
name: "&9&l青金石"
lore:
- " "
- "&f附魔!"
"DIAMOND":
slot: 23
price: 10
limit: 1500
name: "&b&l钻石"
lore:
- " "
- "&f钻石!"
"EMERALD":
slot: 24
price: 10
limit: 1500
name: "&a&l绿宝石"
lore:
- " "
- "&f交易!"
"CLAY_BALL":
slot: 30
price: 0.1
limit: 500
name: "&7&l黏土"
lore:
- " "
- "&f塑形!"
"REDSTONE":
slot: 29
price: 0.1
limit: 500
name: "&c&l红石"
lore:
- " "
- "&f电路!"
"GLOWSTONE_DUST":
slot: 32
price: 0.5
limit: 1500
name: "&6&l萤石"
lore:
- " "
- "&f发光!"
"QUARTZ":
slot: 33
price: 0.5
limit: 1500
name: "&f&l石英"
lore:
- " "
- "&f美丽!"