Skip to content

Commit

Permalink
feat(liteloader): move code from repo LiteLoader here
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Oct 9, 2023
1 parent 773626a commit ef86a2c
Show file tree
Hide file tree
Showing 7,081 changed files with 374,546 additions and 71 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 23 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
build-documentation:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -19,12 +19,31 @@ jobs:
with:
path: site/

deploy-documentation:
if: github.ref == 'refs/heads/v3' && github.event_name == 'push'
needs: build-documentation
deploy-docs:
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.ref == 'refs/heads/v3/develop' && github.event_name == 'push' # For development only
needs: build-docs
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v2

build-liteloader:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: xmake-io/github-action-setup-xmake@v1

- run: |
xmake repo --update
xmake config --arch=x64 --plat=windows --mode=release --verbose --yes
xmake --warning --yes
working-directory: ./liteloader
- uses: actions/upload-artifact@v3
with:
name: liteloader-windows-x64-${{ github.sha }}
path: ./liteloader/build/windows/x64/release
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
site/
.vscode/
## Project specific
/.idea/
/.vscode/
/site/
72 changes: 25 additions & 47 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,68 @@

[![English](https://img.shields.io/badge/English-informational?style=for-the-badge)](README.md) ![中文](https://img.shields.io/badge/简体中文-inactive?style=for-the-badge)

An epoch-making cross-language plugin loader for Minecraft Bedrock Dedicated Server (BDS)
一个开创性的跨语言插件加载器,适用于Minecraft基岩版专用服务器(BDS

LiteLoaderBDS is an unofficial plugin loader that offers essential API support for the Bedrock Dedicated Server (BDS). It boasts an extensive API, a plethora of utility interfaces, a robust event system, and comprehensive basic interface support.
LiteLoaderBDS是一个非官方的插件加载器,为基岩版专用服务器(BDS)提供必要的API支持。它拥有广泛的API、大量的实用接口、强大的事件系统和全面的基本接口支持。

LiteLoader presents an expansive API, a powerful event system, and an abundance of encapsulated development infrastructure interfaces, laying a sturdy groundwork for enhancing the Bedrock Edition BDS with additional gameplay features and functionalities. Through plugins, extending BDS functionality becomes effortless, with a user-friendly development process and adaptable approach.
LiteLoader提供了一个广阔的API、强大的事件系统和丰富的封装式开发基础接口,为增强基岩版BDS的游戏功能和功能提供了坚实的基础。通过插件,扩展BDS的功能变得轻松,具有用户友好的开发过程和灵活的方法。

Developers can effortlessly write plugins in languages such as C++, JavaScript, Lua, Python, C#, and others. This seamless integration enables them to effortlessly expand and personalize BDS functionality, facilitating an intuitive learning experience and unparalleled flexibility.
开发者可以轻松地使用C++、JavaScriptLuaPython、C#等语言编写插件。这种无缝集成使他们能够轻松扩展和个性化BDS的功能,促进直观的学习体验和无与伦比的灵活性。

For more information, please refer to [the documentation](https://docs.litebds.com).
更多信息,请参考[文档](https://docs.litebds.com)

## Security
## 安全性

LiteLoaderBDS (hereinafter referred to as "this software") is developed and
provided by LiteLDev (hereinafter referred to as "the developer"). This software is designed
to help users manage and install various software packages, but is not responsible for any
content, quality, functionality, security or legality of any software package. Users should
use this software at their own discretion and assume all related risks.
LiteLoaderBDS(以下简称“本软件”)由LiteLDev(以下简称“开发者”)开发和提供。本软件旨在帮助用户管理和安装各种软件包,但不对任何软件包的内容、质量、功能、安全性或合法性负责。用户应自行决定使用本软件,并承担相关风险。

The developer does not guarantee the stability, reliability, accuracy or completeness of this
software. The developer is not liable for any defects, errors, viruses or other harmful components
that may exist in this software. The developer is not liable for any direct or indirect damages
(including but not limited to data loss, device damage, profit loss etc.) caused by the use of
this software.
开发者不保证本软件的稳定性、可靠性、准确性或完整性。开发者不对本软件中可能存在的任何缺陷、错误、病毒或其他有害组件负责。开发者不对因使用本软件而导致的任何直接或间接损害(包括但不限于数据丢失、设备损坏、利润损失等)承担责任。

The developer reserves the right to modify, update or terminate this software and its related
services at any time without prior notice to users. Users should back up important data and check
regularly for updates of this software.
开发者保留随时修改、更新或终止本软件及其相关服务的权利,无需事先通知用户。用户应备份重要数据并定期检查本软件的更新。

Users should comply with relevant laws and regulations when using this software, respect the
intellectual property rights and privacy rights of others, and not use this software for any
illegal or infringing activities. If users violate the above provisions and cause any damage
to any third party or are claimed by any third party, the developer does not bear any
responsibility.
用户在使用本软件时应遵守相关法律法规,尊重他人的知识产权和隐私权,不得将本软件用于任何非法或侵权活动。如果用户违反上述规定并对任何第三方造成任何损害或被任何第三方提出索赔,开发者不承担任何责任。

If you have any questions or comments about this disclaimer, please contact the developer.
如果您对本免责声明有任何疑问或意见,请与开发者联系。

## Install
## 安装

This project uses [Lip](https://github.com/LipPkg/Lip). Go check them out if you don't have them locally installed.
此项目使用[Lip](https://github.com/LipPkg/Lip)。如果您尚未在本地安装,请查看它们。

First, create a new directory for your Minecraft server and enter it:
首先,创建一个新的目录用于您的Minecraft服务器并进入该目录:

```sh
$ mkdir myserver
$ cd myserver
```

Then, install LiteLoaderBDS using Lip:
然后,使用Lip安装LiteLoaderBDS:

```sh
$ lip install github.com/tooth-hub/liteloaderbds
```

For more information, please refer to [the documentation](https://docs.litebds.com).
更多信息,请参考[文档](https://docs.litebds.com)

### Updating
### 更新

Considering data security, we do not provide an update method. If you would like to update LiteLoaderBDS, please install the new version somewhere else and copy the files shown below to your server directory:
考虑到数据安全性,我们不提供更新方法。如果您想要更新LiteLoaderBDS,请在其他地方安装新版本,并将下面显示的文件复制到服务器目录中:

- `worlds/`
- `server.properties`

## Usage
## 使用方法

To start the server, simply run `bedrock_server.exe`:
要启动服务器,只需运行`bedrock_server.exe`

```sh
$ ./bedrock_server.exe
```

For more information, please refer to [the documentation](https://docs.litebds.com).
更多信息,请参考[文档](https://docs.litebds.com)

## Contributing
## 贡献

Feel free to dive in! [Open an issue](https://github.com/LiteLDev/LiteLoaderBDS/issues/new/choose) or submit PRs.
欢迎参与![提交问题](https://github.com/LiteLDev/LiteLoaderBDS/issues/new/choose)或提交PR贡献者

LiteLoaderBDS follows the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) Code of Conduct.
感谢所有为该项目作出贡献的人。

## Contributors

This project exists thanks to all the people who contribute.

![Contributors](https://contrib.rocks/image?repo=LiteLDev/LiteLoaderBDS)

## License

[LGPL-3.0-only](LICENSE) © 2021-2023 LiteLDev
![Contributors]()许可证[LGPL-3.0-only](LICENSE) © 2021-2023 LiteLDev
46 changes: 46 additions & 0 deletions liteloader/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Left
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
PadOperators: true
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllArgumentsOnNextLine: false
AlignOperands: AlignAfterOperator
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AllowShortLambdasOnASingleLine: All
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BreakBeforeBinaryOperators: NonAssignment
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerIndentWidth: 0
IndentWidth: 4
Language: Cpp
MaxEmptyLinesToKeep: 2
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
TabWidth: 4
UseTab: Never
SortIncludes: CaseSensitive
146 changes: 146 additions & 0 deletions liteloader/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Generated from CLion Inspection settings
---
Checks: '-*,
bugprone-argument-comment,
bugprone-assert-side-effect,
bugprone-bad-signal-to-kill-thread,
bugprone-branch-clone,
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-dynamic-static-initializers,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
bugprone-integer-division,
bugprone-lambda-function-name,
bugprone-macro-parentheses,
bugprone-macro-repeated-side-effects,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-move-forwarding-reference,
bugprone-multiple-statement-macro,
bugprone-no-escape,
bugprone-not-null-terminated-result,
bugprone-parent-virtual-call,
bugprone-posix-return,
bugprone-reserved-identifier,
bugprone-sizeof-container,
bugprone-sizeof-expression,
bugprone-spuriously-wake-up-functions,
bugprone-string-constructor,
bugprone-string-integer-assignment,
bugprone-string-literal-with-embedded-nul,
bugprone-suspicious-enum-usage,
bugprone-suspicious-include,
bugprone-suspicious-memory-comparison,
bugprone-suspicious-memset-usage,
bugprone-suspicious-missing-comma,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-swapped-arguments,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unhandled-self-assignment,
bugprone-unused-raii,
bugprone-unused-return-value,
bugprone-use-after-move,
bugprone-virtual-near-miss,
cert-dcl21-cpp,
cert-dcl58-cpp,
cert-err34-c,
cert-err52-cpp,
cert-err60-cpp,
cert-flp30-c,
cert-msc50-cpp,
cert-msc51-cpp,
cert-str34-c,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-narrowing-conversions,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-slicing,
google-default-arguments,
google-explicit-constructor,
google-runtime-operator,
hicpp-exception-baseclass,
hicpp-multiway-paths-covered,
misc-misplaced-const,
misc-new-delete-overloads,
misc-non-copyable-objects,
misc-throw-by-value-catch-by-reference,
misc-unconventional-assign-operator,
misc-uniqueptr-reset-release,
modernize-avoid-bind,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-return-braced-init-list,
modernize-shrink-to-fit,
modernize-unary-static-assert,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-nodiscard,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
mpi-buffer-deref,
mpi-type-mismatch,
openmp-use-default-none,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-noexcept-move-constructor,
performance-trivially-destructible,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
portability-simd-intrinsics,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-size-empty,
readability-convert-member-functions-to-static,
readability-delete-null-pointer,
readability-deleted-default,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
readability-use-anyofallof'
4 changes: 4 additions & 0 deletions liteloader/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Diagnostics:
Suppress: ["-Wmicrosoft-enum-forward-reference", "-Wc++11-narrowing"]
CompileFlags:
Add: ["-ferror-limit=0", "-D__FUNCTION__=\"dummy\"", "-D_CRT_USE_BUILTIN_OFFSETOF"]
Loading

0 comments on commit ef86a2c

Please sign in to comment.