sofe/capital 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sofe/capital

Composer 安装命令:

composer create-project sofe/capital

包简介

README 文档

README

CI

An extensible economy plugin for PocketMine-MP.

How is Capital different from other economy plugins?

As a core API for economy, Capital supports different styles of account management:

  • You can have the old, simple one-account-per-player mechanism.
  • Or do you like currencies? You can add new currencies to config.yml and other plugins will let you configure which currency to use in each case.
  • Or are currencies too complicated for you? What about just having one account per world? You don't need any special configuration in other plugins!
  • Are commands and form UI boring for you? Maybe use banknote/wallet items so that players lose money when they drop the item? (Capital itself does not support banknote/wallet items, but it is the only economy API where both simple accounts and item payment can be used from other plugins without writing code twice)
  • Or maybe sometimes the money goes to the faction bank account instead of player account?
  • Capital is extensible for other plugins to include new account management styles, and it will work automatically with all plugins!

Other cool features include:

  • Powerful analytics commands. How much active capital is there? How is wealth distributed on the server? Which industries are the most active? What are the biggest transactions in the server yesterday? Capital can help you answer these questions with label-based analytics.
  • Is editing the config file too confusing for you? Capital supports self-healing configuration. Your config file will be automatically regenerated if something is wrong, and Capital will try its best to guess what you really wanted.
  • Supports migration from other economy plugins, including:
    • EconomyAPI
  • Uses async database access, supporting both SQLite and MySQL. Capital will not lag your server.
  • Safe for multiple servers. Transactions are strictly atomic. Players cannot duplicate money by joining multiple servers.

Setting up

After running the server with Capital the first time, Capital generates config.yml and db.yml, which you can edit to configure Capital.

db.yml is used for configuring the database used by Capital. You can use sqlite or mysql here. The configuration is same as most other plugins.

config.yml is a large config that allows you to change almost everything in Capital. Read the comments in config.yml for more information. Text after '# xxx: are comments. If you edit config.yml incorrectly, Capital will try to fix the config.yml and save the old one as config.yml.old so that you can refer to it if Capital fixed it incorrectly.

Default commands

All commands in Capital can be configured in config.yml. Try searching them in the config file to find out the correct place. The following commands come from the default config:

Player commands:

  • /pay <player> <amount> [account...]: Pay money to another player with your own account.
  • /checkmoney: Check your own wealth.
  • /richest: View the richest players on the server.

Admin commands:

  • /addmoney <player> <amount> [account...]: Add money to a player's account.
  • /takemoney <player> <amount> [account...]: Remove money from a player's account.
  • /checkmoney <player>: Check the wealth of another player.

[account...] can be used to select the account (e.g. currency) if you change the schema in config.yml. (You can still disable these arguments by setting up selector in config.yml)

You can create many other useful commands by editing config.yml, e.g. check how much money was paid by /pay command! Check out the comments in config.yml for more information.

Community, Contact & Contributing

If you want to get help, share your awesome config setup or show off your cool plugin that uses Capital, create a discussion on GitHub.

To report bugs, create an issue on GitHub.

If you want to help with developing Capital, see dev.md for a comprehensive walkthrough of the internals.

sofe/capital 适用场景与选型建议

sofe/capital 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31 次下载、GitHub Stars 达 34, 最近一次更新时间为 2022 年 05 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sofe/capital 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sofe/capital 我们能提供哪些服务?
定制开发 / 二次开发

基于 sofe/capital 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 34
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 34
  • Watchers: 3
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-05-09