From 73fd4589cfd4803200445290a48e91e770a205e5 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Tue, 31 Mar 2026 17:00:03 +0000 Subject: [PATCH 01/12] Initial commit --- LICENSE | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.en.md | 36 ++++++ README.md | 39 ++++++ 3 files changed, 414 insertions(+) create mode 100644 LICENSE create mode 100644 README.en.md create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..6625fee --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# CY_beibao + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad5aae7 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# CY_beibao + +#### 介绍 +{**以下是 Gitee 平台说明,您可以替换此简介** +Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) From 79de6512035edce7c9cceb476c26d755653c96b1 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Tue, 31 Mar 2026 17:02:48 +0000 Subject: [PATCH 02/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20LI?= =?UTF-8?q?CENSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 339 -------------------------------------------------------- 1 file changed, 339 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d159169..0000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. From c4e6e1fc6269144ea5a19543790abff027932e1a Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Tue, 31 Mar 2026 17:05:02 +0000 Subject: [PATCH 03/12] 1.0 Signed-off-by: shidifu <1@ypshidifu.cn> --- src/main/java/com/CY/Main.java | 165 +++++++++++++++++++++++++++++++++ src/main/resources/config.yml | 26 ++++++ src/main/resources/plugin.yml | 8 ++ 3 files changed, 199 insertions(+) create mode 100644 src/main/java/com/CY/Main.java create mode 100644 src/main/resources/config.yml create mode 100644 src/main/resources/plugin.yml diff --git a/src/main/java/com/CY/Main.java b/src/main/java/com/CY/Main.java new file mode 100644 index 0000000..fbf1e8a --- /dev/null +++ b/src/main/java/com/CY/Main.java @@ -0,0 +1,165 @@ +package com.CY; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.command.*; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryOpenEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scoreboard.Objective; +import org.bukkit.scoreboard.Scoreboard; +import org.jetbrains.annotations.NotNull; + +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class Main extends JavaPlugin implements Listener, CommandExecutor { + + @Override + public void onEnable() { + saveDefaultConfig(); + getCommand("cy").setExecutor(this); + getServer().getPluginManager().registerEvents(this, this); + } + + // --- 1. 大白话存储规则解析器 --- + // 从配置文件提取计分板名称。比如配置写:"存储在名为VipDays的计分板里" -> 提取 VipDays + private String getDbName(String path, String def) { + String line = getConfig().getString(path, ""); + if (line.isEmpty()) return def; + Matcher m = Pattern.compile("(?i)(?<=名为|obj:|scoreboard:)\\s*(\\w+)").matcher(line); + return m.find() ? m.group(1) : def; + } + + // 获取玩家计分板数值 + private int getScore(Player p, String configPath, String defaultObj) { + String objName = getDbName(configPath, defaultObj); + Scoreboard sb = Bukkit.getScoreboardManager().getMainScoreboard(); + Objective obj = sb.getObjective(objName); + return (obj == null) ? 0 : obj.getScore(p.getName()).getScore(); + } + + // --- 2. 语义时间解析 (14天封顶) --- + private int parseAlertDays(String raw) { + String s = raw.toLowerCase(); + int days = 0; + if (s.contains("两周")) days = 14; + else if (s.contains("一星")) days = 7; + else { + Matcher m = Pattern.compile("\\d+").matcher(s); + if (m.find()) days = Integer.parseInt(m.group()); + } + return Math.min(days, 14); // 源码硬锁14天 + } + + @EventHandler + public void onInventoryOpen(InventoryOpenEvent e) { + if (e.getView().getTitle().contains("云背包")) { + Player p = (Player) e.getPlayer(); + // 从配置定义的计分板读取剩余天数 + int remainingDays = getScore(p, "storage.vip-days-rule", "VipDays"); + int alertDays = parseAlertDays(getConfig().getString("settings.alert-before", "7天")); + + if (remainingDays <= alertDays && remainingDays > 0) { + p.sendMessage("§e[提醒] §f云背包会员仅剩 §c" + remainingDays + " §f天,请及时续费。"); + } else if (remainingDays <= 0) { + p.sendMessage("§4[锁定] §f会员已到期,非免费格子已进入 §c只读模式§f!"); + } + } + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent e) { + if (!e.getView().getTitle().contains("云背包")) return; + + Player p = (Player) e.getWhoClicked(); + int rawSlot = e.getRawSlot(); + // 提取页码 + int page = 1; + try { page = Integer.parseInt(e.getView().getTitle().replaceAll("[^0-9]", "")); } catch (Exception ignored) {} + + int absoluteSlot = (page - 1) * 45 + rawSlot + 1; + + // A. 导航翻页逻辑 + if (rawSlot >= 45 && rawSlot <= 53) { + e.setCancelled(true); + if (rawSlot == 48 && page > 1) openCloudInventory(p, page - 1); + if (rawSlot == 50) openCloudInventory(p, page + 1); + return; + } + + // B. 存储与只读逻辑 + if (rawSlot < 45) { + int unlockedMax = getScore(p, "storage.unlocked-slots-rule", "UnlockedSlots"); + if (unlockedMax < 54) unlockedMax = 54; // 基础免费54格 + + // 1. 越权点击判定 + if (absoluteSlot > unlockedMax) { + p.sendMessage("§c[锁定] §f该格子尚未解锁。"); + e.setCancelled(true); + return; + } + + // 2. 过期只读判定 (只对 54格以后的收费格生效) + if (absoluteSlot > 54) { + int days = getScore(p, "storage.vip-days-rule", "VipDays"); + if (days <= 0) { + // 只读:允许拿起(PICKUP),禁止放入(PLACE/SWAP) + if (e.getCursor() != null && e.getCursor().getType() != Material.AIR) { + p.sendMessage("§c[只读] §f会员已过期,收费格子禁止存入!"); + e.setCancelled(true); + return; + } + } + } + + // 3. 空间耗尽预警 (针对已解锁上限的最后1格) + checkSpaceWarning(p, e.getInventory(), unlockedMax); + } + } + + private void checkSpaceWarning(Player p, Inventory inv, int max) { + Bukkit.getScheduler().runTaskLater(this, () -> { + int count = 0; + for (int i = 0; i < 45; i++) { + if (inv.getItem(i) != null && inv.getItem(i).getType() != Material.AIR) count++; + } + if (count >= (max - 1) || (max <= 54 && count >= 53)) { + p.sendMessage("§6[预警] §f存储空间不足,请及时清理或扩容。"); + } + }, 1L); + } + + private void openCloudInventory(Player p, int page) { + Inventory inv = Bukkit.createInventory(null, 54, "§0云背包 - 第 " + page + " 页"); + + // 填充导航栏 + ItemStack glass = new ItemStack(Material.BLACK_STAINED_GLASS_PANE); + ItemMeta gm = glass.getItemMeta(); gm.setDisplayName(" "); glass.setItemMeta(gm); + for (int i = 45; i < 54; i++) inv.setItem(i, glass); + + ItemStack prev = new ItemStack(Material.ARROW); + ItemMeta pm = prev.getItemMeta(); pm.setDisplayName("§e上一页 (Page " + (page-1) + ")"); prev.setItemMeta(pm); + + ItemStack next = new ItemStack(Material.ARROW); + ItemMeta nm = next.getItemMeta(); nm.setDisplayName("§6下一页 (Page " + (page+1) + ")"); next.setItemMeta(nm); + + if (page > 1) inv.setItem(48, prev); + inv.setItem(50, next); + + p.openInventory(inv); + } + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, @NotNull String[] args) { + if (sender instanceof Player p && args.length == 0) openCloudInventory(p, 1); + return true; + } +} \ No newline at end of file diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml new file mode 100644 index 0000000..83c52b2 --- /dev/null +++ b/src/main/resources/config.yml @@ -0,0 +1,26 @@ +# ============================================================ +# cy 云背包 - 配置文件 (2026版) +# ============================================================ +version: "1.0" + +# [经济设置] +economy: + buy-price: 10 # 永久购买价格 + rent-price: 5 # 租赁单日价格 + +# [权限白名单系统] +whitelist: + # 一级白名单:核心推送/更新权限 (一行一个) + # 示范: + # primary: + # - TechAdmin + primary: [] + + # 二级白名单:管理员/发放权限 (逗号分隔) + # 示范: secondary: "Admin1,Admin2" + secondary: "" + +# [系统设置] +update-settings: + max-failures: 5 +expiry-notify-days: 3 # 源码已锁死 1-7 天 \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..7489107 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,8 @@ +name: CY_beibao +version: 1.0 +main: com.CY.Main # 对应截图中的 package com.CY +api-version: '1.21' +commands: + cy: + description: 云背包被控端主指令 + usage: /cy \ No newline at end of file From a225a8f6638d66db2988ba4678f6f3622d04d0e4 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Thu, 2 Apr 2026 13:26:05 +0000 Subject: [PATCH 04/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20sr?= =?UTF-8?q?c/main/java/com/CY/Main.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/CY/Main.java | 165 --------------------------------- 1 file changed, 165 deletions(-) delete mode 100644 src/main/java/com/CY/Main.java diff --git a/src/main/java/com/CY/Main.java b/src/main/java/com/CY/Main.java deleted file mode 100644 index fbf1e8a..0000000 --- a/src/main/java/com/CY/Main.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.CY; - -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.command.*; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.inventory.InventoryOpenEvent; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.scoreboard.Objective; -import org.bukkit.scoreboard.Scoreboard; -import org.jetbrains.annotations.NotNull; - -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class Main extends JavaPlugin implements Listener, CommandExecutor { - - @Override - public void onEnable() { - saveDefaultConfig(); - getCommand("cy").setExecutor(this); - getServer().getPluginManager().registerEvents(this, this); - } - - // --- 1. 大白话存储规则解析器 --- - // 从配置文件提取计分板名称。比如配置写:"存储在名为VipDays的计分板里" -> 提取 VipDays - private String getDbName(String path, String def) { - String line = getConfig().getString(path, ""); - if (line.isEmpty()) return def; - Matcher m = Pattern.compile("(?i)(?<=名为|obj:|scoreboard:)\\s*(\\w+)").matcher(line); - return m.find() ? m.group(1) : def; - } - - // 获取玩家计分板数值 - private int getScore(Player p, String configPath, String defaultObj) { - String objName = getDbName(configPath, defaultObj); - Scoreboard sb = Bukkit.getScoreboardManager().getMainScoreboard(); - Objective obj = sb.getObjective(objName); - return (obj == null) ? 0 : obj.getScore(p.getName()).getScore(); - } - - // --- 2. 语义时间解析 (14天封顶) --- - private int parseAlertDays(String raw) { - String s = raw.toLowerCase(); - int days = 0; - if (s.contains("两周")) days = 14; - else if (s.contains("一星")) days = 7; - else { - Matcher m = Pattern.compile("\\d+").matcher(s); - if (m.find()) days = Integer.parseInt(m.group()); - } - return Math.min(days, 14); // 源码硬锁14天 - } - - @EventHandler - public void onInventoryOpen(InventoryOpenEvent e) { - if (e.getView().getTitle().contains("云背包")) { - Player p = (Player) e.getPlayer(); - // 从配置定义的计分板读取剩余天数 - int remainingDays = getScore(p, "storage.vip-days-rule", "VipDays"); - int alertDays = parseAlertDays(getConfig().getString("settings.alert-before", "7天")); - - if (remainingDays <= alertDays && remainingDays > 0) { - p.sendMessage("§e[提醒] §f云背包会员仅剩 §c" + remainingDays + " §f天,请及时续费。"); - } else if (remainingDays <= 0) { - p.sendMessage("§4[锁定] §f会员已到期,非免费格子已进入 §c只读模式§f!"); - } - } - } - - @EventHandler - public void onInventoryClick(InventoryClickEvent e) { - if (!e.getView().getTitle().contains("云背包")) return; - - Player p = (Player) e.getWhoClicked(); - int rawSlot = e.getRawSlot(); - // 提取页码 - int page = 1; - try { page = Integer.parseInt(e.getView().getTitle().replaceAll("[^0-9]", "")); } catch (Exception ignored) {} - - int absoluteSlot = (page - 1) * 45 + rawSlot + 1; - - // A. 导航翻页逻辑 - if (rawSlot >= 45 && rawSlot <= 53) { - e.setCancelled(true); - if (rawSlot == 48 && page > 1) openCloudInventory(p, page - 1); - if (rawSlot == 50) openCloudInventory(p, page + 1); - return; - } - - // B. 存储与只读逻辑 - if (rawSlot < 45) { - int unlockedMax = getScore(p, "storage.unlocked-slots-rule", "UnlockedSlots"); - if (unlockedMax < 54) unlockedMax = 54; // 基础免费54格 - - // 1. 越权点击判定 - if (absoluteSlot > unlockedMax) { - p.sendMessage("§c[锁定] §f该格子尚未解锁。"); - e.setCancelled(true); - return; - } - - // 2. 过期只读判定 (只对 54格以后的收费格生效) - if (absoluteSlot > 54) { - int days = getScore(p, "storage.vip-days-rule", "VipDays"); - if (days <= 0) { - // 只读:允许拿起(PICKUP),禁止放入(PLACE/SWAP) - if (e.getCursor() != null && e.getCursor().getType() != Material.AIR) { - p.sendMessage("§c[只读] §f会员已过期,收费格子禁止存入!"); - e.setCancelled(true); - return; - } - } - } - - // 3. 空间耗尽预警 (针对已解锁上限的最后1格) - checkSpaceWarning(p, e.getInventory(), unlockedMax); - } - } - - private void checkSpaceWarning(Player p, Inventory inv, int max) { - Bukkit.getScheduler().runTaskLater(this, () -> { - int count = 0; - for (int i = 0; i < 45; i++) { - if (inv.getItem(i) != null && inv.getItem(i).getType() != Material.AIR) count++; - } - if (count >= (max - 1) || (max <= 54 && count >= 53)) { - p.sendMessage("§6[预警] §f存储空间不足,请及时清理或扩容。"); - } - }, 1L); - } - - private void openCloudInventory(Player p, int page) { - Inventory inv = Bukkit.createInventory(null, 54, "§0云背包 - 第 " + page + " 页"); - - // 填充导航栏 - ItemStack glass = new ItemStack(Material.BLACK_STAINED_GLASS_PANE); - ItemMeta gm = glass.getItemMeta(); gm.setDisplayName(" "); glass.setItemMeta(gm); - for (int i = 45; i < 54; i++) inv.setItem(i, glass); - - ItemStack prev = new ItemStack(Material.ARROW); - ItemMeta pm = prev.getItemMeta(); pm.setDisplayName("§e上一页 (Page " + (page-1) + ")"); prev.setItemMeta(pm); - - ItemStack next = new ItemStack(Material.ARROW); - ItemMeta nm = next.getItemMeta(); nm.setDisplayName("§6下一页 (Page " + (page+1) + ")"); next.setItemMeta(nm); - - if (page > 1) inv.setItem(48, prev); - inv.setItem(50, next); - - p.openInventory(inv); - } - - @Override - public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, @NotNull String[] args) { - if (sender instanceof Player p && args.length == 0) openCloudInventory(p, 1); - return true; - } -} \ No newline at end of file From 5bb5169f0ca2fd634112a4ee8055bc445cfc305b Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Thu, 2 Apr 2026 13:27:20 +0000 Subject: [PATCH 05/12] 0 Signed-off-by: shidifu <1@ypshidifu.cn> --- java/com/cy/Main.java | 140 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 java/com/cy/Main.java diff --git a/java/com/cy/Main.java b/java/com/cy/Main.java new file mode 100644 index 0000000..3971acc --- /dev/null +++ b/java/com/cy/Main.java @@ -0,0 +1,140 @@ +package com.cy; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.command.*; +import org.bukkit.entity.Player; +import org.bukkit.event.*; +import org.bukkit.event.inventory.*; +import org.bukkit.inventory.*; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.persistence.PersistentDataType; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.util.io.BukkitObjectInputStream; +import org.bukkit.util.io.BukkitObjectOutputStream; +import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; +import java.io.*; +import java.sql.*; +import java.util.*; + +public class Main extends JavaPlugin implements Listener, CommandExecutor { + private Connection conn; + private final NamespacedKey PAGE_KEY = new NamespacedKey(this, "cy_page"); + + @Override + public void onEnable() { + getLogger().info("\n§d" + + " _______ __ \n" + + " / ___\\ \\ / / \n" + + "| | \\ \\_/ / \n" + + "| |___ \\ / \n" + + " \\____| |_| \n" + + "§e[CY_beibao] 加载成功,存储数据库已挂载。"); + + initDatabase(); + getCommand("cy").setExecutor(this); + getServer().getPluginManager().registerEvents(this, this); + } + + private void initDatabase() { + try { + if (!getDataFolder().exists()) getDataFolder().mkdirs(); + conn = DriverManager.getConnection("jdbc:sqlite:" + getDataFolder() + "/vault.db"); + conn.createStatement().execute("CREATE TABLE IF NOT EXISTS items (uuid TEXT, page INTEGER, data TEXT, PRIMARY KEY(uuid, page))"); + } catch (Exception e) { e.printStackTrace(); } + } + + @Override + public boolean onCommand(CommandSender s, Command c, String lb, String[] args) { + if (s instanceof Player p) openVault(p, 1); + return true; + } + + public void openVault(Player p, int page) { + p.getPersistentDataContainer().set(PAGE_KEY, PersistentDataType.INTEGER, page); + Inventory inv = Bukkit.createInventory(null, 54, "§1云端仓库 - 第 " + page + " 页"); + + // 从数据库加载物品 + loadItems(p, page, inv); + + // 功能底栏 (45-53) + for (int i = 45; i < 54; i++) { + ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE); + ItemMeta m = glass.getItemMeta(); m.setDisplayName(" "); glass.setItemMeta(m); + inv.setItem(i, glass); + } + inv.setItem(48, createBtn(Material.ARROW, "§f上一页")); + inv.setItem(49, createBtn(Material.BARRIER, "§c关闭菜单")); + inv.setItem(50, createBtn(Material.ARROW, "§f下一页")); + + p.openInventory(inv); + } + + @EventHandler + public void onInventoryClose(InventoryCloseEvent e) { + if (!e.getView().getTitle().contains("云端仓库")) return; + Player p = (Player) e.getPlayer(); + int page = p.getPersistentDataContainer().getOrDefault(PAGE_KEY, PersistentDataType.INTEGER, 1); + saveItems(p, page, e.getInventory()); + } + + @EventHandler + public void onClick(InventoryClickEvent e) { + if (!e.getView().getTitle().contains("云端仓库")) return; + int slot = e.getRawSlot(); + if (slot < 45 || slot >= 54) return; // 仓库和背包区允许存取 + + e.setCancelled(true); + Player p = (Player) e.getWhoClicked(); + int cur = p.getPersistentDataContainer().getOrDefault(PAGE_KEY, PersistentDataType.INTEGER, 1); + + if (slot == 49) p.closeInventory(); + if (slot == 50 || slot == 48) { + int target = (slot == 50) ? cur + 1 : cur - 1; + if (target > 0) { + p.closeInventory(); + // 延迟 2 Tick 解决鼠标强制纠正 + Bukkit.getScheduler().runTaskLater(this, () -> openVault(p, target), 2L); + } + } + } + + private void saveItems(Player p, int page, Inventory inv) { + try { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + BukkitObjectOutputStream out = new BukkitObjectOutputStream(os); + out.writeInt(45); // 只存前 45 格 + for (int i = 0; i < 45; i++) out.writeObject(inv.getItem(i)); + out.close(); + String data = Base64Coder.encodeLines(os.toByteArray()); + PreparedStatement ps = conn.prepareStatement("REPLACE INTO items (uuid, page, data) VALUES (?, ?, ?)"); + ps.setString(1, p.getUniqueId().toString()); ps.setInt(2, page); ps.setString(3, data); + ps.executeUpdate(); + } catch (Exception e) { e.printStackTrace(); } + } + + private void loadItems(Player p, int page, Inventory inv) { + try { + PreparedStatement ps = conn.prepareStatement("SELECT data FROM items WHERE uuid = ? AND page = ?"); + ps.setString(1, p.getUniqueId().toString()); ps.setInt(2, page); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + byte[] bytes = Base64Coder.decodeLines(rs.getString("data")); + BukkitObjectInputStream in = new BukkitObjectInputStream(new ByteArrayInputStream(bytes)); + int count = in.readInt(); + for (int i = 0; i < count; i++) inv.setItem(i, (ItemStack) in.readObject()); + in.close(); + } + } catch (Exception ignored) {} + } + + private ItemStack createBtn(Material m, String n) { + ItemStack i = new ItemStack(m); ItemMeta mt = i.getItemMeta(); + mt.setDisplayName(n); i.setItemMeta(mt); return i; + } + + public void executeAction(Player p, String raw) { + if (raw.contains("背包")) p.sendMessage("§a[CY] 空间联动成功!"); + } +} \ No newline at end of file From 93a388aa6f78aedb86dea2c06b27d6be0309558a Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Fri, 3 Apr 2026 02:26:45 +0000 Subject: [PATCH 06/12] update README.md. Signed-off-by: shidifu <1@ypshidifu.cn> --- README.md | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index ad5aae7..3f1528a 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,9 @@ -# CY_beibao +# 草原探险服务器背包插件 -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +## 依托于Sdf1主控,实现独立的云存储。联动Essentials经济插件,可以实现付费功能 -#### 软件架构 -软件架构说明 +### 食用方法: +#### 下载文件[点击此处](https://gitee.com/nihaoshidifu/cy_beibao/releases) 将文件丢进去plguin目录即可 - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +## 主指令: +### /cy 打开背包 \ No newline at end of file From b33e94057d721550d8a66750b30c82245f8ca2ce Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:32:14 +0000 Subject: [PATCH 07/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20sr?= =?UTF-8?q?c/main/resources/config.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/main/resources/config.yml diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml deleted file mode 100644 index 83c52b2..0000000 --- a/src/main/resources/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# ============================================================ -# cy 云背包 - 配置文件 (2026版) -# ============================================================ -version: "1.0" - -# [经济设置] -economy: - buy-price: 10 # 永久购买价格 - rent-price: 5 # 租赁单日价格 - -# [权限白名单系统] -whitelist: - # 一级白名单:核心推送/更新权限 (一行一个) - # 示范: - # primary: - # - TechAdmin - primary: [] - - # 二级白名单:管理员/发放权限 (逗号分隔) - # 示范: secondary: "Admin1,Admin2" - secondary: "" - -# [系统设置] -update-settings: - max-failures: 5 -expiry-notify-days: 3 # 源码已锁死 1-7 天 \ No newline at end of file From df264a69df9a92ca75d97a5c408440570397443c Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:33:18 +0000 Subject: [PATCH 08/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ja?= =?UTF-8?q?va/com/cy/Main.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java/com/cy/Main.java | 140 ------------------------------------------ 1 file changed, 140 deletions(-) delete mode 100644 java/com/cy/Main.java diff --git a/java/com/cy/Main.java b/java/com/cy/Main.java deleted file mode 100644 index 3971acc..0000000 --- a/java/com/cy/Main.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.cy; - -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.NamespacedKey; -import org.bukkit.command.*; -import org.bukkit.entity.Player; -import org.bukkit.event.*; -import org.bukkit.event.inventory.*; -import org.bukkit.inventory.*; -import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.persistence.PersistentDataType; -import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.util.io.BukkitObjectInputStream; -import org.bukkit.util.io.BukkitObjectOutputStream; -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; -import java.io.*; -import java.sql.*; -import java.util.*; - -public class Main extends JavaPlugin implements Listener, CommandExecutor { - private Connection conn; - private final NamespacedKey PAGE_KEY = new NamespacedKey(this, "cy_page"); - - @Override - public void onEnable() { - getLogger().info("\n§d" + - " _______ __ \n" + - " / ___\\ \\ / / \n" + - "| | \\ \\_/ / \n" + - "| |___ \\ / \n" + - " \\____| |_| \n" + - "§e[CY_beibao] 加载成功,存储数据库已挂载。"); - - initDatabase(); - getCommand("cy").setExecutor(this); - getServer().getPluginManager().registerEvents(this, this); - } - - private void initDatabase() { - try { - if (!getDataFolder().exists()) getDataFolder().mkdirs(); - conn = DriverManager.getConnection("jdbc:sqlite:" + getDataFolder() + "/vault.db"); - conn.createStatement().execute("CREATE TABLE IF NOT EXISTS items (uuid TEXT, page INTEGER, data TEXT, PRIMARY KEY(uuid, page))"); - } catch (Exception e) { e.printStackTrace(); } - } - - @Override - public boolean onCommand(CommandSender s, Command c, String lb, String[] args) { - if (s instanceof Player p) openVault(p, 1); - return true; - } - - public void openVault(Player p, int page) { - p.getPersistentDataContainer().set(PAGE_KEY, PersistentDataType.INTEGER, page); - Inventory inv = Bukkit.createInventory(null, 54, "§1云端仓库 - 第 " + page + " 页"); - - // 从数据库加载物品 - loadItems(p, page, inv); - - // 功能底栏 (45-53) - for (int i = 45; i < 54; i++) { - ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE); - ItemMeta m = glass.getItemMeta(); m.setDisplayName(" "); glass.setItemMeta(m); - inv.setItem(i, glass); - } - inv.setItem(48, createBtn(Material.ARROW, "§f上一页")); - inv.setItem(49, createBtn(Material.BARRIER, "§c关闭菜单")); - inv.setItem(50, createBtn(Material.ARROW, "§f下一页")); - - p.openInventory(inv); - } - - @EventHandler - public void onInventoryClose(InventoryCloseEvent e) { - if (!e.getView().getTitle().contains("云端仓库")) return; - Player p = (Player) e.getPlayer(); - int page = p.getPersistentDataContainer().getOrDefault(PAGE_KEY, PersistentDataType.INTEGER, 1); - saveItems(p, page, e.getInventory()); - } - - @EventHandler - public void onClick(InventoryClickEvent e) { - if (!e.getView().getTitle().contains("云端仓库")) return; - int slot = e.getRawSlot(); - if (slot < 45 || slot >= 54) return; // 仓库和背包区允许存取 - - e.setCancelled(true); - Player p = (Player) e.getWhoClicked(); - int cur = p.getPersistentDataContainer().getOrDefault(PAGE_KEY, PersistentDataType.INTEGER, 1); - - if (slot == 49) p.closeInventory(); - if (slot == 50 || slot == 48) { - int target = (slot == 50) ? cur + 1 : cur - 1; - if (target > 0) { - p.closeInventory(); - // 延迟 2 Tick 解决鼠标强制纠正 - Bukkit.getScheduler().runTaskLater(this, () -> openVault(p, target), 2L); - } - } - } - - private void saveItems(Player p, int page, Inventory inv) { - try { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - BukkitObjectOutputStream out = new BukkitObjectOutputStream(os); - out.writeInt(45); // 只存前 45 格 - for (int i = 0; i < 45; i++) out.writeObject(inv.getItem(i)); - out.close(); - String data = Base64Coder.encodeLines(os.toByteArray()); - PreparedStatement ps = conn.prepareStatement("REPLACE INTO items (uuid, page, data) VALUES (?, ?, ?)"); - ps.setString(1, p.getUniqueId().toString()); ps.setInt(2, page); ps.setString(3, data); - ps.executeUpdate(); - } catch (Exception e) { e.printStackTrace(); } - } - - private void loadItems(Player p, int page, Inventory inv) { - try { - PreparedStatement ps = conn.prepareStatement("SELECT data FROM items WHERE uuid = ? AND page = ?"); - ps.setString(1, p.getUniqueId().toString()); ps.setInt(2, page); - ResultSet rs = ps.executeQuery(); - if (rs.next()) { - byte[] bytes = Base64Coder.decodeLines(rs.getString("data")); - BukkitObjectInputStream in = new BukkitObjectInputStream(new ByteArrayInputStream(bytes)); - int count = in.readInt(); - for (int i = 0; i < count; i++) inv.setItem(i, (ItemStack) in.readObject()); - in.close(); - } - } catch (Exception ignored) {} - } - - private ItemStack createBtn(Material m, String n) { - ItemStack i = new ItemStack(m); ItemMeta mt = i.getItemMeta(); - mt.setDisplayName(n); i.setItemMeta(mt); return i; - } - - public void executeAction(Player p, String raw) { - if (raw.contains("背包")) p.sendMessage("§a[CY] 空间联动成功!"); - } -} \ No newline at end of file From 8977e5641fd9eb611038b0d09bf2d25f00dc1da7 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:33:28 +0000 Subject: [PATCH 09/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20sr?= =?UTF-8?q?c/main/resources/plugin.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/plugin.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 src/main/resources/plugin.yml diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 7489107..0000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: CY_beibao -version: 1.0 -main: com.CY.Main # 对应截图中的 package com.CY -api-version: '1.21' -commands: - cy: - description: 云背包被控端主指令 - usage: /cy \ No newline at end of file From 4826d98f67350be957c775cd77e5e1fbcff72098 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:33:47 +0000 Subject: [PATCH 10/12] 1.1 Signed-off-by: shidifu <1@ypshidifu.cn> --- src/main/java/com/CY/Main.java | 143 +++++++++++++++++++++++++++++++++ src/main/resources/plugin.yml | 9 +++ 2 files changed, 152 insertions(+) create mode 100644 src/main/java/com/CY/Main.java create mode 100644 src/main/resources/plugin.yml diff --git a/src/main/java/com/CY/Main.java b/src/main/java/com/CY/Main.java new file mode 100644 index 0000000..0bf96ec --- /dev/null +++ b/src/main/java/com/CY/Main.java @@ -0,0 +1,143 @@ +package com.CY; + +import org.bukkit.*; +import org.bukkit.command.*; +import org.bukkit.entity.Player; +import org.bukkit.event.*; +import org.bukkit.event.inventory.*; +import org.bukkit.inventory.*; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.metadata.FixedMetadataValue; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.util.io.*; +import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; +import java.io.*; +import java.sql.*; +import java.util.*; + +public class Main extends JavaPlugin implements Listener, CommandExecutor { + private static Connection db; + + @Override + public void onEnable() { + try { + if (!getDataFolder().exists()) getDataFolder().mkdirs(); + db = DriverManager.getConnection("jdbc:sqlite:" + new File(getDataFolder(), "storage.db")); + Statement st = db.createStatement(); + + // 爆破式表结构修复 + try { + st.executeQuery("SELECT page FROM v LIMIT 1"); + } catch (SQLException e) { + st.execute("DROP TABLE IF EXISTS v"); + Bukkit.getConsoleSender().sendMessage("§e[CY] 数据库格式过旧,已重置表结构。"); + } + st.execute("CREATE TABLE IF NOT EXISTS v (p TEXT, page INT, slot INT, data TEXT)"); + Bukkit.getConsoleSender().sendMessage("§a[CY] 仓库系统已就绪,等待主控握手信号。"); + } catch (Exception e) { e.printStackTrace(); } + getCommand("cy").setExecutor(this); + getServer().getPluginManager().registerEvents(this, this); + } + + @Override + public boolean onCommand(CommandSender s, Command c, String l, String[] a) { + if (s instanceof Player) openPage((Player) s, 0); + return true; + } + + public void openPage(Player p, int page) { + p.setMetadata("CY_PAGE", new FixedMetadataValue(this, page)); + p.setMetadata("CY_LOCK", new FixedMetadataValue(this, System.currentTimeMillis())); + + Inventory inv = Bukkit.createInventory(null, 54, "§0[云端仓库] 第 " + (page + 1) + " 页"); + for (int i = 45; i < 54; i++) inv.setItem(i, btn(Material.GRAY_STAINED_GLASS_PANE, " ", null)); + inv.setItem(45, btn(Material.ARROW, "§f上一页", null)); + inv.setItem(49, btn(Material.EMERALD, "§a§l商城与统计", "§7当前存量: §e" + count(p, page) + " / 40")); + inv.setItem(53, btn(Material.ARROW, "§f下一页", null)); + + try (PreparedStatement ps = db.prepareStatement("SELECT slot, data FROM v WHERE p = ? AND page = ?")) { + ps.setString(1, p.getName()); ps.setInt(2, page); + ResultSet rs = ps.executeQuery(); + while (rs.next()) inv.setItem(rs.getInt("slot"), deserialize(rs.getString("data"))); + } catch (Exception ignored) {} + p.openInventory(inv); + } + + @EventHandler + public void onClick(InventoryClickEvent e) { + if (e.getClickedInventory() == null || !e.getView().getTitle().contains("[云端仓库]")) return; + Player p = (Player) e.getWhoClicked(); + int slot = e.getRawSlot(); + + if (p.hasMetadata("CY_LOCK") && System.currentTimeMillis() - p.getMetadata("CY_LOCK").get(0).asLong() < 400) { + e.setCancelled(true); return; + } + + if (slot >= 45 && slot <= 53) { + e.setCancelled(true); + int page = p.getMetadata("CY_PAGE").get(0).asInt(); + if (slot == 45 && page > 0) { save(p, page, e.getInventory()); openPage(p, page - 1); } + if (slot == 53) { + save(p, page, e.getInventory()); + // 翻页限制:前三页必须满 40 格 + if (page < 2 || count(p, page) >= 40) openPage(p, page + 1); + else p.sendMessage("§c§l[拒绝] §7当前仓库分拣度不足 40 格。"); + } + } + } + + @EventHandler + public void onClose(InventoryCloseEvent e) { + if (e.getView().getTitle().contains("[云端仓库]") && e.getPlayer().hasMetadata("CY_PAGE")) { + save((Player) e.getPlayer(), e.getPlayer().getMetadata("CY_PAGE").get(0).asInt(), e.getInventory()); + } + } + + private void save(Player p, int page, Inventory inv) { + try { + PreparedStatement del = db.prepareStatement("DELETE FROM v WHERE p = ? AND page = ?"); + del.setString(1, p.getName()); del.setInt(2, page); del.executeUpdate(); + PreparedStatement ins = db.prepareStatement("INSERT INTO v VALUES (?,?,?,?)"); + for (int i = 0; i < 45; i++) { + ItemStack it = inv.getItem(i); + if (it != null && it.getType() != Material.AIR) { + ins.setString(1, p.getName()); ins.setInt(2, page); + ins.setInt(3, i); ins.setString(4, serialize(it)); + ins.executeUpdate(); + } + } + } catch (Exception ignored) {} + } + + private int count(Player p, int page) { + try (PreparedStatement ps = db.prepareStatement("SELECT COUNT(*) FROM v WHERE p=? AND page=?")) { + ps.setString(1, p.getName()); ps.setInt(2, page); + ResultSet rs = ps.executeQuery(); return rs.next() ? rs.getInt(1) : 0; + } catch (Exception e) { return 0; } + } + + // --- 反射握手入口 --- + public static void apiReceive(String n, int s, int d) { + Bukkit.getConsoleSender().sendMessage("§6[CY-Memory] 收到来自主控的扩容指令!"); + Bukkit.getConsoleSender().sendMessage("§7- 玩家: " + n + " | 增加格子: " + s + " | 增加时长: " + d); + // 这里对接具体的扩容逻辑 + } + + private String serialize(ItemStack item) { + try (ByteArrayOutputStream o = new ByteArrayOutputStream(); BukkitObjectOutputStream d = new BukkitObjectOutputStream(o)) { + d.writeObject(item); return Base64Coder.encodeLines(o.toByteArray()); + } catch (Exception e) { return ""; } + } + + private ItemStack deserialize(String b64) { + try (ByteArrayInputStream i = new ByteArrayInputStream(Base64Coder.decodeLines(b64)); BukkitObjectInputStream d = new BukkitObjectInputStream(i)) { + return (ItemStack) d.readObject(); + } catch (Exception e) { return null; } + } + + private ItemStack btn(Material m, String n, String lore) { + ItemStack item = new ItemStack(m); ItemMeta mt = item.getItemMeta(); + mt.setDisplayName(n); if (lore != null) mt.setLore(Arrays.asList(lore.split("\n"))); + item.setItemMeta(mt); return item; + } +} \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..bd1139c --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,9 @@ +name: CY_beibao +version: 1.0 +main: com.CY.Main +api-version: '1.20' +author: SDF_Engine +commands: + cy: + description: "Open your cloud vault" + usage: "/cy" \ No newline at end of file From f68be57d7ffa62e848a9a985c2435fc3f99b1a23 Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:39:26 +0000 Subject: [PATCH 11/12] update README.md. Signed-off-by: shidifu <1@ypshidifu.cn> --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3f1528a..dbbecab 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -# 草原探险服务器背包插件 +# CY_beibao 来自Sdf1的背包插件 +## 功能介绍 +### 1. 独立云存储,解决背包爆满、箱子爆满的问题 +### 2. api对接,预留接口可供其他插件对接 +### 3. 操作简便 -## 依托于Sdf1主控,实现独立的云存储。联动Essentials经济插件,可以实现付费功能 - -### 食用方法: -#### 下载文件[点击此处](https://gitee.com/nihaoshidifu/cy_beibao/releases) 将文件丢进去plguin目录即可 - -## 主指令: -### /cy 打开背包 \ No newline at end of file +## 食用方法: +## 1. 下载,从[点击此处](https://github.com/ypsdf1/CY_beibao/releases)下载我们的最新版 +## 2. 安装,把jar丢进你服务器的plugin +## 3. 启动,如果你之前使用过我们的1.01内测版、1.0测试版,记得删除旧的CY_beibao文件,如果没有,直接启动服务器或者运行的服务器打个stop +## 4. 打开背包:/cy From 3f346c59f6fd85a450b54ac7d791ca33709be07a Mon Sep 17 00:00:00 2001 From: shidifu <1@ypshidifu.cn> Date: Wed, 15 Apr 2026 06:39:51 +0000 Subject: [PATCH 12/12] update README.md. Signed-off-by: shidifu <1@ypshidifu.cn> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dbbecab..32ca0fa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ### 3. 操作简便 ## 食用方法: -## 1. 下载,从[点击此处](https://github.com/ypsdf1/CY_beibao/releases)下载我们的最新版 +## 1. 下载,从[点击此处](https://gitee.com/nihaoshidifu/cy_beibao/releases)下载我们的最新版 ## 2. 安装,把jar丢进你服务器的plugin ## 3. 启动,如果你之前使用过我们的1.01内测版、1.0测试版,记得删除旧的CY_beibao文件,如果没有,直接启动服务器或者运行的服务器打个stop ## 4. 打开背包:/cy