feat: add translate
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Global.h"
|
||||||
|
|
||||||
|
std::string defaultConfig = R"({
|
||||||
|
"ConsoleLog": {
|
||||||
|
"JoinMessage": true,
|
||||||
|
"LeftMessage": true,
|
||||||
|
"DeathMessage": true
|
||||||
|
},
|
||||||
|
"FileLog": {
|
||||||
|
"Enabled": false,
|
||||||
|
"Path": "./logs/DeathLog.log"
|
||||||
|
},
|
||||||
|
"ServerSideTranslation": {
|
||||||
|
"Enabled": false,
|
||||||
|
"Language": "en_US"
|
||||||
|
}
|
||||||
|
})";
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#include "Global.h"
|
||||||
|
|
||||||
|
void RegisterDamageDefinition() {
|
||||||
|
// GMLIB::Mod::DamageCause::registerDamageCause()
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListenEvents() {
|
||||||
|
auto& eventBus = ll::event::EventBus::getInstance();
|
||||||
|
if (ConfigData::mJoinMessage) {
|
||||||
|
eventBus.emplaceListener<ll::event::player::PlayerConnectEvent>([](ll::event::player::PlayerConnectEvent& ev) {
|
||||||
|
infoLogger.info(
|
||||||
|
"{}",
|
||||||
|
fmt::format(fg(fmt::color::yellow), tr("multiplayer.player.joined", {ev.self().getName()}))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (ConfigData::mLeftMessage) {
|
||||||
|
eventBus.emplaceListener<ll::event::player::PlayerLeaveEvent>([](ll::event::player::PlayerLeaveEvent& ev) {
|
||||||
|
infoLogger.info(
|
||||||
|
"{}",
|
||||||
|
fmt::format(fg(fmt::color::yellow), tr("multiplayer.player.left", {ev.self().getName()}))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (ConfigData::mDeathMessage) {
|
||||||
|
eventBus.emplaceListener<GMLIB::Event::EntityEvent::DeathMessageAfterEvent>(
|
||||||
|
[](GMLIB::Event::EntityEvent::DeathMessageAfterEvent& ev) {
|
||||||
|
auto msg = ev.getDeathMessage();
|
||||||
|
deathLogger.info(tr(msg.first, msg.second));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,3 +4,18 @@
|
|||||||
#define PLUGIN_NAME "DeathMessages"
|
#define PLUGIN_NAME "DeathMessages"
|
||||||
|
|
||||||
extern ll::Logger logger;
|
extern ll::Logger logger;
|
||||||
|
extern ll::Logger deathLogger;
|
||||||
|
extern ll::Logger infoLogger;
|
||||||
|
|
||||||
|
namespace ConfigData {
|
||||||
|
extern bool mServerSideLang;
|
||||||
|
extern bool mJoinMessage;
|
||||||
|
extern bool mLeftMessage;
|
||||||
|
extern bool mDeathMessage;
|
||||||
|
} // namespace ConfigData
|
||||||
|
|
||||||
|
extern std::string tr(std::string key, std::vector<std::string> data = {});
|
||||||
|
|
||||||
|
extern void initPlugin();
|
||||||
|
extern void RegisterDamageDefinition();
|
||||||
|
extern void ListenEvents();
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
#include "Config.h"
|
||||||
|
#include "Global.h"
|
||||||
|
#include "Language.h"
|
||||||
|
|
||||||
|
ll::Logger deathLogger("Death");
|
||||||
|
ll::Logger infoLogger("Server");
|
||||||
|
|
||||||
|
GMLIB::Files::JsonConfig* Config = nullptr;
|
||||||
|
GMLIB::Files::I18n::LangI18n* Language = nullptr;
|
||||||
|
int commandPermissionLevel = 4;
|
||||||
|
|
||||||
|
namespace ConfigData {
|
||||||
|
bool mServerSideLang = false;
|
||||||
|
bool mJoinMessage = false;
|
||||||
|
bool mLeftMessage = false;
|
||||||
|
bool mDeathMessage = false;
|
||||||
|
} // namespace ConfigData
|
||||||
|
|
||||||
|
|
||||||
|
void initServerSideTranslation() {
|
||||||
|
std::string langPath = "./plugins/DeathMessages/language/";
|
||||||
|
std::string languageCode = Config->getValue<std::string>({"ServerSideTranslation", "Language"}, "en_US");
|
||||||
|
Language = new GMLIB::Files::I18n::LangI18n(langPath);
|
||||||
|
Language->updateOrCreateLanguage("en_US", en_US);
|
||||||
|
Language->updateOrCreateLanguage("zh_CN", zh_CN);
|
||||||
|
Language->loadAllLanguages();
|
||||||
|
Language->chooseLanguage(languageCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initResourcePackTranslation() {
|
||||||
|
GMLIB::Mod::VanillaFix::setFixI18nEnabled();
|
||||||
|
std::string resourcePath = "./plugins/DeathMessages/resource/";
|
||||||
|
auto resource = GMLIB::Files::ResourceLanguage::ResourceLanguage(resourcePath, PLUGIN_NAME, 0, 8, 0);
|
||||||
|
resource.addLanguage("en_US", en_US);
|
||||||
|
resource.addLanguage("zh_CN", zh_CN);
|
||||||
|
resource.initLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string tr(std::string key, std::vector<std::string> data) {
|
||||||
|
if (ConfigData::mServerSideLang) {
|
||||||
|
for (auto& info : data) {
|
||||||
|
ll::utils::string_utils::replaceAll(info, "%", "");
|
||||||
|
info = Language->translate(info);
|
||||||
|
}
|
||||||
|
return Language->translate(key, data);
|
||||||
|
}
|
||||||
|
return I18n::get(key, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initConfig() {
|
||||||
|
Config = new GMLIB::Files::JsonConfig("./plugins/DeathMessages/config/config.json", defaultConfig);
|
||||||
|
Config->init();
|
||||||
|
ConfigData::mDeathMessage = Config->getValue<bool>({"ConsoleLog", "DeathMessage"}, true);
|
||||||
|
ConfigData::mJoinMessage = Config->getValue<bool>({"ConsoleLog", "JoinMessage"}, true);
|
||||||
|
ConfigData::mLeftMessage = Config->getValue<bool>({"ConsoleLog", "LeftMessage"}, true);
|
||||||
|
ConfigData::mServerSideLang = Config->getValue<bool>({"ServerSideTranslation", "Enabled"}, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initPlugin() {
|
||||||
|
initConfig();
|
||||||
|
if (ConfigData::mServerSideLang) {
|
||||||
|
initServerSideTranslation();
|
||||||
|
} else {
|
||||||
|
initResourcePackTranslation();
|
||||||
|
}
|
||||||
|
if (Config->getValue<bool>({"FileLog", "Enabled"}, false)) {
|
||||||
|
auto path = Config->getValue<std::string>({"FileLog", "Path"}, "./logs/DeathLog.log");
|
||||||
|
deathLogger.setFile(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
+389
@@ -0,0 +1,389 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Global.h"
|
||||||
|
|
||||||
|
std::string en_US = R"(
|
||||||
|
|
||||||
|
entity.area_effect_cloud.name=Area Effect Cloud
|
||||||
|
entity.armor_stand.name=Armor Stand
|
||||||
|
entity.arrow.name=Arrow
|
||||||
|
entity.bat.name=Bat
|
||||||
|
entity.bee.name=Bee
|
||||||
|
entity.blaze.name=Blaze
|
||||||
|
entity.boat.name=Boat
|
||||||
|
entity.cat.name=Cat
|
||||||
|
entity.cave_spider.name=Cave Spider
|
||||||
|
entity.chicken.name=Chicken
|
||||||
|
entity.cow.name=Cow
|
||||||
|
entity.creeper.name=Creeper
|
||||||
|
entity.dolphin.name=Dolphin
|
||||||
|
entity.goat.name=Goat
|
||||||
|
entity.panda.name=Panda
|
||||||
|
entity.donkey.name=Donkey
|
||||||
|
entity.dragon_fireball.name=Dragon Fireball
|
||||||
|
entity.drowned.name=Drowned
|
||||||
|
entity.egg.name=Egg
|
||||||
|
entity.elder_guardian.name=Elder Guardian
|
||||||
|
entity.ender_crystal.name=Ender Crystal
|
||||||
|
entity.ender_dragon.name=Ender Dragon
|
||||||
|
entity.enderman.name=Enderman
|
||||||
|
entity.endermite.name=Endermite
|
||||||
|
entity.ender_pearl.name=Ender Pearl
|
||||||
|
entity.evocation_illager.name=Evoker
|
||||||
|
entity.evocation_fang.name=Evoker Fang
|
||||||
|
entity.eye_of_ender_signal.name=Eye of Ender
|
||||||
|
entity.falling_block.name=Falling Block
|
||||||
|
entity.fireball.name=Fireball
|
||||||
|
entity.fireworks_rocket.name=Firework Rocket
|
||||||
|
entity.fishing_hook.name=Fishing Hook
|
||||||
|
entity.fish.clownfish.name=Clownfish
|
||||||
|
entity.fox.name=Fox
|
||||||
|
entity.cod.name=Cod
|
||||||
|
entity.pufferfish.name=Pufferfish
|
||||||
|
entity.salmon.name=Salmon
|
||||||
|
entity.tropicalfish.name=Tropical Fish
|
||||||
|
entity.axolotl.name=Axolotl
|
||||||
|
entity.ghast.name=Ghast
|
||||||
|
entity.glow_squid.name=Glow Squid
|
||||||
|
entity.piglin_brute.name=Piglin Brute
|
||||||
|
entity.guardian.name=Guardian
|
||||||
|
entity.hoglin.name=Hoglin
|
||||||
|
entity.horse.name=Horse
|
||||||
|
entity.husk.name=Husk
|
||||||
|
entity.ravager.name=Ravager
|
||||||
|
entity.iron_golem.name=Iron Golem
|
||||||
|
entity.item.name=Item
|
||||||
|
entity.leash_knot.name=Leash Knot
|
||||||
|
entity.lightning_bolt.name=Lightning Bolt
|
||||||
|
entity.lingering_potion.name=Lingering Potion
|
||||||
|
entity.llama.name=Llama
|
||||||
|
entity.trader_llama.name=Trader Llama
|
||||||
|
entity.llama_spit.name=Llama Spit
|
||||||
|
entity.magma_cube.name=Magma Cube
|
||||||
|
entity.minecart.name=Minecart
|
||||||
|
entity.chest_minecart.name=Minecart with Chest
|
||||||
|
entity.command_block_minecart.name=Minecart with Command Block
|
||||||
|
entity.furnace_minecart.name=Minecart with Furnace
|
||||||
|
entity.hopper_minecart.name=Minecart with Hopper
|
||||||
|
entity.tnt_minecart.name=Minecart with TNT
|
||||||
|
entity.mule.name=Mule
|
||||||
|
entity.mooshroom.name=Mooshroom
|
||||||
|
entity.moving_block.name=Moving Block
|
||||||
|
entity.ocelot.name=Ocelot
|
||||||
|
entity.painting.name=Painting
|
||||||
|
entity.parrot.name=Parrot
|
||||||
|
entity.phantom.name=Phantom
|
||||||
|
entity.pig.name=Pig
|
||||||
|
entity.piglin.name=Piglin
|
||||||
|
entity.pillager.name=Pillager
|
||||||
|
entity.polar_bear.name=Polar Bear
|
||||||
|
entity.rabbit.name=Rabbit
|
||||||
|
entity.sheep.name=Sheep
|
||||||
|
entity.shulker.name=Shulker
|
||||||
|
entity.shulker_bullet.name=Shulker Bullet
|
||||||
|
entity.silverfish.name=Silverfish
|
||||||
|
entity.skeleton.name=Skeleton
|
||||||
|
entity.skeleton_horse.name=Skeleton Horse
|
||||||
|
entity.stray.name=Stray
|
||||||
|
entity.slime.name=Slime
|
||||||
|
entity.small_fireball.name=Small Fireball
|
||||||
|
entity.sniffer.name=Sniffer
|
||||||
|
entity.snowball.name=Snowball
|
||||||
|
entity.snow_golem.name=Snow Golem
|
||||||
|
entity.spider.name=Spider
|
||||||
|
entity.splash_potion.name=Potion
|
||||||
|
entity.squid.name=Squid
|
||||||
|
entity.strider.name=Strider
|
||||||
|
entity.tnt.name=Block of TNT
|
||||||
|
entity.thrown_trident.name=Trident
|
||||||
|
entity.tripod_camera.name=Tripod Camera
|
||||||
|
entity.turtle.name=Turtle
|
||||||
|
entity.unknown.name=Unknown
|
||||||
|
entity.vex.name=Vex
|
||||||
|
entity.villager.name=Villager
|
||||||
|
entity.villager.armor=Armorer
|
||||||
|
entity.villager.butcher=Butcher
|
||||||
|
entity.villager.cartographer=Cartographer
|
||||||
|
entity.villager.cleric=Cleric
|
||||||
|
entity.villager.farmer=Farmer
|
||||||
|
entity.villager.fisherman=Fisherman
|
||||||
|
entity.villager.fletcher=Fletcher
|
||||||
|
entity.villager.leather=Leatherworker
|
||||||
|
entity.villager.librarian=Librarian
|
||||||
|
entity.villager.shepherd=Shepherd
|
||||||
|
entity.villager.tool=Tool Smith
|
||||||
|
entity.villager.weapon=Weapon Smith
|
||||||
|
entity.villager.mason=Stone Mason
|
||||||
|
entity.villager.unskilled=Unskilled Villager
|
||||||
|
entity.villager_v2.name=Villager
|
||||||
|
entity.vindicator.name=Vindicator
|
||||||
|
entity.wandering_trader.name=Wandering Trader
|
||||||
|
entity.witch.name=Witch
|
||||||
|
entity.wither.name=Wither
|
||||||
|
entity.wither_skeleton.name=Wither Skeleton
|
||||||
|
entity.wither_skull.name=Wither Skull
|
||||||
|
entity.wither_skull_dangerous.name=Wither Skull
|
||||||
|
entity.wolf.name=Wolf
|
||||||
|
entity.xp_orb.name=Experience Orb
|
||||||
|
entity.xp_bottle.name=Bottle o' Enchanting
|
||||||
|
entity.zoglin.name=Zoglin
|
||||||
|
entity.zombie.name=Zombie
|
||||||
|
entity.zombie_horse.name=Zombie Horse
|
||||||
|
entity.zombie_pigman.name=Zombified Piglin
|
||||||
|
entity.zombie_villager.name=Zombie Villager
|
||||||
|
entity.zombie_villager_v2.name=Zombie Villager
|
||||||
|
entity.frog.name=Frog
|
||||||
|
entity.tadpole.name=Tadpole
|
||||||
|
entity.warden.name=Warden
|
||||||
|
entity.allay.name=Allay
|
||||||
|
entity.camel.name=Camel
|
||||||
|
entity.chest_raft.name=Raft with Chest
|
||||||
|
)";
|
||||||
|
|
||||||
|
std::string zh_CN = R"(
|
||||||
|
death.attack.anvil=%1$s被坠落的铁砧压扁了 #
|
||||||
|
death.attack.anvil.player=%1$sz在与%2$s战斗时被坠落的铁砧压扁了 #
|
||||||
|
death.attack.anvil.item=%1$s在与持有%3$s的%2$s战斗时被坠落的铁砧压扁了 #
|
||||||
|
death.attack.arrow=%1$s被%2$s射杀 #
|
||||||
|
death.attack.arrow.item=%1$s被%2$s用%3$s射杀 #
|
||||||
|
death.attack.bullet=%1$s被%2$s狙击了 #
|
||||||
|
death.attack.cactus=%1$s被戳死了 #
|
||||||
|
death.attack.cactus.player=%1$s在试图逃离%2$s时撞上了仙人掌 #
|
||||||
|
death.attack.cactus.item=%1$s在试图逃离持有%3$s的%2$s时撞上了仙人掌 #
|
||||||
|
death.attack.drown=%1$s淹死了 #
|
||||||
|
death.attack.drown.player=%1$s在试图逃离%2$s时淹死了 #
|
||||||
|
death.attack.drown.item=%1$s在试图逃离持有%3$s的%2$s时淹死了 #
|
||||||
|
death.attack.explosion=%1$s爆炸了 #
|
||||||
|
death.attack.explosion.player=%1$s被%2$s炸死了 #
|
||||||
|
death.attack.explosion.item=%1$s被%2$s使用%3$s炸死了 #
|
||||||
|
death.attack.badRespawnPoint.message=%1$s被[刻意的游戏设计]杀死了 #
|
||||||
|
death.attack.fall=%1$s落地过猛 #
|
||||||
|
death.attack.fall.player=%1$s在试图逃离%2$s时落地过猛 #
|
||||||
|
death.attack.fall.item=%1$s在试图逃离持有%3$s的%2$s时落地过猛 #
|
||||||
|
death.attack.fallingBlock=%1$s被坠落的方块压扁了 #
|
||||||
|
death.attack.fallingBlock.player=%1$sz在与%2$s战斗时被坠落的方块压扁了 #
|
||||||
|
death.attack.fallingBlock.item=%1$s在与持有%3$s的%2$s战斗时被坠落的方块压扁了 #
|
||||||
|
death.attack.fireball=%1$s被%2$s用火球烧死了 #
|
||||||
|
death.attack.fireball.item=%1$s被%2$s用%3$s发射的火球烧死了 #
|
||||||
|
death.attack.fireworks=%1$s随着一声巨响消失了 #
|
||||||
|
death.attack.fireworks.player=%1$s在与%2$s战斗时随着一声巨响消失了 #
|
||||||
|
death.attack.fireworks.item=%1$s随着%2$s用%3$s发射的烟花发出的巨响消失了 #
|
||||||
|
death.attack.flyIntoWall=%1$s感受到了动能 #
|
||||||
|
death.attack.flyIntoWall.player=%1$s在试图逃离%2$s时感受到了动能 #
|
||||||
|
death.attack.flyIntoWall.item=%1$s在试图逃离持有%3$s的%2$s时感受到了动能 #
|
||||||
|
death.attack.generic=%1$s死了 #
|
||||||
|
death.attack.generic.player=%1$s死于%2$s #
|
||||||
|
death.attack.indirectMagic=%1$s被%2$s使用的魔法杀死了 #
|
||||||
|
death.attack.indirectMagic.item=%1$s被%2$s用%3$s杀死了 #
|
||||||
|
death.attack.inFire=%1$s浴火焚身 #
|
||||||
|
death.attack.inFire.player=%1$s在与%2$s战斗时不慎走入了火中 #
|
||||||
|
death.attack.inFire.item=%1$s在与持有%3$s的%2$s战斗时不慎走入了火中 #
|
||||||
|
death.attack.inWall=%1$s在墙里窒息而亡 #
|
||||||
|
death.attack.inWall.player=%1$s在与%2$s战斗时在墙里窒息而亡 #
|
||||||
|
death.attack.inWall.item=%1$s在与持有%3$s的%2$s战斗时在墙里窒息而亡 #
|
||||||
|
death.attack.lava=%1$s试图在熔岩里游泳 #
|
||||||
|
death.attack.lava.player=%1$s在试图逃离%2$s时试图在熔岩里游泳 #
|
||||||
|
death.attack.lava.item=%1$s在试图逃离持有%3$s的%2$s时试图在熔岩里游泳 #
|
||||||
|
death.attack.lightningBolt=%1$s被闪电击中 #
|
||||||
|
death.attack.lightningBolt.player=%1$s在与%2$s战斗时被闪电击中 #
|
||||||
|
death.attack.lightningBolt.item=%1$s在与持有%3$s的%2$s战斗时被闪电击中 #
|
||||||
|
death.attack.magic=%1$s被魔法杀死了 #
|
||||||
|
death.attack.hotFloor=%1$s发现地板是熔岩做的 #
|
||||||
|
death.attack.hotFloor.player=%1$s因%2$s而步入危险之地 #
|
||||||
|
death.attack.hotFloor.item=%1$s因持有%3$s的%2$s而步入危险之地 #
|
||||||
|
death.attack.mob=%1$s被%2$s杀死了 #
|
||||||
|
death.attack.mob.item=%1$s被%2$s用%3$s杀死了 #
|
||||||
|
death.attack.sting=%1$s被%2$s蛰死了 #
|
||||||
|
death.attack.sting.item=%1$s被%2$s用%3$s蛰死了 #
|
||||||
|
death.attack.onFire=%1$s被烧死了 #
|
||||||
|
death.attack.onFire.player=%1$s在与%2$s战斗时被烤的酥脆 #
|
||||||
|
death.attack.onFire.item=%1$s在与持有%3$s的%2$s战斗时被烤的酥脆 #
|
||||||
|
death.attack.outOfWorld=%1$s掉出了这个世界 #
|
||||||
|
death.attack.outOfWorld.player=%1$s与%2$s不共戴天 #
|
||||||
|
death.attack.outOfWorld.item=%1$s与持有%3$s的%2$s不共戴天 #
|
||||||
|
death.attack.player=%1$s被%2$s杀死了 #
|
||||||
|
death.attack.player.item=%1$s被%2$s用%3$s杀死了 #
|
||||||
|
death.attack.spit=%1$s被%2$s的口水淹死了 #
|
||||||
|
death.attack.starve=%1$s饿死了 #
|
||||||
|
death.attack.starve.player=%1$s在与%2$s战斗时饿死了 #
|
||||||
|
death.attack.starve.item=%1$s在与持有%3$s的%2$s战斗时饿死了 #
|
||||||
|
death.attack.sweetBerry=%1$s被甜浆果丛刺死了 #
|
||||||
|
death.attack.sweetBerry.player=%1$s在试图逃离%2$s时被甜浆果丛刺死了 #
|
||||||
|
death.attack.sweetBerry.item=%1$s在试图逃离持有%3$s的%2$s时被甜浆果丛刺死了 #
|
||||||
|
death.attack.thorns=%1$s在试图伤害%2$s时被杀 #
|
||||||
|
death.attack.thorns.item=%1$s在试图伤害%2$s时被%3$s杀死 #
|
||||||
|
death.attack.thrown=%1$s被%2$s给砸死了 #
|
||||||
|
death.attack.thrown.item=%1$s被%2$s用%3$s给砸死了 #
|
||||||
|
death.attack.trident=%1$s被%2$s刺穿了 #
|
||||||
|
death.attack.trident.item=%1$s被%2$s使用%3$s刺穿了 #
|
||||||
|
death.attack.wither=%1$s凋零了 #
|
||||||
|
death.attack.wither.player=%1$s在与%2$s战斗时凋零了 #
|
||||||
|
death.attack.wither.item=%1$s在与持有%3$s的%2$s战斗时凋零了 #
|
||||||
|
death.attack.freeze=%1$s被冻死了 #
|
||||||
|
death.attack.freeze.player=%1$s被%2$s冻死了 #
|
||||||
|
death.attack.freeze.item=%1$s被持有%3$s的%2$s冻死了 #
|
||||||
|
death.attack.sonicBoom=%1$s被一道音波尖啸抹除了 #
|
||||||
|
death.attack.sonicBoom.player=%1$s在试图逃离%2$s时被一道音波尖啸抹除了 #
|
||||||
|
death.attack.stalactite=%1$s被坠落的钟乳石刺穿了 #
|
||||||
|
death.attack.stalactite.player=%1$s在与%2$s战斗时被坠落的钟乳石刺穿了 #
|
||||||
|
death.attack.stalactite.item=%1$s在与持有%3$s的%2$s战斗时被坠落的钟乳石刺穿了 #
|
||||||
|
death.attack.stalagmite=%1$s被石笋刺穿了 #
|
||||||
|
death.attack.stalagmite.player=%1$s在与%2$s战斗时被石笋刺穿了 #
|
||||||
|
death.attack.stalagmite.item=%1$s在与持有%3$s的%2$s战斗时被石笋刺穿了 #
|
||||||
|
death.attack.witherSkull=%1$s被%2$s发射的头颅射杀 #
|
||||||
|
death.attack.witherSkull.item=%1$s被%2$s用%3$s发射的头颅射杀 #
|
||||||
|
death.attack.even_more_magic=%1$s被不为人知的魔法杀死了 #
|
||||||
|
death.attack.genericKill=%1$s被杀死了 #
|
||||||
|
death.attack.genericKill.player=%1$s在与%2$s战斗时被杀死了 #
|
||||||
|
death.attack.genericKill.item=%1$s在与持有%3$s的%2$s战斗时被杀死了 #
|
||||||
|
death.attack.dragonBreath=%1$s被龙息烤熟了 #
|
||||||
|
death.attack.dragonBreath.player=%1$s被%2$s的龙息烤熟了 #
|
||||||
|
death.attack.dryout=%1$s因脱水而死
|
||||||
|
death.attack.dryout.player=%1$s在试图逃离%2$s时因脱水而死
|
||||||
|
death.attack.outsideBorder=%1$s脱离了这个世界
|
||||||
|
death.attack.outsideBorder.player=%1$s在与%2$s战斗时脱离了这个世界
|
||||||
|
death.fell.accident.generic=%1$s从高处摔了下来 #
|
||||||
|
death.fell.assist=%1$s因为%2$s注定要摔死 #
|
||||||
|
death.fell.assist.item=%1$s因为%2$s使用了%3$s注定要摔死 #
|
||||||
|
death.fell.finish=%1$s摔伤得太重并被%2$s完结了生命 #
|
||||||
|
death.fell.finish.item=%1$s摔伤得太重并被%2$s用%3$s完结了生命 #
|
||||||
|
death.fell.killer=%1$s注定要摔死
|
||||||
|
|
||||||
|
multiplayer.player.joined=%s加入了游戏 #
|
||||||
|
multiplayer.player.left=%s退出了游戏 #
|
||||||
|
|
||||||
|
entity.area_effect_cloud.name=区域效果云 #
|
||||||
|
entity.armor_stand.name=盔甲架 #
|
||||||
|
entity.arrow.name=箭 #
|
||||||
|
entity.bat.name=蝙蝠 #
|
||||||
|
entity.bee.name=蜜蜂 #
|
||||||
|
entity.blaze.name=烈焰人 #
|
||||||
|
entity.boat.name=船 #
|
||||||
|
entity.cat.name=猫 #
|
||||||
|
entity.cave_spider.name=洞穴蜘蛛 #
|
||||||
|
entity.chicken.name=鸡 #
|
||||||
|
entity.cow.name=牛 #
|
||||||
|
entity.creeper.name=苦力怕 #
|
||||||
|
entity.dolphin.name=海豚 #
|
||||||
|
entity.goat.name=山羊 #
|
||||||
|
entity.panda.name=熊猫 #
|
||||||
|
entity.donkey.name=驴 #
|
||||||
|
entity.dragon_fireball.name=末影龙火球 #
|
||||||
|
entity.drowned.name=溺尸 #
|
||||||
|
entity.egg.name=鸡蛋 #
|
||||||
|
entity.elder_guardian.name=远古守卫者 #
|
||||||
|
entity.ender_crystal.name=末地水晶 #
|
||||||
|
entity.ender_dragon.name=末影龙 #
|
||||||
|
entity.enderman.name=末影人 #
|
||||||
|
entity.endermite.name=末影螨 #
|
||||||
|
entity.ender_pearl.name=末影珍珠 #
|
||||||
|
entity.evocation_illager.name=唤魔者 #
|
||||||
|
entity.evocation_fang.name=唤魔者尖牙 #
|
||||||
|
entity.eye_of_ender_signal.name=末影之眼 #
|
||||||
|
entity.falling_block.name=下落的方块 #
|
||||||
|
entity.fireball.name=火球 #
|
||||||
|
entity.fireworks_rocket.name=烟花火箭 #
|
||||||
|
entity.fishing_hook.name=鱼钩 #
|
||||||
|
entity.fish.clownfish.name=小丑鱼 #
|
||||||
|
entity.fox.name=狐狸 #
|
||||||
|
entity.cod.name=鳕鱼 #
|
||||||
|
entity.pufferfish.name=河豚 #
|
||||||
|
entity.salmon.name=鲑鱼 #
|
||||||
|
entity.tropicalfish.name=热带鱼 #
|
||||||
|
entity.axolotl.name=美西螈 #
|
||||||
|
entity.ghast.name=恶魂 #
|
||||||
|
entity.glow_squid.name=发光鱿鱼 #
|
||||||
|
entity.piglin_brute.name=猪灵蛮兵 #
|
||||||
|
entity.guardian.name=守卫者 #
|
||||||
|
entity.hoglin.name=疣猪兽 #
|
||||||
|
entity.horse.name=马 #
|
||||||
|
entity.husk.name=尸壳 #
|
||||||
|
entity.ravager.name=劫掠兽 #
|
||||||
|
entity.iron_golem.name=铁傀儡 #
|
||||||
|
entity.item.name=物品 #
|
||||||
|
entity.leash_knot.name=拴绳结 #
|
||||||
|
entity.lightning_bolt.name=闪电束 #
|
||||||
|
entity.lingering_potion.name=滞留药水 #
|
||||||
|
entity.llama.name=羊驼 #
|
||||||
|
entity.trader_llama.name=行商羊驼 #
|
||||||
|
entity.llama_spit.name=羊驼唾沫 #
|
||||||
|
entity.magma_cube.name=岩浆怪 #
|
||||||
|
entity.minecart.name=矿车 #
|
||||||
|
entity.chest_minecart.name=运输矿车 #
|
||||||
|
entity.command_block_minecart.name=命令方块矿车 #
|
||||||
|
entity.furnace_minecart.name=动力矿车 #
|
||||||
|
entity.hopper_minecart.name=漏斗矿车 #
|
||||||
|
entity.tnt_minecart.name=TNT矿车 #
|
||||||
|
entity.mule.name=骡 #
|
||||||
|
entity.mooshroom.name=哞菇 #
|
||||||
|
entity.moving_block.name=移动中的方块 #
|
||||||
|
entity.ocelot.name=豹猫 #
|
||||||
|
entity.painting.name=画 #
|
||||||
|
entity.parrot.name=鹦鹉 #
|
||||||
|
entity.phantom.name=幻翼 #
|
||||||
|
entity.pig.name=猪 #
|
||||||
|
entity.piglin.name=猪灵 #
|
||||||
|
entity.pillager.name=掠夺者 #
|
||||||
|
entity.polar_bear.name=北极熊 #
|
||||||
|
entity.rabbit.name=兔子 #
|
||||||
|
entity.sheep.name=绵羊 #
|
||||||
|
entity.shulker.name=潜影贝 #
|
||||||
|
entity.shulker_bullet.name=潜影弹 #
|
||||||
|
entity.silverfish.name=蠹虫 #
|
||||||
|
entity.skeleton.name=骷髅 #
|
||||||
|
entity.skeleton_horse.name=骷髅马 #
|
||||||
|
entity.stray.name=流浪者 #
|
||||||
|
entity.slime.name=史莱姆 #
|
||||||
|
entity.small_fireball.name=小火球 #
|
||||||
|
entity.sniffer.name=嗅探兽 #
|
||||||
|
entity.snowball.name=雪球 #
|
||||||
|
entity.snow_golem.name=雪傀儡 #
|
||||||
|
entity.spider.name=蜘蛛 #
|
||||||
|
entity.splash_potion.name=药水 #
|
||||||
|
entity.squid.name=鱿鱼 #
|
||||||
|
entity.strider.name=炽足兽 #
|
||||||
|
entity.tnt.name=TNT #
|
||||||
|
entity.thrown_trident.name=三叉戟 #
|
||||||
|
entity.tripod_camera.name=相机 #
|
||||||
|
entity.turtle.name=海龟 #
|
||||||
|
entity.unknown.name=未知 #
|
||||||
|
entity.vex.name=恼鬼 #
|
||||||
|
entity.villager.name=村民 #
|
||||||
|
entity.villager.armor=盔甲匠 #
|
||||||
|
entity.villager.butcher=屠夫 #
|
||||||
|
entity.villager.cartographer=制图师 #
|
||||||
|
entity.villager.cleric=牧师 #
|
||||||
|
entity.villager.farmer=农民 #
|
||||||
|
entity.villager.fisherman=渔夫 #
|
||||||
|
entity.villager.fletcher=制箭师 #
|
||||||
|
entity.villager.leather=皮匠 #
|
||||||
|
entity.villager.librarian=图书管理员 #
|
||||||
|
entity.villager.shepherd=牧羊人 #
|
||||||
|
entity.villager.tool=工具匠 #
|
||||||
|
entity.villager.weapon=武器匠 #
|
||||||
|
entity.villager.mason=石匠 #
|
||||||
|
entity.villager.unskilled=傻子 #
|
||||||
|
entity.villager_v2.name=村民 #
|
||||||
|
entity.vindicator.name=卫道士 #
|
||||||
|
entity.wandering_trader.name=流浪商人 #
|
||||||
|
entity.witch.name=女巫 #
|
||||||
|
entity.wither.name=凋灵 #
|
||||||
|
entity.wither_skeleton.name=凋灵骷髅 #
|
||||||
|
entity.wither_skull.name=凋灵之首 #
|
||||||
|
entity.wither_skull_dangerous.name=凋灵之首 #
|
||||||
|
entity.wolf.name=狼 #
|
||||||
|
entity.xp_orb.name=经验球 #
|
||||||
|
entity.xp_bottle.name=附魔之瓶 #
|
||||||
|
entity.zoglin.name=僵尸疣猪兽 #
|
||||||
|
entity.zombie.name=僵尸 #
|
||||||
|
entity.zombie_horse.name=僵尸马 #
|
||||||
|
entity.zombie_pigman.name=僵尸猪灵 #
|
||||||
|
entity.zombie_villager.name=僵尸村民 #
|
||||||
|
entity.zombie_villager_v2.name=僵尸村民 #
|
||||||
|
entity.sniffer.name=嗅探兽 #
|
||||||
|
entity.frog.name=青蛙 #
|
||||||
|
entity.tadpole.name=蝌蚪 #
|
||||||
|
entity.warden.name=监守者 #
|
||||||
|
entity.allay.name=悦灵 #
|
||||||
|
entity.camel.name=骆驼 #
|
||||||
|
entity.chest_raft.name=带宝箱的的竹筏 #
|
||||||
|
)";
|
||||||
@@ -7,10 +7,13 @@ namespace plugin {
|
|||||||
|
|
||||||
Plugin::Plugin(ll::plugin::NativePlugin& self) : mSelf(self) {
|
Plugin::Plugin(ll::plugin::NativePlugin& self) : mSelf(self) {
|
||||||
// Code for loading the plugin goes here.
|
// Code for loading the plugin goes here.
|
||||||
|
initPlugin();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Plugin::enable() {
|
bool Plugin::enable() {
|
||||||
// Code for enabling the plugin goes here.
|
// Code for enabling the plugin goes here.
|
||||||
|
RegisterDamageDefinition();
|
||||||
|
ListenEvents();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user