Skip to content

Commit

Permalink
Merge pull request #377 from ybw0014/feature/wiki
Browse files Browse the repository at this point in the history
修改Wiki链接为非官方中文Wiki
  • Loading branch information
StarWishsama authored Dec 1, 2021
2 parents cbcff8c + a19c64a commit bbe1d25
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ public void postRegister() {
*/
public final void addOfficialWikipage(@Nonnull String page) {
Validate.notNull(page, "Wiki page cannot be null.");
wikiURL = Optional.of("https://github.com/Slimefun/Slimefun4/wiki/" + page);
// 转换链接
page = page.replace("#", "?id=");
wikiURL = Optional.of("https://slimefun.guizhanss.wiki/#/" + page);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,60 +128,60 @@ private static void addHeader(Player p, ChestMenu menu, ItemStack guide) {
// @formatter:off
menu.addItem(6, new CustomItemStack(Material.COMPARATOR,
"&e" + locale.getMessage(p, "guide.title.source"),
"", "&7Last Activity: &a" + NumberUtils.getElapsedTime(github.getLastUpdate()) + " ago",
"", "&7最近活动于: &a" + NumberUtils.getElapsedTime(github.getLastUpdate()) + " ",
"&7Forks: &e" + github.getForks(),
"&7Stars: &e" + github.getStars(),
"",
"&7&oSlimefun 4 is a community project,",
"&7&othe source code is available on GitHub",
"&7&oand if you want to keep this Plugin alive,",
"&7&othen please consider contributing to it",
"&7&oSlimefun 4 是一个由社区参与的项目,",
"&7&o源代码可以在 GitHub 上找到",
"&7&o如果你想让这个项目持续下去",
"&7&o你可以考虑对项目做出贡献",
"",
"&7\u21E8 &eClick to go to GitHub"
"&7\u21E8 &e点击前往汉化版 GitHub 仓库"
));
// @formatter:on

menu.addMenuClickHandler(6, (pl, slot, item, action) -> {
pl.closeInventory();
ChatUtils.sendURL(pl, "https://github.com/Slimefun/Slimefun4");
ChatUtils.sendURL(pl, "https://github.com/StarwishSama/Slimefun4");
return false;
});

// @formatter:off
menu.addItem(8, new CustomItemStack(Material.KNOWLEDGE_BOOK,
"&3" + locale.getMessage(p, "guide.title.wiki"),
"", "&7Do you need help with an Item or machine?",
"&7You cannot figure out what to do?",
"&7Check out our community-maintained Wiki",
"&7and become one of our Editors!",
"", "&7你需要对物品或机器方面的帮助吗?",
"&7你不知道要干什么?",
"&7查看我们的由社区维护的维基",
"&7并考虑成为一名编辑者!",
"",
"&7\u21E8 &eClick to go to the official Slimefun Wiki"
"&7\u21E8 &e点击前往非官方中文 Wiki"
));
// @formatter:on

menu.addMenuClickHandler(8, (pl, slot, item, action) -> {
pl.closeInventory();
ChatUtils.sendURL(pl, "https://github.com/Slimefun/Slimefun4/wiki");
ChatUtils.sendURL(pl, "https://slimefun.guizhanss.wiki/");
return false;
});

// @formatter:off
menu.addItem(47, new CustomItemStack(Material.BOOKSHELF,
"&3" + locale.getMessage(p, "guide.title.addons"),
"",
"&7Slimefun is huge. But its addons are what makes",
"&7this plugin truly shine. Go check them out, some",
"&7of them may be exactly what you were missing out on!",
"&7Slimefun 是一个大型项目,但附属插件的存在",
"&7能让 Slimefun 真正的发光发亮",
"&7看一看它们,也许你要寻找的附属插件就在那里!",
"",
"&7Installed on this Server: &b" + Slimefun.getInstalledAddons().size(),
"&7该服务器已安装附属插件: &b" + Slimefun.getInstalledAddons().size(),
"",
"&7\u21E8 &eClick to see all available addons for Slimefun4"
"&7\u21E8 &e点击查看 Slimefun4 可用的附属插件"
));
// @formatter:on

menu.addMenuClickHandler(47, (pl, slot, item, action) -> {
pl.closeInventory();
ChatUtils.sendURL(pl, "https://github.com/Slimefun/Slimefun4/wiki/Addons");
ChatUtils.sendURL(pl, "https://slimefun.guizhanss.wiki/#/Addons");
return false;
});

Expand Down

0 comments on commit bbe1d25

Please sign in to comment.