1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

更新LocalUtil 已翻译IC2 和风 NPC 等MOD物品名称...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-11-14 11:09:45 +08:00
parent f89f58ba40
commit f2c7c9c2b1
5 changed files with 8 additions and 477 deletions

View File

@ -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.5.2</version> <version>1.6</version>
<description>快捷商店重置版本...</description> <description>快捷商店重置版本...</description>
<build> <build>
<finalName>${project.name}</finalName> <finalName>${project.name}</finalName>
@ -54,7 +54,7 @@
</build> </build>
<properties> <properties>
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url> <jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
<update.description>&amp;4紧急更新 &amp;c修复金斧权限检测问题...</update.description> <update.description>&amp;c更新LocalUtil &amp;a已翻译&amp;dIC2 和风 NPC&amp;a等MOD物品名称...</update.description>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<repositories> <repositories>

View File

@ -1,44 +0,0 @@
package org.maxgamer.QuickShop.Config;
import java.io.File;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import cn.citycraft.PluginHelper.config.FileConfig;
public class ItemConfig {
public static FileConfig config;
public static File file;
private static String CONFIG_NAME = "item.yml";
public static String getItemName(final ItemStack i) {
if (i.hasItemMeta() && i.getItemMeta().hasDisplayName()) {
return i.getItemMeta().getDisplayName();
}
final String name = i.getType().name();
final int dur = i.getDurability();
final String dura = i.getMaxStackSize() != 1 ? dur != 0 ? "_" + dur : "" : "";
final String iname = name + dura;
return getItemName(iname);
}
public static String getItemName(final String iname) {
String aname = config.getString(iname);
if (aname == null) {
aname = iname;
config.set(iname, iname);
config.save();
}
return aname;
}
public static void load(final Plugin p) {
config = new FileConfig(p, CONFIG_NAME);
}
public static void reload() {
config.reload();
}
}

View File

