+ SimpleI18n
+ fixed iteminfo command
This commit is contained in:
parent
47d481bbfc
commit
0d8e9f60f2
@ -5,7 +5,7 @@ plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '4.0.4'
|
||||
}
|
||||
group = 'me.skymc'
|
||||
version = '4.8'
|
||||
version = '4.81'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
Binary file not shown.
@ -1,700 +0,0 @@
|
||||
'STONE:0': 石头
|
||||
'STONE:1': 花岗岩
|
||||
'STONE:2': 磨制花岗岩
|
||||
'STONE:3': 闪长岩
|
||||
'STONE:4': 磨制闪长岩
|
||||
'STONE:5': 安山岩
|
||||
'STONE:6': 磨制安山岩
|
||||
'GRASS:0': 草方块
|
||||
'DIRT:0': 泥土
|
||||
'DIRT:1': 砂土
|
||||
'DIRT:2': 灰化土
|
||||
'COBBLESTONE:0': 圆石
|
||||
'WOOD:0': 橡木木板
|
||||
'WOOD:1': 云杉木板
|
||||
'WOOD:2': 白桦木板
|
||||
'WOOD:3': 丛林木板
|
||||
'WOOD:4': 金合欢木板
|
||||
'WOOD:5': 深色橡木木板
|
||||
'SAPLING:0': 橡树树苗
|
||||
'SAPLING:1': 云杉树苗
|
||||
'SAPLING:2': 白桦树苗
|
||||
'SAPLING:3': 丛林树苗
|
||||
'SAPLING:4': 金合欢树苗
|
||||
'SAPLING:5': 深色橡树树苗
|
||||
'BEDROCK:0': 基岩
|
||||
'WATER:0': 空气
|
||||
'STATIONARY_WATER:0': 空气
|
||||
'LAVA:0': 空气
|
||||
'STATIONARY_LAVA:0': 空气
|
||||
'SAND:0': 沙子
|
||||
'SAND:1': 红沙
|
||||
'GRAVEL:0': 沙砾
|
||||
'GOLD_ORE:0': 金矿石
|
||||
'IRON_ORE:0': 铁矿石
|
||||
'COAL_ORE:0': 煤矿石
|
||||
'LOG:0': 橡木
|
||||
'LOG:1': 云杉木
|
||||
'LOG:2': 白桦木
|
||||
'LOG:3': 丛林木
|
||||
'LOG:4': 金合欢木
|
||||
'LOG:5': 深色橡木
|
||||
'LEAVES:0': 橡树树叶
|
||||
'LEAVES:1': 云杉树叶
|
||||
'LEAVES:2': 白桦树叶
|
||||
'LEAVES:3': 丛林树叶
|
||||
'SPONGE:0': 海绵
|
||||
'SPONGE:1': 湿海绵
|
||||
'GLASS:0': 玻璃
|
||||
'LAPIS_ORE:0': 青金石矿石
|
||||
'LAPIS_BLOCK:0': 青金石块
|
||||
'DISPENSER:0': 发射器
|
||||
'SANDSTONE:0': 砂岩
|
||||
'SANDSTONE:1': 錾制砂岩
|
||||
'SANDSTONE:2': 平滑砂岩
|
||||
'NOTE_BLOCK:0': 音符盒
|
||||
'BED_BLOCK:0': 空气
|
||||
'POWERED_RAIL:0': 充能铁轨
|
||||
'DETECTOR_RAIL:0': 探测铁轨
|
||||
'PISTON_STICKY_BASE:0': 粘性活塞
|
||||
'WEB:0': 蜘蛛网
|
||||
'LONG_GRASS:0': 灌木
|
||||
'LONG_GRASS:1': 草
|
||||
'LONG_GRASS:2': 蕨
|
||||
'LONG_GRASS:3': 草
|
||||
'LONG_GRASS:4': 草
|
||||
'LONG_GRASS:5': 草
|
||||
'LONG_GRASS:6': 草
|
||||
'LONG_GRASS:7': 草
|
||||
'LONG_GRASS:8': 草
|
||||
'LONG_GRASS:9': 草
|
||||
'LONG_GRASS:10': 草
|
||||
'LONG_GRASS:11': 草
|
||||
'LONG_GRASS:12': 草
|
||||
'LONG_GRASS:13': 草
|
||||
'LONG_GRASS:14': 草
|
||||
'LONG_GRASS:15': 草
|
||||
'DEAD_BUSH:0': 枯死的灌木
|
||||
'PISTON_BASE:0': 活塞
|
||||
'PISTON_EXTENSION:0': 空气
|
||||
'WOOL:0': 白色羊毛
|
||||
'WOOL:1': 橙色羊毛
|
||||
'WOOL:2': 品红色羊毛
|
||||
'WOOL:3': 淡蓝色羊毛
|
||||
'WOOL:4': 黄色羊毛
|
||||
'WOOL:5': 黄绿色羊毛
|
||||
'WOOL:6': 粉红色羊毛
|
||||
'WOOL:7': 灰色羊毛
|
||||
'WOOL:8': 淡灰色羊毛
|
||||
'WOOL:9': 青色羊毛
|
||||
'WOOL:10': 紫色羊毛
|
||||
'WOOL:11': 蓝色羊毛
|
||||
'WOOL:12': 棕色羊毛
|
||||
'WOOL:13': 绿色羊毛
|
||||
'WOOL:14': 红色羊毛
|
||||
'WOOL:15': 黑色羊毛
|
||||
'PISTON_MOVING_PIECE:0': 空气
|
||||
'YELLOW_FLOWER:0': 蒲公英
|
||||
'RED_ROSE:0': 虞美人
|
||||
'RED_ROSE:1': 兰花
|
||||
'RED_ROSE:2': 绒球葱
|
||||
'RED_ROSE:3': 茜草花
|
||||
'RED_ROSE:4': 红色郁金香
|
||||
'RED_ROSE:5': 橙色郁金香
|
||||
'RED_ROSE:6': 白色郁金香
|
||||
'RED_ROSE:7': 粉红色郁金香
|
||||
'RED_ROSE:8': 滨菊
|
||||
'BROWN_MUSHROOM:0': 蘑菇
|
||||
'RED_MUSHROOM:0': 蘑菇
|
||||
'GOLD_BLOCK:0': 金块
|
||||
'IRON_BLOCK:0': 铁块
|
||||
'DOUBLE_STEP:0': 空气
|
||||
'STEP:0': 石台阶
|
||||
'STEP:1': 砂岩台阶
|
||||
'STEP:2': 木台阶
|
||||
'STEP:3': 圆石台阶
|
||||
'STEP:4': 砖台阶
|
||||
'STEP:5': 石砖台阶
|
||||
'STEP:6': 地狱砖台阶
|
||||
'STEP:7': 石英台阶
|
||||
'BRICK:0': 砖块
|
||||
'TNT:0': TNT
|
||||
'BOOKSHELF:0': 书架
|
||||
'MOSSY_COBBLESTONE:0': 苔石
|
||||
'OBSIDIAN:0': 黑曜石
|
||||
'TORCH:0': 火把
|
||||
'FIRE:0': 空气
|
||||
'MOB_SPAWNER:0': 刷怪箱
|
||||
'WOOD_STAIRS:0': 橡木楼梯
|
||||
'CHEST:0': 箱子
|
||||
'REDSTONE_WIRE:0': 空气
|
||||
'DIAMOND_ORE:0': 钻石矿石
|
||||
'DIAMOND_BLOCK:0': 钻石块
|
||||
'WORKBENCH:0': 工作台
|
||||
'CROPS:0': 空气
|
||||
'SOIL:0': 耕地
|
||||
'FURNACE:0': 熔炉
|
||||
'BURNING_FURNACE:0': 空气
|
||||
'SIGN_POST:0': 空气
|
||||
'WOODEN_DOOR:0': 空气
|
||||
'LADDER:0': 梯子
|
||||
'RAILS:0': 铁轨
|
||||
'COBBLESTONE_STAIRS:0': 圆石楼梯
|
||||
'WALL_SIGN:0': 空气
|
||||
'LEVER:0': 拉杆
|
||||
'STONE_PLATE:0': 石质压力板
|
||||
'IRON_DOOR_BLOCK:0': 空气
|
||||
'WOOD_PLATE:0': 木质压力板
|
||||
'REDSTONE_ORE:0': 红石矿石
|
||||
'GLOWING_REDSTONE_ORE:0': 空气
|
||||
'REDSTONE_TORCH_OFF:0': 空气
|
||||
'REDSTONE_TORCH_ON:0': 红石火把
|
||||
'STONE_BUTTON:0': 按钮
|
||||
'SNOW:0': 雪
|
||||
'ICE:0': 冰
|
||||
'SNOW_BLOCK:0': 雪
|
||||
'CACTUS:0': 仙人掌
|
||||
'CLAY:0': 粘土块
|
||||
'SUGAR_CANE_BLOCK:0': 空气
|
||||
'JUKEBOX:0': 唱片机
|
||||
'FENCE:0': 橡木栅栏
|
||||
'PUMPKIN:0': 南瓜
|
||||
'NETHERRACK:0': 地狱岩
|
||||
'SOUL_SAND:0': 灵魂沙
|
||||
'GLOWSTONE:0': 荧石
|
||||
'PORTAL:0': 空气
|
||||
'JACK_O_LANTERN:0': 南瓜灯
|
||||
'CAKE_BLOCK:0': 空气
|
||||
'DIODE_BLOCK_OFF:0': 空气
|
||||
'DIODE_BLOCK_ON:0': 空气
|
||||
'STAINED_GLASS:0': 白色染色玻璃
|
||||
'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:0': 活板门
|
||||
'MONSTER_EGGS:0': 石头怪物蛋
|
||||
'MONSTER_EGGS:1': 圆石怪物蛋
|
||||
'MONSTER_EGGS:2': 石砖怪物蛋
|
||||
'MONSTER_EGGS:3': 苔石砖怪物蛋
|
||||
'MONSTER_EGGS:4': 裂石砖怪物蛋
|
||||
'MONSTER_EGGS:5': 錾制石砖怪物蛋
|
||||
'SMOOTH_BRICK:0': 石砖
|
||||
'SMOOTH_BRICK:1': 苔石砖
|
||||
'SMOOTH_BRICK:2': 裂石砖
|
||||
'SMOOTH_BRICK:3': 錾制石砖
|
||||
'HUGE_MUSHROOM_1:0': 蘑菇
|
||||
'HUGE_MUSHROOM_2:0': 蘑菇
|
||||
'IRON_FENCE:0': 铁栏杆
|
||||
'THIN_GLASS:0': 玻璃板
|
||||
'MELON_BLOCK:0': 西瓜
|
||||
'PUMPKIN_STEM:0': 空气
|
||||
'MELON_STEM:0': 空气
|
||||
'VINE:0': 藤蔓
|
||||
'FENCE_GATE:0': 橡木栅栏门
|
||||
'BRICK_STAIRS:0': 砖楼梯
|
||||
'SMOOTH_STAIRS:0': 石砖楼梯
|
||||
'MYCEL:0': 菌丝
|
||||
'WATER_LILY:0': 睡莲
|
||||
'NETHER_BRICK:0': 地狱砖块
|
||||
'NETHER_FENCE:0': 地狱砖栅栏
|
||||
'NETHER_BRICK_STAIRS:0': 地狱砖楼梯
|
||||
'NETHER_WARTS:0': 空气
|
||||
'ENCHANTMENT_TABLE:0': 附魔台
|
||||
'BREWING_STAND:0': 空气
|
||||
'CAULDRON:0': 空气
|
||||
'ENDER_PORTAL:0': 空气
|
||||
'ENDER_PORTAL_FRAME:0': 末地传送门
|
||||
'ENDER_STONE:0': 末地石
|
||||
'DRAGON_EGG:0': 龙蛋
|
||||
'REDSTONE_LAMP_OFF:0': 红石灯
|
||||
'REDSTONE_LAMP_ON:0': 空气
|
||||
'WOOD_DOUBLE_STEP:0': 空气
|
||||
'WOOD_STEP:0': 橡木台阶
|
||||
'WOOD_STEP:1': 云杉台阶
|
||||
'WOOD_STEP:2': 桦木台阶
|
||||
'WOOD_STEP:3': 丛林台阶
|
||||
'WOOD_STEP:4': 金合欢木台阶
|
||||
'WOOD_STEP:5': 深色橡木台阶
|
||||
'COCOA:0': 空气
|
||||
'SANDSTONE_STAIRS:0': 砂岩楼梯
|
||||
'EMERALD_ORE:0': 绿宝石矿石
|
||||
'ENDER_CHEST:0': 末影箱
|
||||
'TRIPWIRE_HOOK:0': 绊线钩
|
||||
'TRIPWIRE:0': 空气
|
||||
'EMERALD_BLOCK:0': 绿宝石块
|
||||
'SPRUCE_WOOD_STAIRS:0': 云杉木楼梯
|
||||
'BIRCH_WOOD_STAIRS:0': 桦木楼梯
|
||||
'JUNGLE_WOOD_STAIRS:0': 丛林木楼梯
|
||||
'COMMAND:0': 命令方块
|
||||
'BEACON:0': 信标
|
||||
'COBBLE_WALL:0': 圆石墙
|
||||
'COBBLE_WALL:1': 苔石墙
|
||||
'FLOWER_POT:0': 空气
|
||||
'CARROT:0': 空气
|
||||
'POTATO:0': 空气
|
||||
'WOOD_BUTTON:0': 按钮
|
||||
'SKULL:0': 空气
|
||||
'ANVIL:0': 铁砧
|
||||
'ANVIL:1': 轻微损坏的铁砧
|
||||
'ANVIL:2': 严重损坏的铁砧
|
||||
'TRAPPED_CHEST:0': 陷阱箱
|
||||
'GOLD_PLATE:0': 测重压力板(轻质)
|
||||
'IRON_PLATE:0': 测重压力板(重质)
|
||||
'REDSTONE_COMPARATOR_OFF:0': 空气
|
||||
'REDSTONE_COMPARATOR_ON:0': 空气
|
||||
'DAYLIGHT_DETECTOR:0': 阳光传感器
|
||||
'REDSTONE_BLOCK:0': 红石块
|
||||
'QUARTZ_ORE:0': 下界石英矿石
|
||||
'HOPPER:0': 漏斗
|
||||
'QUARTZ_BLOCK:0': 石英块
|
||||
'QUARTZ_BLOCK:1': 錾制石英块
|
||||
'QUARTZ_BLOCK:2': 竖纹石英块
|
||||
'QUARTZ_STAIRS:0': 石英楼梯
|
||||
'ACTIVATOR_RAIL:0': 激活铁轨
|
||||
'DROPPER:0': 投掷器
|
||||
'STAINED_CLAY:0': 白色粘土
|
||||
'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:0': 白色染色玻璃板
|
||||
'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:0': 金合欢树叶
|
||||
'LEAVES_2:1': 深色橡树树叶
|
||||
'LEAVES_2:2': 橡树树叶
|
||||
'LEAVES_2:3': 橡树树叶
|
||||
'LOG_2:0': 金合欢木
|
||||
'LOG_2:1': 深色橡木
|
||||
'LOG_2:2': 橡木
|
||||
'LOG_2:3': 橡木
|
||||
'LOG_2:4': 橡木
|
||||
'LOG_2:5': 橡木
|
||||
'LOG_2:6': 橡木
|
||||
'LOG_2:7': 橡木
|
||||
'LOG_2:8': 橡木
|
||||
'LOG_2:9': 橡木
|
||||
'LOG_2:10': 橡木
|
||||
'LOG_2:11': 橡木
|
||||
'LOG_2:12': 橡木
|
||||
'LOG_2:13': 橡木
|
||||
'LOG_2:14': 橡木
|
||||
'LOG_2:15': 橡木
|
||||
'ACACIA_STAIRS:0': 金合欢木楼梯
|
||||
'DARK_OAK_STAIRS:0': 深色橡木楼梯
|
||||
'SLIME_BLOCK:0': 粘液块
|
||||
'BARRIER:0': 屏障
|
||||
'IRON_TRAPDOOR:0': 铁活板门
|
||||
'PRISMARINE:0': 海晶石
|
||||
'PRISMARINE:1': 海晶石砖
|
||||
'PRISMARINE:2': 暗海晶石
|
||||
'SEA_LANTERN:0': 海晶灯
|
||||
'HAY_BLOCK:0': 干草块
|
||||
'CARPET:0': 白色地毯
|
||||
'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:0': 粘土
|
||||
'COAL_BLOCK:0': 煤炭块
|
||||
'PACKED_ICE:0': 浮冰
|
||||
'DOUBLE_PLANT:0': 向日葵
|
||||
'DOUBLE_PLANT:1': 丁香
|
||||
'DOUBLE_PLANT:2': 高草丛
|
||||
'DOUBLE_PLANT:3': 大型蕨
|
||||
'DOUBLE_PLANT:4': 玫瑰丛
|
||||
'DOUBLE_PLANT:5': 牡丹
|
||||
'STANDING_BANNER:0': 空气
|
||||
'WALL_BANNER:0': 空气
|
||||
'DAYLIGHT_DETECTOR_INVERTED:0': 空气
|
||||
'RED_SANDSTONE:0': 红砂岩
|
||||
'RED_SANDSTONE:1': 錾制红砂岩
|
||||
'RED_SANDSTONE:2': 平滑红砂岩
|
||||
'RED_SANDSTONE_STAIRS:0': 红砂岩楼梯
|
||||
'DOUBLE_STONE_SLAB2:0': 空气
|
||||
'STONE_SLAB2:0': 红砂岩台阶
|
||||
'SPRUCE_FENCE_GATE:0': 云杉木栅栏门
|
||||
'BIRCH_FENCE_GATE:0': 白桦木栅栏门
|
||||
'JUNGLE_FENCE_GATE:0': 丛林木栅栏门
|
||||
'DARK_OAK_FENCE_GATE:0': 深色橡木栅栏门
|
||||
'ACACIA_FENCE_GATE:0': 金合欢栅栏门
|
||||
'SPRUCE_FENCE:0': 云杉木栅栏
|
||||
'BIRCH_FENCE:0': 白桦木栅栏
|
||||
'JUNGLE_FENCE:0': 丛林木栅栏
|
||||
'DARK_OAK_FENCE:0': 深色橡木栅栏
|
||||
'ACACIA_FENCE:0': 金合欢栅栏
|
||||
'SPRUCE_DOOR:0': 空气
|
||||
'BIRCH_DOOR:0': 空气
|
||||
'JUNGLE_DOOR:0': 空气
|
||||
'ACACIA_DOOR:0': 空气
|
||||
'DARK_OAK_DOOR:0': 空气
|
||||
'END_ROD:0': 末地烛
|
||||
'CHORUS_PLANT:0': 紫颂植物
|
||||
'CHORUS_FLOWER:0': 紫颂花
|
||||
'PURPUR_BLOCK:0': 紫珀块
|
||||
'PURPUR_PILLAR:0': 竖纹紫珀块
|
||||
'PURPUR_STAIRS:0': 紫珀楼梯
|
||||
'PURPUR_DOUBLE_SLAB:0': 空气
|
||||
'PURPUR_SLAB:0': 紫珀台阶
|
||||
'END_BRICKS:0': 末地石砖
|
||||
'BEETROOT_BLOCK:0': 空气
|
||||
'GRASS_PATH:0': 草径
|
||||
'END_GATEWAY:0': 空气
|
||||
'COMMAND_REPEATING:0': 循环型命令方块
|
||||
'COMMAND_CHAIN:0': 连锁型命令方块
|
||||
'FROSTED_ICE:0': 空气
|
||||
'MAGMA:0': 岩浆块
|
||||
'NETHER_WART_BLOCK:0': 地狱疣块
|
||||
'RED_NETHER_BRICK:0': 红色地狱砖
|
||||
'BONE_BLOCK:0': 骨块
|
||||
'STRUCTURE_VOID:0': 结构空位
|
||||
'OBSERVER:0': 侦测器
|
||||
'WHITE_SHULKER_BOX:0': 白色潜影盒
|
||||
'ORANGE_SHULKER_BOX:0': 橙色潜影盒
|
||||
'MAGENTA_SHULKER_BOX:0': 品红色潜影盒
|
||||
'LIGHT_BLUE_SHULKER_BOX:0': 淡蓝色潜影盒
|
||||
'YELLOW_SHULKER_BOX:0': 黄色潜影盒
|
||||
'LIME_SHULKER_BOX:0': 黄绿色潜影盒
|
||||
'PINK_SHULKER_BOX:0': 粉色潜影盒
|
||||
'GRAY_SHULKER_BOX:0': 灰色潜影盒
|
||||
'SILVER_SHULKER_BOX:0': 淡灰色潜影盒
|
||||
'CYAN_SHULKER_BOX:0': 青色潜影盒
|
||||
'PURPLE_SHULKER_BOX:0': 紫色潜影盒
|
||||
'BLUE_SHULKER_BOX:0': 蓝色潜影盒
|
||||
'BROWN_SHULKER_BOX:0': 棕色潜影盒
|
||||
'GREEN_SHULKER_BOX:0': 绿色潜影盒
|
||||
'RED_SHULKER_BOX:0': 红色潜影盒
|
||||
'BLACK_SHULKER_BOX:0': 黑色潜影盒
|
||||
'WHITE_GLAZED_TERRACOTTA:0': 白色带釉陶瓦
|
||||
'ORANGE_GLAZED_TERRACOTTA:0': 橙色带釉陶瓦
|
||||
'MAGENTA_GLAZED_TERRACOTTA:0': 品红色带釉陶瓦
|
||||
'LIGHT_BLUE_GLAZED_TERRACOTTA:0': 淡蓝色带釉陶瓦
|
||||
'YELLOW_GLAZED_TERRACOTTA:0': 黄色带釉陶瓦
|
||||
'LIME_GLAZED_TERRACOTTA:0': 黄绿色带釉陶瓦
|
||||
'PINK_GLAZED_TERRACOTTA:0': 粉红色带釉陶瓦
|
||||
'GRAY_GLAZED_TERRACOTTA:0': 灰色带釉陶瓦
|
||||
'SILVER_GLAZED_TERRACOTTA:0': 淡灰色带釉陶瓦
|
||||
'CYAN_GLAZED_TERRACOTTA:0': 青色带釉陶瓦
|
||||
'PURPLE_GLAZED_TERRACOTTA:0': 紫色带釉陶瓦
|
||||
'BLUE_GLAZED_TERRACOTTA:0': 蓝色带釉陶瓦
|
||||
'BROWN_GLAZED_TERRACOTTA:0': 棕色带釉陶瓦
|
||||
'GREEN_GLAZED_TERRACOTTA:0': 绿色带釉陶瓦
|
||||
'RED_GLAZED_TERRACOTTA:0': 红色带釉陶瓦
|
||||
'BLACK_GLAZED_TERRACOTTA:0': 黑色带釉陶瓦
|
||||
'CONCRETE:0': 白色混凝土
|
||||
'CONCRETE:1': 橙色混凝土
|
||||
'CONCRETE:2': 品红色混凝土
|
||||
'CONCRETE:3': 淡蓝色混凝土
|
||||
'CONCRETE:4': 黄色混凝土
|
||||
'CONCRETE:5': 黄绿色混凝土
|
||||
'CONCRETE:6': 粉红色混凝土
|
||||
'CONCRETE:7': 灰色混凝土
|
||||
'CONCRETE:8': 淡灰色混凝土
|
||||
'CONCRETE:9': 青色混凝土
|
||||
'CONCRETE:10': 紫色混凝土
|
||||
'CONCRETE:11': 蓝色混凝土
|
||||
'CONCRETE:12': 棕色混凝土
|
||||
'CONCRETE:13': 绿色混凝土
|
||||
'CONCRETE:14': 红色混凝土
|
||||
'CONCRETE:15': 黑色混凝土
|
||||
'CONCRETE_POWDER:0': 白色混凝土粉末
|
||||
'CONCRETE_POWDER:1': 橙色混凝土粉末
|
||||
'CONCRETE_POWDER:2': 品红色混凝土粉末
|
||||
'CONCRETE_POWDER:3': 淡蓝色混凝土粉末
|
||||
'CONCRETE_POWDER:4': 黄色混凝土粉末
|
||||
'CONCRETE_POWDER:5': 黄绿色混凝土粉末
|
||||
'CONCRETE_POWDER:6': 粉红色混凝土粉末
|
||||
'CONCRETE_POWDER:7': 灰色混凝土粉末
|
||||
'CONCRETE_POWDER:8': 淡灰色混凝土粉末
|
||||
'CONCRETE_POWDER:9': 青色混凝土粉末
|
||||
'CONCRETE_POWDER:10': 紫色混凝土粉末
|
||||
'CONCRETE_POWDER:11': 蓝色混凝土粉末
|
||||
'CONCRETE_POWDER:12': 棕色混凝土粉末
|
||||
'CONCRETE_POWDER:13': 绿色混凝土粉末
|
||||
'CONCRETE_POWDER:14': 红色混凝土粉末
|
||||
'CONCRETE_POWDER:15': 黑色混凝土粉末
|
||||
'STRUCTURE_BLOCK:0': 结构方块
|
||||
'IRON_SPADE:0': 铁锹
|
||||
'IRON_PICKAXE:0': 铁镐
|
||||
'IRON_AXE:0': 铁斧
|
||||
'FLINT_AND_STEEL:0': 打火石
|
||||
'APPLE:0': 苹果
|
||||
'BOW:0': 弓
|
||||
'ARROW:0': 箭
|
||||
'COAL:0': 煤炭
|
||||
# 2018-02-26 19:41:24 新增
|
||||
'COAL:1': 木炭
|
||||
# ---------------------- #
|
||||
'DIAMOND:0': 钻石
|
||||
'IRON_INGOT:0': 铁锭
|
||||
'GOLD_INGOT:0': 金锭
|
||||
'IRON_SWORD:0': 铁剑
|
||||
'WOOD_SWORD:0': 木剑
|
||||
'WOOD_SPADE:0': 木锹
|
||||
'WOOD_PICKAXE:0': 木镐
|
||||
'WOOD_AXE:0': 木斧
|
||||
'STONE_SWORD:0': 石剑
|
||||
'STONE_SPADE:0': 石锹
|
||||
'STONE_PICKAXE:0': 石镐
|
||||
'STONE_AXE:0': 石斧
|
||||
'DIAMOND_SWORD:0': 钻石剑
|
||||
'DIAMOND_SPADE:0': 钻石锹
|
||||
'DIAMOND_PICKAXE:0': 钻石镐
|
||||
'DIAMOND_AXE:0': 钻石斧
|
||||
'STICK:0': 木棍
|
||||
'BOWL:0': 碗
|
||||
'MUSHROOM_SOUP:0': 蘑菇煲
|
||||
'GOLD_SWORD:0': 金剑
|
||||
'GOLD_SPADE:0': 金锹
|
||||
'GOLD_PICKAXE:0': 金镐
|
||||
'GOLD_AXE:0': 金斧
|
||||
'STRING:0': 线
|
||||
'FEATHER:0': 羽毛
|
||||
'SULPHUR:0': 火药
|
||||
'WOOD_HOE:0': 木锄
|
||||
'STONE_HOE:0': 石锄
|
||||
'IRON_HOE:0': 铁锄
|
||||
'DIAMOND_HOE:0': 钻石锄
|
||||
'GOLD_HOE:0': 金锄
|
||||
'SEEDS:0': 小麦种子
|
||||
'WHEAT:0': 小麦
|
||||
'BREAD:0': 面包
|
||||
'LEATHER_HELMET:0': 皮革帽子
|
||||
'LEATHER_CHESTPLATE:0': 皮革外套
|
||||
'LEATHER_LEGGINGS:0': 皮革裤子
|
||||
'LEATHER_BOOTS:0': 皮革靴子
|
||||
'CHAINMAIL_HELMET:0': 锁链头盔
|
||||
'CHAINMAIL_CHESTPLATE:0': 锁链胸甲
|
||||
'CHAINMAIL_LEGGINGS:0': 锁链护腿
|
||||
'CHAINMAIL_BOOTS:0': 锁链靴子
|
||||
'IRON_HELMET:0': 铁头盔
|
||||
'IRON_CHESTPLATE:0': 铁胸甲
|
||||
'IRON_LEGGINGS:0': 铁护腿
|
||||
'IRON_BOOTS:0': 铁靴子
|
||||
'DIAMOND_HELMET:0': 钻石头盔
|
||||
'DIAMOND_CHESTPLATE:0': 钻石胸甲
|
||||
'DIAMOND_LEGGINGS:0': 钻石护腿
|
||||
'DIAMOND_BOOTS:0': 钻石靴子
|
||||
'GOLD_HELMET:0': 金头盔
|
||||
'GOLD_CHESTPLATE:0': 金胸甲
|
||||
'GOLD_LEGGINGS:0': 金护腿
|
||||
'GOLD_BOOTS:0': 金靴子
|
||||
'FLINT:0': 燧石
|
||||
'PORK:0': 生猪排
|
||||
'GRILLED_PORK:0': 熟猪排
|
||||
'PAINTING:0': 画
|
||||
'GOLDEN_APPLE:0': 金苹果
|
||||
'SIGN:0': 告示牌
|
||||
'WOOD_DOOR:0': 橡木门
|
||||
'BUCKET:0': 桶
|
||||
'WATER_BUCKET:0': 水桶
|
||||
'LAVA_BUCKET:0': 熔岩桶
|
||||
'MINECART:0': 矿车
|
||||
'SADDLE:0': 鞍
|
||||
'IRON_DOOR:0': 铁门
|
||||
'REDSTONE:0': 红石
|
||||
'SNOW_BALL:0': 雪球
|
||||
'BOAT:0': 橡木船
|
||||
'LEATHER:0': 皮革
|
||||
'MILK_BUCKET:0': 牛奶
|
||||
'CLAY_BRICK:0': 红砖
|
||||
'CLAY_BALL:0': 粘土
|
||||
'SUGAR_CANE:0': 甘蔗
|
||||
'PAPER:0': 纸
|
||||
'BOOK:0': 书
|
||||
'SLIME_BALL:0': 粘液球
|
||||
'STORAGE_MINECART:0': 运输矿车
|
||||
'POWERED_MINECART:0': 动力矿车
|
||||
'EGG:0': 鸡蛋
|
||||
'COMPASS:0': 指南针
|
||||
'FISHING_ROD:0': 钓鱼竿
|
||||
'WATCH:0': 钟
|
||||
'GLOWSTONE_DUST:0': 荧石粉
|
||||
'RAW_FISH:0': 生鱼
|
||||
# 2018-02-26 19:35:37 新增
|
||||
'RAW_FISH:1': 生鲑鱼
|
||||
'RAW_FISH:2': 小丑鱼
|
||||
'RAW_FISH:3': 河豚
|
||||
# ---------------------- #
|
||||
'COOKED_FISH:0': 熟鱼
|
||||
# 2018-02-26 19:37:20 新增
|
||||
'COOKED_FISH:1': 熟鲑鱼
|
||||
# ---------------------- #
|
||||
'INK_SACK:0': 墨囊
|
||||
# 2018-02-26 19:38:31 新增
|
||||
'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:0': 骨头
|
||||
'SUGAR:0': 糖
|
||||
'CAKE:0': 蛋糕
|
||||
'BED:0': 白色床
|
||||
'DIODE:0': 红石中继器
|
||||
'COOKIE:0': 曲奇
|
||||
'MAP:0': 地图
|
||||
'SHEARS:0': 剪刀
|
||||
'MELON:0': 西瓜
|
||||
'PUMPKIN_SEEDS:0': 南瓜种子
|
||||
'MELON_SEEDS:0': 西瓜种子
|
||||
'RAW_BEEF:0': 生牛肉
|
||||
'COOKED_BEEF:0': 牛排
|
||||
'RAW_CHICKEN:0': 生鸡肉
|
||||
'COOKED_CHICKEN:0': 熟鸡肉
|
||||
'ROTTEN_FLESH:0': 腐肉
|
||||
'ENDER_PEARL:0': 末影珍珠
|
||||
'BLAZE_ROD:0': 烈焰棒
|
||||
'GHAST_TEAR:0': 恶魂之泪
|
||||
'GOLD_NUGGET:0': 金粒
|
||||
'NETHER_STALK:0': 地狱疣
|
||||
'POTION:0': 水瓶
|
||||
'GLASS_BOTTLE:0': 玻璃瓶
|
||||
'SPIDER_EYE:0': 蜘蛛眼
|
||||
'FERMENTED_SPIDER_EYE:0': 发酵蛛眼
|
||||
'BLAZE_POWDER:0': 烈焰粉
|
||||
'MAGMA_CREAM:0': 岩浆膏
|
||||
'BREWING_STAND_ITEM:0': 酿造台
|
||||
'CAULDRON_ITEM:0': 炼药锅
|
||||
'EYE_OF_ENDER:0': 末影之眼
|
||||
'SPECKLED_MELON:0': 闪烁的西瓜
|
||||
'MONSTER_EGG:0': 怪物蛋
|
||||
'EXP_BOTTLE:0': 附魔之瓶
|
||||
'FIREBALL:0': 火焰弹
|
||||
'BOOK_AND_QUILL:0': 书与笔
|
||||
'WRITTEN_BOOK:0': 成书
|
||||
'EMERALD:0': 绿宝石
|
||||
'ITEM_FRAME:0': 物品展示框
|
||||
'FLOWER_POT_ITEM:0': 花盆
|
||||
'CARROT_ITEM:0': 胡萝卜
|
||||
'POTATO_ITEM:0': 马铃薯
|
||||
'BAKED_POTATO:0': 烤马铃薯
|
||||
'POISONOUS_POTATO:0': 毒马铃薯
|
||||
'EMPTY_MAP:0': 空地图
|
||||
'GOLDEN_CARROT:0': 金胡萝卜
|
||||
'SKULL_ITEM:0': 骷髅头颅
|
||||
'CARROT_STICK:0': 胡萝卜钓竿
|
||||
'NETHER_STAR:0': 下界之星
|
||||
'PUMPKIN_PIE:0': 南瓜派
|
||||
'FIREWORK:0': 烟花火箭
|
||||
'FIREWORK_CHARGE:0': 烟火之星
|
||||
'ENCHANTED_BOOK:0': 附魔书
|
||||
'REDSTONE_COMPARATOR:0': 红石比较器
|
||||
'NETHER_BRICK_ITEM:0': 地狱砖
|
||||
'QUARTZ:0': 下界石英
|
||||
'EXPLOSIVE_MINECART:0': TNT矿车
|
||||
'HOPPER_MINECART:0': 漏斗矿车
|
||||
'PRISMARINE_SHARD:0': 海晶碎片
|
||||
'PRISMARINE_CRYSTALS:0': 海晶砂粒
|
||||
'RABBIT:0': 生兔肉
|
||||
'COOKED_RABBIT:0': 熟兔肉
|
||||
'RABBIT_STEW:0': 兔肉煲
|
||||
'RABBIT_FOOT:0': 兔子脚
|
||||
'RABBIT_HIDE:0': 兔子皮
|
||||
'ARMOR_STAND:0': 盔甲架
|
||||
'IRON_BARDING:0': 铁马铠
|
||||
'GOLD_BARDING:0': 金马铠
|
||||
'DIAMOND_BARDING:0': 钻石马铠
|
||||
'LEASH:0': 拴绳
|
||||
'NAME_TAG:0': 命名牌
|
||||
'COMMAND_MINECART:0': 命令方块矿车
|
||||
'MUTTON:0': 生羊肉
|
||||
'COOKED_MUTTON:0': 熟羊肉
|
||||
'BANNER:0': 黑色旗帜
|
||||
'END_CRYSTAL:0': 末影水晶
|
||||
'SPRUCE_DOOR_ITEM:0': 云杉木门
|
||||
'BIRCH_DOOR_ITEM:0': 白桦木门
|
||||
'JUNGLE_DOOR_ITEM:0': 丛林木门
|
||||
'ACACIA_DOOR_ITEM:0': 金合欢木门
|
||||
'DARK_OAK_DOOR_ITEM:0': 深色橡木门
|
||||
'CHORUS_FRUIT:0': 紫颂果
|
||||
'CHORUS_FRUIT_POPPED:0': 爆裂紫颂果
|
||||
'BEETROOT:0': 甜菜根
|
||||
'BEETROOT_SEEDS:0': 甜菜种子
|
||||
'BEETROOT_SOUP:0': 甜菜汤
|
||||
'DRAGONS_BREATH:0': 龙息
|
||||
'SPLASH_POTION:0': 喷溅型水瓶
|
||||
'SPECTRAL_ARROW:0': 光灵箭
|
||||
'TIPPED_ARROW:0': 喷溅之箭
|
||||
'LINGERING_POTION:0': 滞留型水瓶
|
||||
'SHIELD:0': 盾牌
|
||||
'ELYTRA:0': 鞘翅
|
||||
'BOAT_SPRUCE:0': 云杉木船
|
||||
'BOAT_BIRCH:0': 桦木船
|
||||
'BOAT_JUNGLE:0': 丛林木船
|
||||
'BOAT_ACACIA:0': 金合欢木船
|
||||
'BOAT_DARK_OAK:0': 深色橡木船
|
||||
'TOTEM:0': 不死图腾
|
||||
'SHULKER_SHELL:0': 潜影壳
|
||||
'IRON_NUGGET:0': 铁粒
|
||||
'KNOWLEDGE_BOOK:0': 知识之书
|
||||
'GOLD_RECORD:0': 音乐唱片
|
||||
'GREEN_RECORD:0': 音乐唱片
|
||||
'RECORD_3:0': 音乐唱片
|
||||
'RECORD_4:0': 音乐唱片
|
||||
'RECORD_5:0': 音乐唱片
|
||||
'RECORD_6:0': 音乐唱片
|
||||
'RECORD_7:0': 音乐唱片
|
||||
'RECORD_8:0': 音乐唱片
|
||||
'RECORD_9:0': 音乐唱片
|
||||
'RECORD_10:0': 音乐唱片
|
||||
'RECORD_11:0': 音乐唱片
|
||||
'RECORD_12:0': 音乐唱片
|
1731
src/main/resources/simplei18n/high/zh_CN.yml
Normal file
1731
src/main/resources/simplei18n/high/zh_CN.yml
Normal file
File diff suppressed because it is too large
Load Diff
1523
src/main/resources/simplei18n/low/zh_CN.yml
Normal file
1523
src/main/resources/simplei18n/low/zh_CN.yml
Normal file
File diff suppressed because it is too large
Load Diff
@ -102,7 +102,7 @@ public class Main extends JavaPlugin {
|
||||
// 载入完成
|
||||
TLocale.Logger.info("NOTIFY.SUCCESS-LOADED", getDescription().getAuthors().toString(), getDescription().getVersion(), String.valueOf(TabooLib.getVersion()));
|
||||
// 文件保存
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, DataUtils::saveAllCaches, 20, 20 * 120);
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> DataUtils.saveAllCaches(), 20, 20 * 120);
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> PlayerDataManager.saveAllCaches(true, false), 20, 20 * 60);
|
||||
// 文件监控
|
||||
TLib.getTLib().getConfigWatcher().addSimpleListener(new File(getDataFolder(), "config.yml"), () -> {
|
||||
|
@ -161,6 +161,8 @@ public class TabooLib {
|
||||
return 11200;
|
||||
} else if (version.startsWith("v1_13")) {
|
||||
return 11300;
|
||||
} else if (version.startsWith("v1_14")) {
|
||||
return 11400;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ public class TabooLibMainCommand extends BaseMainCommand {
|
||||
@Override
|
||||
public void onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
ItemUtils.reloadItemCache();
|
||||
ItemUtils.reloadItemName();
|
||||
TLocale.sendTo(sender, "COMMANDS.TABOOLIB.ITEMRELOAD.SUCCESS-RELOAD");
|
||||
}
|
||||
};
|
||||
|
@ -2,7 +2,9 @@ package me.skymc.taboolib.common.nms;
|
||||
|
||||
import me.skymc.taboolib.common.function.TFunction;
|
||||
import me.skymc.taboolib.common.versioncontrol.SimpleVersionControl;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* @Author 坏黑
|
||||
@ -21,6 +23,10 @@ public abstract class NMSHandler {
|
||||
}
|
||||
}
|
||||
|
||||
abstract public String getName(ItemStack itemStack);
|
||||
|
||||
abstract public String getName(Entity entity);
|
||||
|
||||
abstract public void sendTitle(Player player, String title, int titleFadein, int titleStay, int titleFadeout, String subtitle, int subtitleFadein, int subtitleStay, int subtitleFadeout);
|
||||
|
||||
abstract public void sendActionBar(Player player, String text);
|
||||
|
@ -2,12 +2,24 @@ package me.skymc.taboolib.common.nms;
|
||||
|
||||
import me.skymc.taboolib.TabooLib;
|
||||
import me.skymc.taboolib.common.packet.TPacketHandler;
|
||||
import me.skymc.taboolib.nms.NMSUtils;
|
||||
import net.minecraft.server.v1_12_R1.ChatMessageType;
|
||||
import net.minecraft.server.v1_12_R1.EntityVillager;
|
||||
import net.minecraft.server.v1_12_R1.MinecraftServer;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_13_R2.IRegistry;
|
||||
import net.minecraft.server.v1_8_R3.ChatComponentText;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutChat;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutTitle;
|
||||
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftVillager;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
/**
|
||||
* @Author 坏黑
|
||||
@ -15,6 +27,114 @@ import org.bukkit.entity.Player;
|
||||
*/
|
||||
public class NMSHandlerImpl extends NMSHandler {
|
||||
|
||||
private Field entityTypesField;
|
||||
|
||||
public NMSHandlerImpl() {
|
||||
if (TabooLib.getVersionNumber() >= 11300) {
|
||||
for (Field declaredField : NMSUtils.getNMSClass("Entity").getDeclaredFields()) {
|
||||
if (declaredField.getType().getSimpleName().equals("EntityTypes")) {
|
||||
declaredField.setAccessible(true);
|
||||
entityTypesField = declaredField;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(ItemStack itemStack) {
|
||||
Object nmsItem = CraftItemStack.asNMSCopy(itemStack);
|
||||
if (TabooLib.getVersionNumber() >= 11300) {
|
||||
String name = ((net.minecraft.server.v1_8_R3.ItemStack) nmsItem).getItem().getName();
|
||||
if (itemStack.getItemMeta() instanceof PotionMeta) {
|
||||
name += ".effect." + ((net.minecraft.server.v1_8_R3.ItemStack) nmsItem).getTag().getString("Potion").replaceAll("minecraft:(strong_|long_)?", "");
|
||||
}
|
||||
return name;
|
||||
} else {
|
||||
String name = ((net.minecraft.server.v1_12_R1.ItemStack) nmsItem).getItem().a((net.minecraft.server.v1_12_R1.ItemStack) nmsItem);
|
||||
if (itemStack.getItemMeta() instanceof PotionMeta) {
|
||||
return name.replace("item.", "") + ".effect." + ((net.minecraft.server.v1_8_R3.ItemStack) nmsItem).getTag().getString("Potion").replaceAll("minecraft:(strong_|long_)?", "");
|
||||
}
|
||||
return name + ".name";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(Entity entity) {
|
||||
if (TabooLib.getVersionNumber() < 11300) {
|
||||
try {
|
||||
if (entity instanceof Player) {
|
||||
return "entity.Player.name";
|
||||
}
|
||||
if (entity instanceof Villager) {
|
||||
String name = "name";
|
||||
Object villager = ((org.bukkit.craftbukkit.v1_12_R1.entity.CraftVillager) entity).getHandle();
|
||||
Object export = new NBTTagCompound();
|
||||
((EntityVillager) villager).b((NBTTagCompound) export);
|
||||
int career = ((NBTTagCompound) export).getInt("Career");
|
||||
switch (((EntityVillager) villager).getProfession()) {
|
||||
case 0:
|
||||
if (career == 1) {
|
||||
name = "farmer";
|
||||
} else if (career == 2) {
|
||||
name = "fisherman";
|
||||
} else if (career == 3) {
|
||||
name = "shepherd";
|
||||
} else if (career == 4) {
|
||||
name = "fletcher";
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (career == 1) {
|
||||
name = "librarian";
|
||||
} else if (career == 2) {
|
||||
name = "cartographer";
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
name = "cleric";
|
||||
break;
|
||||
case 3:
|
||||
if (career == 1) {
|
||||
name = "armor";
|
||||
} else if (career == 2) {
|
||||
name = "weapon";
|
||||
} else if (career == 3) {
|
||||
name = "tool";
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (career == 1) {
|
||||
name = "butcher";
|
||||
} else if (career == 2) {
|
||||
name = "leather";
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
name = "nitwit";
|
||||
break;
|
||||
}
|
||||
return "entity.Villager." + name;
|
||||
}
|
||||
return "entity." + entity.getType().getEntityClass().getSimpleName() + ".name";
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
return "entity.null";
|
||||
} else {
|
||||
try {
|
||||
String name = "entity.minecraft." + IRegistry.ENTITY_TYPE.getKey((net.minecraft.server.v1_13_R2.EntityTypes<?>) entityTypesField.get(((org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity) entity).getHandle())).getKey();
|
||||
if (entity instanceof Villager && ((CraftVillager) entity).getCareer() != null) {
|
||||
name += "." + String.valueOf(((CraftVillager) entity).getCareer()).toLowerCase();
|
||||
}
|
||||
return name;
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
return "entity.null";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendTitle(Player player, String title, int titleFadein, int titleStay, int titleFadeout, String subtitle, int subtitleFadein, int subtitleStay, int subtitleFadeout) {
|
||||
TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TIMES, new ChatComponentText(String.valueOf(title)), titleFadein, titleStay, titleFadeout));
|
||||
|
81
src/main/scala/me/skymc/taboolib/common/util/SimpleI18n.java
Normal file
81
src/main/scala/me/skymc/taboolib/common/util/SimpleI18n.java
Normal file
@ -0,0 +1,81 @@
|
||||
package me.skymc.taboolib.common.util;
|
||||
|
||||
import com.ilummc.tlib.resources.TLocaleLoader;
|
||||
import me.skymc.taboolib.TabooLib;
|
||||
import me.skymc.taboolib.common.function.TFunction;
|
||||
import me.skymc.taboolib.common.nms.NMSHandler;
|
||||
import me.skymc.taboolib.fileutils.ConfigUtils;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SpawnEggMeta;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @Author 坏黑
|
||||
* @Since 2019-05-22 1:16
|
||||
*/
|
||||
@TFunction(enable = "init")
|
||||
public class SimpleI18n {
|
||||
|
||||
private static FileConfiguration lang;
|
||||
|
||||
static void init() {
|
||||
File localeFile = getLocaleFile(TabooLib.instance());
|
||||
if (localeFile == null) {
|
||||
lang = new YamlConfiguration();
|
||||
} else {
|
||||
lang = ConfigUtils.load(TabooLib.instance(), localeFile);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getCustomName(Entity entity) {
|
||||
return entity != null ? Optional.ofNullable(entity.getCustomName()).orElse(getName(entity)) : getName(entity);
|
||||
}
|
||||
|
||||
public static String getCustomName(ItemStack item) {
|
||||
if (item != null) {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
return itemMeta != null && itemMeta.hasDisplayName() ? itemMeta.getDisplayName() : getName(item);
|
||||
}
|
||||
return getName(item);
|
||||
}
|
||||
|
||||
public static String getName(Entity entity) {
|
||||
return entity == null ? "-" : lang.getString(NMSHandler.getHandler().getName(entity), entity.getName());
|
||||
}
|
||||
|
||||
public static String getName(ItemStack item) {
|
||||
if (item == null) {
|
||||
return "-";
|
||||
}
|
||||
if (TabooLib.getVersionNumber() < 11300) {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
if (itemMeta instanceof SpawnEggMeta) {
|
||||
String spawnEggType = lang.getString("entity." + ((SpawnEggMeta) itemMeta).getSpawnedType().getEntityClass().getSimpleName() + ".name");
|
||||
if (spawnEggType != null) {
|
||||
return lang.getString(NMSHandler.getHandler().getName(item), item.getType().name().toLowerCase().replace("_", "")) + " " + spawnEggType;
|
||||
}
|
||||
}
|
||||
}
|
||||
return lang.getString(NMSHandler.getHandler().getName(item), item.getType().name().toLowerCase().replace("_", ""));
|
||||
}
|
||||
|
||||
private static void releaseLocales(Plugin plugin) {
|
||||
TLocaleLoader.getLocalePriority().stream().filter(localeName -> !new File(plugin.getDataFolder(), "simpleI18n/" + getVersion() + "/" + localeName + ".yml").exists() && plugin.getResource("simpleI18n/" + getVersion() + "/" + localeName + ".yml") != null).forEach(localeName -> plugin.saveResource("simpleI18n/" + getVersion() + "/" + localeName + ".yml", true));
|
||||
}
|
||||
|
||||
private static File getLocaleFile(Plugin plugin) {
|
||||
releaseLocales(plugin);
|
||||
return TLocaleLoader.getLocalePriority().stream().map(localeName -> new File(plugin.getDataFolder(), "simpleI18n/" + getVersion() + "/" + localeName + ".yml")).filter(File::exists).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
private static String getVersion() {
|
||||
return TabooLib.getVersionNumber() < 11300 ? "low" : "high";
|
||||
}
|
||||
}
|
@ -4,8 +4,8 @@ import com.ilummc.tlib.resources.TLocale;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.skymc.taboolib.Main;
|
||||
import me.skymc.taboolib.TabooLib;
|
||||
import me.skymc.taboolib.common.configuration.TConfiguration;
|
||||
import me.skymc.taboolib.common.function.TFunction;
|
||||
import me.skymc.taboolib.common.util.SimpleI18n;
|
||||
import me.skymc.taboolib.fileutils.ConfigUtils;
|
||||
import me.skymc.taboolib.itemnbtapi.NBTItem;
|
||||
import me.skymc.taboolib.itemnbtapi.NBTList;
|
||||
@ -44,7 +44,6 @@ public class ItemUtils {
|
||||
private static File finalItemsFolder;
|
||||
private static FileConfiguration itemDir;
|
||||
private static FileConfiguration itemCache;
|
||||
private static TConfiguration itemName;
|
||||
private static LinkedHashMap<String, String> itemLib = new LinkedHashMap<>();
|
||||
private static LinkedHashMap<String, ItemStack> itemCaches = new LinkedHashMap<>();
|
||||
private static LinkedHashMap<String, ItemStack> itemCachesFinal = new LinkedHashMap<>();
|
||||
@ -52,7 +51,6 @@ public class ItemUtils {
|
||||
public static void init() {
|
||||
try {
|
||||
reloadItemDir();
|
||||
reloadItemName();
|
||||
reloadItemCache();
|
||||
} catch (Exception e) {
|
||||
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-ITEMS", e.toString());
|
||||
@ -66,15 +64,6 @@ public class ItemUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void reloadItemName() {
|
||||
itemName = TConfiguration.createInResource(Main.getInst(), "Language/ITEM_NAME.yml");
|
||||
itemName.listener(() -> {
|
||||
itemName.getConfigurationSection("").getKeys(false).forEach(a -> itemLib.put(a, itemName.getString(a)));
|
||||
TabooLib.debug("Loaded " + itemLib.size() + " items name.");
|
||||
// TLocale.Logger.info("ITEM-UTILS.SUCCESS-LOAD-NAMES", String.valueOf(itemLib.size()));
|
||||
}).runListener();
|
||||
}
|
||||
|
||||
public static void reloadItemCache() {
|
||||
itemCaches.clear();
|
||||
itemCachesFinal.clear();
|
||||
@ -128,11 +117,7 @@ public class ItemUtils {
|
||||
}
|
||||
|
||||
public static String getCustomName(ItemStack item) {
|
||||
if (item == null || item.getType().equals(Material.AIR)) {
|
||||
return TLocale.asString("ITEM-UTILS.EMPTY-ITEM");
|
||||
}
|
||||
int data = item.getType().getMaxDurability() == 0 ? item.getDurability() : 0;
|
||||
return item.getItemMeta().hasDisplayName() ? item.getItemMeta().getDisplayName() : itemLib.get(item.getType() + ":" + data) == null ? item.getType().toString() : itemLib.get(item.getType() + ":" + data);
|
||||
return SimpleI18n.getCustomName(item);
|
||||
}
|
||||
|
||||
public static ItemStack setName(ItemStack i, String n) {
|
||||
@ -157,7 +142,7 @@ public class ItemUtils {
|
||||
}
|
||||
|
||||
public static boolean isNull(ItemStack item) {
|
||||
return item == null || item.getType().equals(Material.AIR);
|
||||
return item == null || item.getType() == Material.AIR;
|
||||
}
|
||||
|
||||
public static boolean isName(ItemStack i, String a) {
|
||||
|
Loading…
Reference in New Issue
Block a user