@ -25,7 +25,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask; import org.bukkit.scheduler.BukkitTask;
import org.maxgamer.QuickShop.Command.QuickShopCommands; import org.maxgamer.QuickShop.Command.QuickShopCommands;
import org.maxgamer.QuickShop.Config.ConfigManager; import org.maxgamer.QuickShop.Config.ConfigManager;
import org.maxgamer.QuickShop.Config.ItemConfig;
import org.maxgamer.QuickShop.Database.Database; import org.maxgamer.QuickShop.Database.Database;
import org.maxgamer.QuickShop.Database.DatabaseCore; import org.maxgamer.QuickShop.Database.DatabaseCore;
import org.maxgamer.QuickShop.Database.DatabaseHelper; import org.maxgamer.QuickShop.Database.DatabaseHelper;
@ -52,6 +51,7 @@ import org.maxgamer.QuickShop.Watcher.ItemWatcher;
import org.maxgamer.QuickShop.Watcher.LogWatcher; import org.maxgamer.QuickShop.Watcher.LogWatcher;
import cn.citycraft.PluginHelper.config.FileConfig; import cn.citycraft.PluginHelper.config.FileConfig;
import cn.citycraft.PluginHelper.utils.LocalUtil;
import cn.citycraft.PluginHelper.utils.VersionChecker; import cn.citycraft.PluginHelper.utils.VersionChecker;
public class QuickShop extends JavaPlugin { public class QuickShop extends JavaPlugin {
@ -343,7 +343,7 @@ public class QuickShop extends JavaPlugin {
@Override @Override
public void onLoad() { public void onLoad() {
config = new FileConfig(this); config = new FileConfig(this);
ItemConfig.load(this); LocalUtil.reload();
MsgUtil.init(this); MsgUtil.init(this);
} }
@ -351,6 +351,6 @@ public class QuickShop extends JavaPlugin {
@Override @Override
public void reloadConfig() { public void reloadConfig() {
config.reload(); config.reload();
ItemConfig.reload(); LocalUtil.reload();
} }
} }

View File

@ -21,7 +21,8 @@ import org.bukkit.inventory.meta.EnchantmentStorageMeta;
import org.bukkit.material.MaterialData; import org.bukkit.material.MaterialData;
import org.bukkit.material.Sign; import org.bukkit.material.Sign;
import org.maxgamer.QuickShop.QuickShop; import org.maxgamer.QuickShop.QuickShop;
import org.maxgamer.QuickShop.Config.ItemConfig;
import cn.citycraft.PluginHelper.utils.LocalUtil;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class Util { public class Util {
@ -161,7 +162,7 @@ public class Util {
*/ */
public static String getName(final ItemStack i) { public static String getName(final ItemStack i) {
// final String vanillaName = getDataName(i.getType(), i.getDurability()); // final String vanillaName = getDataName(i.getType(), i.getDurability());
final String vanillaName = ItemConfig.getItemName(i); final String vanillaName = LocalUtil.getItemName(i);
return prettifyText(vanillaName); return prettifyText(vanillaName);
} }

View File

@ -1,426 +0,0 @@
Version: 1.0
AIR_-1: 爪子
AIR: 爪子
STONE: 石头
GRASS: 草方块
DIRT: 泥土
COBBLESTONE: 圆石
WOOD: 木板
SAPLING: 橡木树苗
SAPLING_1: 云杉树苗
SAPLING_2: 白桦树苗
SAPLING_3: 丛林树苗
SAPLING_4: 金合欢树苗
SAPLING_5: 深色橡木树苗
BEDROCK: 基岩
WATER:
STATIONARY_WATER: 静态的水
LAVA: 岩浆
STATIONARY_LAVA: 静态的岩浆
SAND: 沙子
GRAVEL: 沙砾
GOLD_ORE: 金矿石
IRON_ORE: 铁矿石
COAL_ORE: 煤矿石
LOG: 橡木
LEAVES: 橡木树叶
SPONGE: 海绵
GLASS: 玻璃
LAPIS_ORE: 青金石矿石
LAPIS_BLOCK: 青金石块
DISPENSER: 发射器
SANDSTONE: 沙石
NOTE_BLOCK: 音符盒
BED_BLOCK:
POWERED_RAIL: 动力铁轨
DETECTOR_RAIL: 探测铁轨
PISTON_STICKY_BASE: 粘性活塞
WEB: 蜘蛛网
LONG_GRASS: 灌木
DEAD_BUSH: 枯死的灌木
PISTON_BASE: 活塞
PISTON_EXTENSION: 活塞帽
WOOL: 羊毛
PISTON_MOVING_PIECE: PISTON_MOVING_PIECE
YELLOW_FLOWER: 蒲公英
RED_ROSE: 罂粟
BROWN_MUSHROOM: 棕色蘑菇
RED_MUSHROOM: 红色蘑菇
GOLD_BLOCK: 金块
IRON_BLOCK: 铁块
DOUBLE_STEP: 石台阶(两层)
STEP: 石台阶
BRICK: 砖块
TNT: TNT
BOOKSHELF: 书架
MOSSY_COBBLESTONE: 苔石
OBSIDIAN: 黑曜石
TORCH: 火把
FIRE:
MOB_SPAWNER: 刷怪笼
WOOD_STAIRS: 橡木楼梯
CHEST: 箱子
REDSTONE_WIRE: 红石粉
DIAMOND_ORE: 钻石原矿
DIAMOND_BLOCK: 钻石块
WORKBENCH: 工作台
CROPS: 农作物
SOIL: 耕地
FURNACE: 熔炉
BURNING_FURNACE: 燃烧的熔炉
SIGN_POST: 木牌
WOODEN_DOOR: 橡木门
LADDER: 梯子
RAILS: 铁轨
COBBLESTONE_STAIRS: 圆石台阶
WALL_SIGN: 墙上的木牌
LEVER: 拉杆
STONE_PLATE: 石质压力板
IRON_DOOR_BLOCK: 铁门
WOOD_PLATE: 木质压力板
REDSTONE_ORE: 红石原矿
GLOWING_REDSTONE_ORE: 采集中的红石原矿
REDSTONE_TORCH_OFF: 红石火把(关闭)
REDSTONE_TORCH_ON: 红石火把(打开)
STONE_BUTTON: 石按钮
SNOW:
ICE:
SNOW_BLOCK: 雪块
CACTUS: 仙人掌
CLAY: 粘土
SUGAR_CANE_BLOCK: SUGAR_CANE_BLOCK
JUKEBOX: 唱片机
FENCE: 栅栏
PUMPKIN: 南瓜
NETHERRACK: 地狱岩
SOUL_SAND: 灵魂沙
GLOWSTONE: 萤石
PORTAL: 传送门
JACK_O_LANTERN: 南瓜灯
CAKE_BLOCK: 蛋糕
DIODE_BLOCK_OFF: DIODE_BLOCK_OFF
DIODE_BLOCK_ON: DIODE_BLOCK_ON
LOCKED_CHEST: 上锁的箱子
STAINED_GLASS: 白色染色玻璃
STAINED_GLASS_1: 橙色染色玻璃
STAINED_GLASS_2: 品红色染色玻璃
STAINED_GLASS_3: 淡蓝色染色玻璃
STAINED_GLASS_4: 黄色染色玻璃
STAINED_GLASS_5: 黄绿色染色玻璃
STAINED_GLASS_6: 粉红色染色玻璃
STAINED_GLASS_7: 灰色染色玻璃
STAINED_GLASS_8: 淡灰色染色玻璃
STAINED_GLASS_9: 青色染色玻璃
STAINED_GLASS_10: 紫色染色玻璃
STAINED_GLASS_11: 蓝色染色玻璃
STAINED_GLASS_12: 棕色染色玻璃
STAINED_GLASS_13: 绿色染色玻璃
STAINED_GLASS_14: 红色染色玻璃
STAINED_GLASS_15: 黑色染色玻璃
TRAP_DOOR: 活板门
MONSTER_EGGS: 石头刷怪蛋
SMOOTH_BRICK: 石砖
HUGE_MUSHROOM_1: 蘑菇
HUGE_MUSHROOM_2: 蘑菇
IRON_FENCE: 铁栅栏
THIN_GLASS: 玻璃板
MELON_BLOCK: 西瓜方块
PUMPKIN_STEM: 南瓜种子
MELON_STEM: 西瓜种子
VINE: 藤蔓
FENCE_GATE: 栅栏门
BRICK_STAIRS: 砖楼梯
SMOOTH_STAIRS: 石砖楼梯
MYCEL: 菌丝
WATER_LILY: 睡莲
NETHER_BRICK: 地狱砖块
NETHER_FENCE: 地狱栅栏
NETHER_BRICK_STAIRS: 地狱砖楼梯
NETHER_WARTS: 地狱疣
ENCHANTMENT_TABLE: 附魔台
BREWING_STAND: 酿造台
CAULDRON: 炼药锅
ENDER_PORTAL: 末地传送门
ENDER_PORTAL_FRAME: 末地传送框架
ENDER_STONE: 末地石
DRAGON_EGG: 龙蛋
REDSTONE_LAMP_OFF: 红石灯(关闭)
REDSTONE_LAMP_ON: 红石灯(打开)
WOOD_DOUBLE_STEP: 橡木台阶(两层)
WOOD_STEP: 橡木台阶
COCOA: 可可豆
SANDSTONE_STAIRS: 沙石台阶
EMERALD_ORE: 绿宝石矿石
ENDER_CHEST: 末影箱
TRIPWIRE_HOOK: 绊线钩
TRIPWIRE: 绊线钩
EMERALD_BLOCK: 绿宝石块
SPRUCE_WOOD_STAIRS: 云杉木楼梯
BIRCH_WOOD_STAIRS: 桦木楼梯
JUNGLE_WOOD_STAIRS: 丛林木楼梯
COMMAND: 命令方块
BEACON: 信标
COBBLE_WALL: 圆石墙
FLOWER_POT: 花盆
CARROT: 胡萝卜
POTATO: 土豆
WOOD_BUTTON: 木按钮
SKULL: 头颅
ANVIL: 铁毡
TRAPPED_CHEST: 陷阱箱
GOLD_PLATE: 测重压力板(轻质)
IRON_PLATE: 测重压力板(重质)
REDSTONE_COMPARATOR_OFF: 红石比较器(关闭)
REDSTONE_COMPARATOR_ON: 红石比较器(打开)
DAYLIGHT_DETECTOR: 阳光传感器
REDSTONE_BLOCK: 红石块
QUARTZ_ORE: 下界石英矿石
HOPPER: 漏斗
QUARTZ_BLOCK: 石英块
QUARTZ_STAIRS: 石英楼梯
ACTIVATOR_RAIL: 激活铁轨
DROPPER: 掉落物
STAINED_CLAY: 白色染色粘土
STAINED_CLAY_1: 橙色染色粘土
STAINED_CLAY_2: 品红色染色粘土
STAINED_CLAY_3: 淡蓝色染色粘土
STAINED_CLAY_4: 黄色染色粘土
STAINED_CLAY_5: 黄绿色染色粘土
STAINED_CLAY_6: 粉红色染色粘土
STAINED_CLAY_7: 灰色染色粘土
STAINED_CLAY_8: 淡灰色染色粘土
STAINED_CLAY_9: 青色染色粘土
STAINED_CLAY_10: 紫色染色粘土
STAINED_CLAY_11: 蓝色染色粘土
STAINED_CLAY_12: 棕色染色粘土
STAINED_CLAY_13: 绿色染色粘土
STAINED_CLAY_14: 红色染色粘土
STAINED_CLAY_15: 黑色染色粘土
STAINED_GLASS_PANE: 白色染色玻璃板
STAINED_GLASS_PANE_1: 橙色染色玻璃板
STAINED_GLASS_PANE_2: 品红色染色玻璃板
STAINED_GLASS_PANE_3: 淡蓝色染色玻璃板
STAINED_GLASS_PANE_4: 黄色染色玻璃板
STAINED_GLASS_PANE_5: 黄绿色染色玻璃板
STAINED_GLASS_PANE_6: 粉红色染色玻璃板
STAINED_GLASS_PANE_7: 灰色染色玻璃板
STAINED_GLASS_PANE_8: 淡灰色染色玻璃板
STAINED_GLASS_PANE_9: 青色染色玻璃板
STAINED_GLASS_PANE_10: 紫色染色玻璃板
STAINED_GLASS_PANE_11: 蓝色染色玻璃板
STAINED_GLASS_PANE_12: 棕色染色玻璃板
STAINED_GLASS_PANE_13: 绿色染色玻璃板
STAINED_GLASS_PANE_14: 红色染色玻璃板
STAINED_GLASS_PANE_15: 黑色染色玻璃板
LEAVES_2: 合金欢树叶
LOG_2: 合金欢木
ACACIA_STAIRS: 合金欢楼梯
DARK_OAK_STAIRS: 深色橡木楼梯
HAY_BLOCK: 干草快
CARPET: 白色地毯
CARPET_1: 橙色地毯
CARPET_2: 品红色地毯
CARPET_3: 淡蓝色地毯
CARPET_4: 黄色地毯
CARPET_5: 黄绿色地毯
CARPET_6: 粉红色地毯
CARPET_7: 灰色地毯
CARPET_8: 淡灰色地毯
CARPET_9: 青色地毯
CARPET_10: 紫色地毯
CARPET_11: 蓝色地毯
CARPET_12: 棕色地毯
CARPET_13: 绿色地毯
CARPET_14: 红色地毯
CARPET_15: 黑色地毯
HARD_CLAY: 硬化粘土
COAL_BLOCK: 煤炭快
PACKED_ICE: 浮冰
DOUBLE_PLANT: 向日葵
IRON_SPADE: 铁楸
IRON_PICKAXE: 铁镐
IRON_AXE: 铁斧
FLINT_AND_STEEL: 打火石
APPLE: 苹果
BOW:
ARROW:
COAL: 煤炭
DIAMOND: 钻石
IRON_INGOT: 铁锭
GOLD_INGOT: 金锭
IRON_SWORD: 铁剑
WOOD_SWORD: 木剑
WOOD_SPADE: 木楸
WOOD_PICKAXE: 木稿
WOOD_AXE: 木斧
STONE_SWORD: 石剑
STONE_SPADE: 石楸
STONE_PICKAXE: 石稿
STONE_AXE: 石斧
DIAMOND_SWORD: 钻石剑
DIAMOND_SPADE: 钻石楸
DIAMOND_PICKAXE: 钻石稿
DIAMOND_AXE: 钻石斧
STICK: 木棍
BOWL:
MUSHROOM_SOUP: 蘑菇煲
GOLD_SWORD: 金剑
GOLD_SPADE: 金楸
GOLD_PICKAXE: 金稿
GOLD_AXE: 金斧
GOLD_HOE: 金锄
STRING: 线
FEATHER: 羽毛
SULPHUR: 火药
WOOD_HOE: 木锄
STONE_HOE: 石锄
IRON_HOE: 铁锄
DIAMOND_HOE: 钻石锄
SEEDS: 种子
WHEAT: 小麦
BREAD: 面包
LEATHER_HELMET: 皮革帽子
LEATHER_CHESTPLATE: 皮革外套
LEATHER_LEGGINGS: 皮革护腿
LEATHER_BOOTS: 皮革靴子
CHAINMAIL_HELMET: 锁链帽子
CHAINMAIL_CHESTPLATE: 锁链外套
CHAINMAIL_LEGGINGS: 锁链护腿
CHAINMAIL_BOOTS: 锁链靴子
IRON_HELMET: 铁帽子
IRON_CHESTPLATE: 铁外套
IRON_LEGGINGS: 铁护腿
IRON_BOOTS: 铁靴子
DIAMOND_HELMET: 钻石帽子
DIAMOND_CHESTPLATE: 钻石外套
DIAMOND_LEGGINGS: 钻石护腿
DIAMOND_BOOTS: 钻石靴子
GOLD_HELMET: 金帽子
GOLD_CHESTPLATE: 金外套
GOLD_LEGGINGS: 金护腿
GOLD_BOOTS: 金靴子
FLINT: 燧石
PORK: 生猪排
GRILLED_PORK: 熟猪排
PAINTING:
GOLDEN_APPLE: 金苹果
SIGN: 木牌
WOOD_DOOR: 木门
BUCKET:
WATER_BUCKET: 水桶
LAVA_BUCKET: 岩浆桶
MINECART: 矿车
SADDLE: SADDLE
IRON_DOOR: 铁门
REDSTONE: 红石
SNOW_BALL: 雪球
BOAT:
LEATHER: 皮革
MILK_BUCKET: 牛奶桶
CLAY_BRICK: 红砖
CLAY_BALL: 粘土球
SUGAR_CANE: 甘蔗
PAPER:
BOOK:
SLIME_BALL: 史莱姆球
STORAGE_MINECART: 运输矿车
POWERED_MINECART: 动力矿车
EGG: 鸡蛋
COMPASS: 指南针
FISHING_ROD: 鱼竿
WATCH:
GLOWSTONE_DUST: 萤石粉
RAW_FISH: 生鱼
COOKED_FISH: 熟鱼
INK_SACK: 墨囊
INK_SACK_1: 玫瑰红
INK_SACK_2: 仙人掌绿
INK_SACK_3: 可可豆
INK_SACK_4: 青金石
INK_SACK_5: 紫色染料
INK_SACK_6: 青色染料
INK_SACK_7: 淡灰色染料
INK_SACK_8: 灰色染料
INK_SACK_9: 粉色染料
INK_SACK_10: 黄绿色染料
INK_SACK_11: 蒲公英黄染料
INK_SACK_12: 淡蓝色染料
INK_SACK_13: 品红色染料
INK_SACK_14: 橙色染料
INK_SACK_15: 骨粉
BONE: 骨粉
SUGAR:
CAKE: 蛋糕
BED:
DIODE: 红石中继器
COOKIE: 曲奇
MAP: 地图
SHEARS: 剪刀
MELON: 西瓜
PUMPKIN_SEEDS: 南瓜种子
MELON_SEEDS: 西瓜种子
RAW_BEEF: 生牛肉
COOKED_BEEF: 熟牛肉
RAW_CHICKEN: 生鸡肉
COOKED_CHICKEN: 熟鸡肉
ROTTEN_FLESH: 腐肉
ENDER_PEARL: 末影之眼
BLAZE_ROD: 烈焰棒
GHAST_TEAR: 恶魂之泪
GOLD_NUGGET: 金粒
NETHER_STALK: 地狱疣
POTION: 药水
GLASS_BOTTLE: 玻璃瓶
SPIDER_EYE: 蜘蛛眼
FERMENTED_SPIDER_EYE: 发酵蛛眼
BLAZE_POWDER: 烈焰粉
MAGMA_CREAM: 岩浆膏
BREWING_STAND_ITEM: 酿造台
CAULDRON_ITEM: 炼药锅
EYE_OF_ENDER: 末影之眼
SPECKLED_MELON: 闪烁的西瓜
MONSTER_EGG: 刷怪蛋
EXP_BOTTLE: 附魔之瓶
FIREBALL: 火焰弹
BOOK_AND_QUILL: 书和笔
WRITTEN_BOOK: 成书
EMERALD: 绿宝石
ITEM_FRAME: 物品展示框
FLOWER_POT_ITEM: 花盆
CARROT_ITEM: 胡萝卜
POTATO_ITEM: 马铃薯
BAKED_POTATO: 烤马铃薯
POISONOUS_POTATO: 毒马铃薯
EMPTY_MAP: 空地图
GOLDEN_CARROT: 金萝卜
SKULL_ITEM: 头颅
CARROT_STICK: 胡萝卜
NETHER_STAR: 下界之星
PUMPKIN_PIE: 南瓜派
FIREWORK: 烟花
FIREWORK_CHARGE: 烟花
ENCHANTED_BOOK: 附魔书
REDSTONE_COMPARATOR: 红石比较器
NETHER_BRICK_ITEM: 地狱砖块
QUARTZ: 石英
EXPLOSIVE_MINECART: TNT矿车
HOPPER_MINECART: 漏斗矿车
IRON_BARDING: 铁马凯
GOLD_BARDING: 金马凯
DIAMOND_BARDING: 钻石马凯
LEASH: 栓绳
NAME_TAG: 命名牌
COMMAND_MINECART: 命令方块
GOLD_RECORD: 音乐唱片
GREEN_RECORD: 音乐唱片
RECORD_3: 音乐唱片
RECORD_4: 音乐唱片
RECORD_5: 音乐唱片
RECORD_6: 音乐唱片
RECORD_7: 音乐唱片
RECORD_8: 音乐唱片
RECORD_9: 音乐唱片
RECORD_10: 音乐唱片
RECORD_11: 音乐唱片
RECORD_12: 音乐唱片