diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f91f646 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + +# Binary files should be left untouched +*.jar binary + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..758b899 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +/target +/rust/target +rust/resources/jassets/* +rust/resources/deps/* +!rust/resources/jassets/j4rs-* + +# Ignore Gradle project-specific cache directory +java/.gradle + +# Ignore Gradle build output directory +java/papkin/build +java/papkin/bin +java/papkin/.project +java/build +java/.idea +.idea diff --git a/README.md b/README.md new file mode 100644 index 0000000..42b2db2 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Papkin + +A plugin for [PumpkinMC](https://pumpkinmc.org/) that adds support for [PaperMC](https://papermc.io/), [Spigot](https://www.spigotmc.org/), and [Bukkit](https://dev.bukkit.org/) plugins. + +## Installation + +> [!IMPORTANT] +> Currently Papkin is in heavy development, as such releases are not yet available. + +1. Install [java](https://docs.papermc.io/misc/java-install/) +2. Download the plugin in releases `papkin-mac.dylib`, `papkin-linux-aarch64.so`, `papkin-linux-x86.so`, or `papkin-windows-x86.dll`. +3. Add it into your PumpkinMC plugin directory (this gets created after runing PumpkinMC for the first time). +4. Run PumpkinMC again, and you should see a new directory in PumpkinMC called `papkin`. You can add any `bukkit`, `spigot`, or `paper` plugin you wish, and it will run. + +## Development + +If you wish to contribute to Papkin, follow the following steps: + +1. Build PumpkinMC from source with the `nightly-2025-12-11` rust toolchain. +2. Clone this repository +3. `cd` into the `java` directory and run `./gradlew build` +4. `cd` into the `rust` directory and run `cargo build` +5. Copy the `target/debug/papkin` binary to the `plugins` directory in your PumpkinMC server. diff --git a/java/.project b/java/.project new file mode 100644 index 0000000..22e6854 --- /dev/null +++ b/java/.project @@ -0,0 +1,28 @@ + + + papkin-java + Project java created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + + + 1763985082869 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/java/.settings/org.eclipse.buildship.core.prefs b/java/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..33057e1 --- /dev/null +++ b/java/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments=--init-script /home/bjorn/.local/share/zed/extensions/work/java/jdtls/jdt-language-server-1.54.0-202511261751/configuration/org.eclipse.osgi/58/0/.cp/gradle/init/init.gradle +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/home/bjorn/.sdkman/candidates/java/21.0.6-tem +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/java/LICENSE-GPLv3 b/java/LICENSE-GPLv3 new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/java/LICENSE-GPLv3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. diff --git a/java/gradle.properties b/java/gradle.properties new file mode 100644 index 0000000..cb7975f --- /dev/null +++ b/java/gradle.properties @@ -0,0 +1,4 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties + +org.gradle.configuration-cache=true diff --git a/java/gradle/libs.versions.toml b/java/gradle/libs.versions.toml new file mode 100644 index 0000000..5dd7cdf --- /dev/null +++ b/java/gradle/libs.versions.toml @@ -0,0 +1,12 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +commons-math3 = "3.6.1" +guava = "33.3.1-jre" +junit-jupiter = "5.11.1" + +[libraries] +commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } diff --git a/java/gradle/wrapper/gradle-wrapper.jar b/java/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..a4b76b9 Binary files /dev/null and b/java/gradle/wrapper/gradle-wrapper.jar differ diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e18bc25 --- /dev/null +++ b/java/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/java/gradlew b/java/gradlew new file mode 100755 index 0000000..f3b75f3 --- /dev/null +++ b/java/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/java/gradlew.bat b/java/gradlew.bat new file mode 100644 index 0000000..9d21a21 --- /dev/null +++ b/java/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/papkin/.classpath b/java/papkin/.classpath new file mode 100644 index 0000000..be88c88 --- /dev/null +++ b/java/papkin/.classpath @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/java/papkin/.settings/org.eclipse.buildship.core.prefs b/java/papkin/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/java/papkin/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/java/papkin/build.gradle.kts b/java/papkin/build.gradle.kts new file mode 100644 index 0000000..fabd511 --- /dev/null +++ b/java/papkin/build.gradle.kts @@ -0,0 +1,21 @@ +plugins { + `java-library` +} + +repositories { + maven { + name = "papermc" + url = uri("https://repo.papermc.io/repository/maven-public/") + } +} + +dependencies { + compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT") + implementation("net.sf.jopt-simple:jopt-simple:6.0-alpha-3") +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/java/papkin/src/main/java/org/papkin/PapkinServer.java b/java/papkin/src/main/java/org/papkin/PapkinServer.java new file mode 100644 index 0000000..cfa5f92 --- /dev/null +++ b/java/papkin/src/main/java/org/papkin/PapkinServer.java @@ -0,0 +1,1817 @@ +package org.papkin; + +import com.destroystokyo.paper.entity.ai.MobGoals; +import io.papermc.paper.ban.BanListType; +import io.papermc.paper.configuration.ServerConfiguration; +import io.papermc.paper.datapack.DatapackManager; +import io.papermc.paper.math.Position; +import io.papermc.paper.threadedregions.scheduler.AsyncScheduler; +import io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler; +import io.papermc.paper.threadedregions.scheduler.RegionScheduler; +import java.awt.image.BufferedImage; +import java.io.File; +import java.net.InetAddress; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.function.Consumer; +import java.util.logging.Logger; +import net.kyori.adventure.audience.Audience; +import net.kyori.adventure.key.Key; +import net.kyori.adventure.text.Component; +import org.bukkit.BanList; +import org.bukkit.GameMode; +import org.bukkit.Keyed; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.OfflinePlayer; +import org.bukkit.Registry; +import org.bukkit.Server; +import org.bukkit.ServerLinks; +import org.bukkit.ServerTickManager; +import org.bukkit.StructureType; +import org.bukkit.Tag; +import org.bukkit.UnsafeValues; +import org.bukkit.Warning.WarningState; +import org.bukkit.World; +import org.bukkit.WorldBorder; +import org.bukkit.WorldCreator; +import org.bukkit.advancement.Advancement; +import org.bukkit.block.data.BlockData; +import org.bukkit.boss.BarColor; +import org.bukkit.boss.BarFlag; +import org.bukkit.boss.BarStyle; +import org.bukkit.boss.BossBar; +import org.bukkit.boss.KeyedBossBar; +import org.bukkit.command.CommandException; +import org.bukkit.command.CommandMap; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.PluginCommand; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityFactory; +import org.bukkit.entity.Player; +import org.bukkit.entity.SpawnCategory; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.generator.ChunkGenerator.ChunkData; +import org.bukkit.help.HelpMap; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemCraftResult; +import org.bukkit.inventory.ItemFactory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.Merchant; +import org.bukkit.inventory.Recipe; +import org.bukkit.loot.LootTable; +import org.bukkit.map.MapCursor.Type; +import org.bukkit.map.MapView; +import org.bukkit.packs.ResourcePack; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.ServicesManager; +import org.bukkit.plugin.messaging.Messenger; +import org.bukkit.potion.PotionBrewer; +import org.bukkit.profile.PlayerProfile; +import org.bukkit.scheduler.BukkitScheduler; +import org.bukkit.scoreboard.Criteria; +import org.bukkit.scoreboard.ScoreboardManager; +import org.bukkit.structure.StructureManager; +import org.bukkit.util.CachedServerIcon; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class PapkinServer implements Server { + + private final String serverName = + io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); + private final String bukkitVersion = Versioning.getBukkitVersion(); + + private final Logger logger = Logger.getLogger("Minecraft"); + + @Override + public void sendPluginMessage( + @NotNull Plugin source, + @NotNull String channel, + byte@NotNull [] message + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'sendPluginMessage'" + ); + } + + @Override + public @NotNull Set getListeningPluginChannels() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getListeningPluginChannels'" + ); + } + + @Override + public @NotNull Iterable audiences() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'audiences'" + ); + } + + @Override + public @NotNull File getPluginsFolder() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPluginsFolder'" + ); + } + + @Override + public @NotNull String getName() { + return this.serverName; + } + + @Override + public @NotNull String getVersion() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getVersion'" + ); + } + + @Override + public @NotNull String getBukkitVersion() { + return this.bukkitVersion; + } + + @Override + public @NotNull String getMinecraftVersion() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMinecraftVersion'" + ); + } + + @Override + public @NotNull Collection getOnlinePlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOnlinePlayers'" + ); + } + + @Override + public int getMaxPlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMaxPlayers'" + ); + } + + @Override + public void setMaxPlayers(int maxPlayers) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setMaxPlayers'" + ); + } + + @Override + public int getPort() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPort'" + ); + } + + @Override + public int getViewDistance() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getViewDistance'" + ); + } + + @Override + public int getSimulationDistance() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getSimulationDistance'" + ); + } + + @Override + public @NotNull String getIp() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getIp'"); + } + + @Override + public @NotNull String getWorldType() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorldType'" + ); + } + + @Override + public boolean getGenerateStructures() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getGenerateStructures'" + ); + } + + @Override + public int getMaxWorldSize() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMaxWorldSize'" + ); + } + + @Override + public boolean getAllowEnd() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAllowEnd'" + ); + } + + @Override + public boolean getAllowNether() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAllowNether'" + ); + } + + @Override + public boolean isLoggingIPs() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isLoggingIPs'" + ); + } + + @Override + public @NotNull List getInitialEnabledPacks() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getInitialEnabledPacks'" + ); + } + + @Override + public @NotNull List getInitialDisabledPacks() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getInitialDisabledPacks'" + ); + } + + @Override + public @NotNull ServerTickManager getServerTickManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServerTickManager'" + ); + } + + @Override + public @Nullable ResourcePack getServerResourcePack() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServerResourcePack'" + ); + } + + @Override + public @NotNull String getResourcePack() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getResourcePack'" + ); + } + + @Override + public @NotNull String getResourcePackHash() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getResourcePackHash'" + ); + } + + @Override + public @NotNull String getResourcePackPrompt() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getResourcePackPrompt'" + ); + } + + @Override + public boolean isResourcePackRequired() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isResourcePackRequired'" + ); + } + + @Override + public boolean hasWhitelist() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'hasWhitelist'" + ); + } + + @Override + public void setWhitelist(boolean value) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setWhitelist'" + ); + } + + @Override + public boolean isWhitelistEnforced() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isWhitelistEnforced'" + ); + } + + @Override + public void setWhitelistEnforced(boolean value) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setWhitelistEnforced'" + ); + } + + @Override + public @NotNull Set getWhitelistedPlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWhitelistedPlayers'" + ); + } + + @Override + public void reloadWhitelist() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'reloadWhitelist'" + ); + } + + @Override + public @NotNull String getUpdateFolder() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getUpdateFolder'" + ); + } + + @Override + public @NotNull File getUpdateFolderFile() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getUpdateFolderFile'" + ); + } + + @Override + public long getConnectionThrottle() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getConnectionThrottle'" + ); + } + + @Override + public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getTicksPerSpawns'" + ); + } + + @Override + public @Nullable Player getPlayer(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPlayer'" + ); + } + + @Override + public @Nullable Player getPlayerExact(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPlayerExact'" + ); + } + + @Override + public @NotNull List matchPlayer(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'matchPlayer'" + ); + } + + @Override + public @Nullable Player getPlayer(@NotNull UUID id) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPlayer'" + ); + } + + @Override + public @Nullable UUID getPlayerUniqueId(@NotNull String playerName) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPlayerUniqueId'" + ); + } + + @Override + public @NotNull PluginManager getPluginManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPluginManager'" + ); + } + + @Override + public @NotNull BukkitScheduler getScheduler() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getScheduler'" + ); + } + + @Override + public @NotNull ServicesManager getServicesManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServicesManager'" + ); + } + + @Override + public @NotNull List getWorlds() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorlds'" + ); + } + + @Override + public boolean isTickingWorlds() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isTickingWorlds'" + ); + } + + @Override + public @Nullable World createWorld(@NotNull WorldCreator creator) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createWorld'" + ); + } + + @Override + public boolean unloadWorld(@NotNull String name, boolean save) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'unloadWorld'" + ); + } + + @Override + public boolean unloadWorld(@NotNull World world, boolean save) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'unloadWorld'" + ); + } + + @Override + public @NotNull World getRespawnWorld() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getRespawnWorld'" + ); + } + + @Override + public void setRespawnWorld(@NotNull World world) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setRespawnWorld'" + ); + } + + @Override + public @Nullable World getWorld(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorld'" + ); + } + + @Override + public @Nullable World getWorld(@NotNull UUID uid) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorld'" + ); + } + + @Override + public @Nullable World getWorld(@NotNull Key worldKey) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorld'" + ); + } + + @Override + public @NotNull WorldBorder createWorldBorder() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createWorldBorder'" + ); + } + + @Override + public @Nullable MapView getMap(int id) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMap'" + ); + } + + @Override + public @NotNull MapView createMap(@NotNull World world) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createMap'" + ); + } + + @Override + public @NotNull ItemStack createExplorerMap( + @NotNull World world, + @NotNull Location location, + @NotNull StructureType structureType, + int radius, + boolean findUnexplored + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createExplorerMap'" + ); + } + + @Override + public @Nullable ItemStack createExplorerMap( + @NotNull World world, + @NotNull Location location, + org.bukkit.generator.structure.@NotNull StructureType structureType, + @NotNull Type mapIcon, + int radius, + boolean findUnexplored + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createExplorerMap'" + ); + } + + @Override + public void reload() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'reload'" + ); + } + + @Override + public void reloadData() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'reloadData'" + ); + } + + @Override + public void updateResources() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'updateResources'" + ); + } + + @Override + public void updateRecipes() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'updateRecipes'" + ); + } + + @Override + public @NotNull Logger getLogger() { + return this.logger; + } + + @Override + public @Nullable PluginCommand getPluginCommand(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPluginCommand'" + ); + } + + @Override + public void savePlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'savePlayers'" + ); + } + + @Override + public boolean dispatchCommand( + @NotNull CommandSender sender, + @NotNull String commandLine + ) throws CommandException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'dispatchCommand'" + ); + } + + @Override + public boolean addRecipe(@Nullable Recipe recipe, boolean resendRecipes) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'addRecipe'" + ); + } + + @Override + public @NotNull List getRecipesFor(@NotNull ItemStack result) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getRecipesFor'" + ); + } + + @Override + public @Nullable Recipe getRecipe(@NotNull NamespacedKey recipeKey) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getRecipe'" + ); + } + + @Override + public @Nullable Recipe getCraftingRecipe( + @NotNull ItemStack@NotNull [] craftingMatrix, + @NotNull World world + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getCraftingRecipe'" + ); + } + + @Override + public @NotNull ItemCraftResult craftItemResult( + @NotNull ItemStack@NotNull [] craftingMatrix, + @NotNull World world, + @NotNull Player player + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'craftItemResult'" + ); + } + + @Override + public @NotNull ItemCraftResult craftItemResult( + @NotNull ItemStack@NotNull [] craftingMatrix, + @NotNull World world + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'craftItemResult'" + ); + } + + @Override + public @NotNull Iterator recipeIterator() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'recipeIterator'" + ); + } + + @Override + public void clearRecipes() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'clearRecipes'" + ); + } + + @Override + public void resetRecipes() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'resetRecipes'" + ); + } + + @Override + public boolean removeRecipe( + @NotNull NamespacedKey key, + boolean resendRecipes + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'removeRecipe'" + ); + } + + @Override + public @NotNull Map getCommandAliases() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getCommandAliases'" + ); + } + + @Override + public int getSpawnRadius() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getSpawnRadius'" + ); + } + + @Override + public void setSpawnRadius(int value) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setSpawnRadius'" + ); + } + + @Override + public boolean isEnforcingSecureProfiles() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isEnforcingSecureProfiles'" + ); + } + + @Override + public boolean isAcceptingTransfers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isAcceptingTransfers'" + ); + } + + @Override + public boolean getHideOnlinePlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getHideOnlinePlayers'" + ); + } + + @Override + public boolean getOnlineMode() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOnlineMode'" + ); + } + + @Override + public @NotNull ServerConfiguration getServerConfig() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServerConfig'" + ); + } + + @Override + public boolean getAllowFlight() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAllowFlight'" + ); + } + + @Override + public boolean isHardcore() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isHardcore'" + ); + } + + @Override + public void shutdown() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'shutdown'" + ); + } + + @Override + public int broadcast( + @NotNull Component message, + @NotNull String permission + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'broadcast'" + ); + } + + @Override + public @NotNull OfflinePlayer getOfflinePlayer(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOfflinePlayer'" + ); + } + + @Override + public @Nullable OfflinePlayer getOfflinePlayerIfCached( + @NotNull String name + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOfflinePlayerIfCached'" + ); + } + + @Override + public @NotNull OfflinePlayer getOfflinePlayer(@NotNull UUID id) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOfflinePlayer'" + ); + } + + @Override + public @NotNull PlayerProfile createPlayerProfile( + @Nullable UUID uniqueId, + @Nullable String name + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createPlayerProfile'" + ); + } + + @Override + public @NotNull PlayerProfile createPlayerProfile(@NotNull UUID uniqueId) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createPlayerProfile'" + ); + } + + @Override + public @NotNull PlayerProfile createPlayerProfile(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createPlayerProfile'" + ); + } + + @Override + public @NotNull Set getIPBans() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getIPBans'" + ); + } + + @Override + public void banIP(@NotNull String address) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'banIP'"); + } + + @Override + public void unbanIP(@NotNull String address) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'unbanIP'" + ); + } + + @Override + public void banIP(@NotNull InetAddress address) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'banIP'"); + } + + @Override + public void unbanIP(@NotNull InetAddress address) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'unbanIP'" + ); + } + + @Override + public @NotNull Set getBannedPlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getBannedPlayers'" + ); + } + + @Override + public > @NotNull T getBanList( + org.bukkit.BanList.@NotNull Type type + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getBanList'" + ); + } + + @Override + public , E> @NotNull B getBanList( + @NotNull BanListType type + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getBanList'" + ); + } + + @Override + public @NotNull Set getOperators() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOperators'" + ); + } + + @Override + public @NotNull GameMode getDefaultGameMode() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getDefaultGameMode'" + ); + } + + @Override + public void setDefaultGameMode(@NotNull GameMode mode) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setDefaultGameMode'" + ); + } + + @Override + public boolean forcesDefaultGameMode() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'forcesDefaultGameMode'" + ); + } + + @Override + public @NotNull ConsoleCommandSender getConsoleSender() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getConsoleSender'" + ); + } + + @Override + public @NotNull CommandSender createCommandSender( + @NotNull Consumer feedback + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createCommandSender'" + ); + } + + @Override + public @NotNull File getWorldContainer() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWorldContainer'" + ); + } + + @Override + public @NotNull OfflinePlayer@NotNull [] getOfflinePlayers() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getOfflinePlayers'" + ); + } + + @Override + public @NotNull Messenger getMessenger() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMessenger'" + ); + } + + @Override + public @NotNull HelpMap getHelpMap() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getHelpMap'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + @NotNull InventoryType type + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + @NotNull InventoryType type, + @NotNull Component title + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + @NotNull InventoryType type, + @NotNull String title + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + int size + ) throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + int size, + @NotNull Component title + ) throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Inventory createInventory( + @Nullable InventoryHolder owner, + int size, + @NotNull String title + ) throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createInventory'" + ); + } + + @Override + public @NotNull Merchant createMerchant(@Nullable Component title) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createMerchant'" + ); + } + + @Override + public @NotNull Merchant createMerchant(@Nullable String title) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createMerchant'" + ); + } + + @Override + public int getMaxChainedNeighborUpdates() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMaxChainedNeighborUpdates'" + ); + } + + @Override + public @NotNull Merchant createMerchant() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createMerchant'" + ); + } + + @Override + public int getSpawnLimit(@NotNull SpawnCategory spawnCategory) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getSpawnLimit'" + ); + } + + @Override + public boolean isPrimaryThread() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isPrimaryThread'" + ); + } + + @Override + public @NotNull Component motd() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'motd'"); + } + + @Override + public void motd(@NotNull Component motd) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'motd'"); + } + + @Override + public @Nullable Component shutdownMessage() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'shutdownMessage'" + ); + } + + @Override + public @NotNull String getMotd() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMotd'" + ); + } + + @Override + public void setMotd(@NotNull String motd) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setMotd'" + ); + } + + @Override + public @NotNull ServerLinks getServerLinks() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServerLinks'" + ); + } + + @Override + public @Nullable String getShutdownMessage() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getShutdownMessage'" + ); + } + + @Override + public @NotNull WarningState getWarningState() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getWarningState'" + ); + } + + @Override + public @NotNull ItemFactory getItemFactory() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getItemFactory'" + ); + } + + @Override + public @NotNull EntityFactory getEntityFactory() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getEntityFactory'" + ); + } + + @Override + public @NotNull ScoreboardManager getScoreboardManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getScoreboardManager'" + ); + } + + @Override + public @NotNull Criteria getScoreboardCriteria(@NotNull String name) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getScoreboardCriteria'" + ); + } + + @Override + public @Nullable CachedServerIcon getServerIcon() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getServerIcon'" + ); + } + + @Override + public @NotNull CachedServerIcon loadServerIcon(@NotNull File file) + throws IllegalArgumentException, Exception { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'loadServerIcon'" + ); + } + + @Override + public @NotNull CachedServerIcon loadServerIcon( + @NotNull BufferedImage image + ) throws IllegalArgumentException, Exception { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'loadServerIcon'" + ); + } + + @Override + public void setIdleTimeout(int threshold) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setIdleTimeout'" + ); + } + + @Override + public int getIdleTimeout() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getIdleTimeout'" + ); + } + + @Override + public int getPauseWhenEmptyTime() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPauseWhenEmptyTime'" + ); + } + + @Override + public void setPauseWhenEmptyTime(int seconds) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'setPauseWhenEmptyTime'" + ); + } + + @Override + public @NotNull ChunkData createChunkData(@NotNull World world) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createChunkData'" + ); + } + + @Override + public @NotNull BossBar createBossBar( + @Nullable String title, + @NotNull BarColor color, + @NotNull BarStyle style, + @NotNull BarFlag... flags + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBossBar'" + ); + } + + @Override + public @NotNull KeyedBossBar createBossBar( + @NotNull NamespacedKey key, + @Nullable String title, + @NotNull BarColor color, + @NotNull BarStyle style, + @NotNull BarFlag... flags + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBossBar'" + ); + } + + @Override + public @NotNull Iterator getBossBars() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getBossBars'" + ); + } + + @Override + public @Nullable KeyedBossBar getBossBar(@NotNull NamespacedKey key) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getBossBar'" + ); + } + + @Override + public boolean removeBossBar(@NotNull NamespacedKey key) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'removeBossBar'" + ); + } + + @Override + public @Nullable Entity getEntity(@NotNull UUID uuid) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getEntity'" + ); + } + + @Override + public double@NotNull [] getTPS() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getTPS'" + ); + } + + @Override + public long@NotNull [] getTickTimes() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getTickTimes'" + ); + } + + @Override + public double getAverageTickTime() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAverageTickTime'" + ); + } + + @Override + public @NotNull CommandMap getCommandMap() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getCommandMap'" + ); + } + + @Override + public @Nullable Advancement getAdvancement(@NotNull NamespacedKey key) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAdvancement'" + ); + } + + @Override + public @NotNull Iterator advancementIterator() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'advancementIterator'" + ); + } + + @Override + public @NotNull BlockData createBlockData(@NotNull Material material) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBlockData'" + ); + } + + @Override + public @NotNull BlockData createBlockData( + @NotNull Material material, + @Nullable Consumer consumer + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBlockData'" + ); + } + + @Override + public @NotNull BlockData createBlockData(@NotNull String data) + throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBlockData'" + ); + } + + @Override + public @NotNull BlockData createBlockData( + @Nullable Material material, + @Nullable String data + ) throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createBlockData'" + ); + } + + @Override + public @Nullable Tag getTag( + @NotNull String registry, + @NotNull NamespacedKey tag, + @NotNull Class clazz + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getTag'" + ); + } + + @Override + public @NotNull Iterable> getTags( + @NotNull String registry, + @NotNull Class clazz + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getTags'" + ); + } + + @Override + public @Nullable LootTable getLootTable(@NotNull NamespacedKey key) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getLootTable'" + ); + } + + @Override + public @NotNull List selectEntities( + @NotNull CommandSender sender, + @NotNull String selector + ) throws IllegalArgumentException { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'selectEntities'" + ); + } + + @Override + public @NotNull StructureManager getStructureManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getStructureManager'" + ); + } + + @Override + public @Nullable Registry getRegistry( + @NotNull Class tClass + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getRegistry'" + ); + } + + @Override + public @NotNull UnsafeValues getUnsafe() { + return PapkinUnsafeValues.INSTANCE; + } + + @Override + public @NotNull Spigot spigot() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'spigot'" + ); + } + + @Override + public void restart() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'restart'" + ); + } + + @Override + public void reloadPermissions() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'reloadPermissions'" + ); + } + + @Override + public boolean reloadCommandAliases() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'reloadCommandAliases'" + ); + } + + @Override + public boolean suggestPlayerNamesWhenNullTabCompletions() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'suggestPlayerNamesWhenNullTabCompletions'" + ); + } + + @Override + public @NotNull String getPermissionMessage() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPermissionMessage'" + ); + } + + @Override + public @NotNull Component permissionMessage() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'permissionMessage'" + ); + } + + @Override + public com.destroystokyo.paper.profile.@NotNull PlayerProfile createProfile( + @NotNull UUID uuid + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createProfile'" + ); + } + + @Override + public com.destroystokyo.paper.profile.@NotNull PlayerProfile createProfile( + @NotNull String name + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createProfile'" + ); + } + + @Override + public com.destroystokyo.paper.profile.@NotNull PlayerProfile createProfile( + @Nullable UUID uuid, + @Nullable String name + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createProfile'" + ); + } + + @Override + public com.destroystokyo.paper.profile.@NotNull PlayerProfile createProfileExact( + @Nullable UUID uuid, + @Nullable String name + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'createProfileExact'" + ); + } + + @Override + public int getCurrentTick() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getCurrentTick'" + ); + } + + @Override + public boolean isStopping() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isStopping'" + ); + } + + @Override + public @NotNull MobGoals getMobGoals() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getMobGoals'" + ); + } + + @Override + public @NotNull DatapackManager getDatapackManager() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getDatapackManager'" + ); + } + + @Override + public @NotNull PotionBrewer getPotionBrewer() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getPotionBrewer'" + ); + } + + @Override + public @NotNull RegionScheduler getRegionScheduler() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getRegionScheduler'" + ); + } + + @Override + public @NotNull AsyncScheduler getAsyncScheduler() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getAsyncScheduler'" + ); + } + + @Override + public @NotNull GlobalRegionScheduler getGlobalRegionScheduler() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'getGlobalRegionScheduler'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull World world, + @NotNull Position position + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull World world, + @NotNull Position position, + int squareRadiusChunks + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion(@NotNull Location location) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull Location location, + int squareRadiusChunks + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull World world, + int chunkX, + int chunkZ + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull World world, + int chunkX, + int chunkZ, + int squareRadiusChunks + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion( + @NotNull World world, + int minChunkX, + int minChunkZ, + int maxChunkX, + int maxChunkZ + ) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isOwnedByCurrentRegion(@NotNull Entity entity) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isOwnedByCurrentRegion'" + ); + } + + @Override + public boolean isGlobalTickThread() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isGlobalTickThread'" + ); + } + + @Override + public boolean isPaused() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'isPaused'" + ); + } + + @Override + public void allowPausing(@NotNull Plugin plugin, boolean value) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException( + "Unimplemented method 'allowPausing'" + ); + } +} diff --git a/java/papkin/src/main/java/org/papkin/PapkinUnsafeValues.java b/java/papkin/src/main/java/org/papkin/PapkinUnsafeValues.java new file mode 100644 index 0000000..084fcbc --- /dev/null +++ b/java/papkin/src/main/java/org/papkin/PapkinUnsafeValues.java @@ -0,0 +1,335 @@ +package org.papkin; + +import com.google.common.collect.Multimap; +import com.google.gson.JsonObject; +import io.papermc.paper.entity.EntitySerializationFlag; +import io.papermc.paper.inventory.tooltip.TooltipContext; +import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager; +import io.papermc.paper.registry.RegistryKey; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.event.HoverEvent; +import net.kyori.adventure.text.flattener.ComponentFlattener; +import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; +import org.bukkit.*; +import org.bukkit.advancement.Advancement; +import org.bukkit.attribute.Attributable; +import org.bukkit.attribute.Attribute; +import org.bukkit.attribute.AttributeModifier; +import org.bukkit.block.data.BlockData; +import org.bukkit.command.CommandSender; +import org.bukkit.damage.DamageSource; +import org.bukkit.damage.DamageType; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.CreativeCategory; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.inventory.ItemStack; +import org.bukkit.material.MaterialData; +import org.bukkit.plugin.InvalidPluginException; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginDescriptionFile; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.potion.PotionType; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jspecify.annotations.NonNull; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.function.BooleanSupplier; + +@SuppressWarnings("removal") +public class PapkinUnsafeValues implements UnsafeValues { + + public static final PapkinUnsafeValues INSTANCE = new PapkinUnsafeValues(); + + // These are commonly used - implement first + @Override + public int getDataVersion() { + return 4189; // 1.21.4 data version - match your server + } + + @Override + public ItemStack modifyItemStack(ItemStack stack, String arguments) { + return null; + } + + @Override + public boolean isSupportedApiVersion(String apiVersion) { + // Accept common API versions + return ( + apiVersion != null && + (apiVersion.equals("1.21") || apiVersion.equals("1.20")) + ); + } + + @Override + public byte[] serializeItem(ItemStack item) { + return new byte[0]; + } + + @Override + public ItemStack deserializeItem(byte[] data) { + return null; + } + + @Override + public @NotNull JsonObject serializeItemAsJson(@NotNull ItemStack itemStack) { + return null; + } + + @Override + public @NotNull ItemStack deserializeItemFromJson(@NotNull JsonObject data) throws IllegalArgumentException { + return null; + } + + @Override + public byte @NotNull [] serializeEntity(@NotNull Entity entity, @NonNull @NotNull EntitySerializationFlag... serializationFlags) { + return new byte[0]; + } + + @Override + public @NotNull Entity deserializeEntity(byte @NotNull [] data, @NotNull World world, boolean preserveUUID, boolean preservePassengers) { + return null; + } + + @Override + public int nextEntityId() { + return 0; + } + + @Override + public @NotNull String getMainLevelName() { + return ""; + } + + @Override + public int getProtocolVersion() { + return 0; + } + + @Override + public boolean isValidRepairItemStack(@NotNull ItemStack itemToBeRepaired, @NotNull ItemStack repairMaterial) { + return false; + } + + @Override + public boolean hasDefaultEntityAttributes(@NotNull NamespacedKey entityKey) { + return false; + } + + @Override + public @NotNull Attributable getDefaultEntityAttributes(@NotNull NamespacedKey entityKey) { + return null; + } + + @Override + public @NotNull NamespacedKey getBiomeKey(RegionAccessor accessor, int x, int y, int z) { + return null; + } + + @Override + public void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey) { + + } + + @Override + public String getStatisticCriteriaKey(@NotNull Statistic statistic) { + return ""; + } + + @Override + public @Nullable Color getSpawnEggLayerColor(EntityType entityType, int layer) { + return null; + } + + @Override + public LifecycleEventManager createPluginLifecycleEventManager(JavaPlugin plugin, BooleanSupplier registrationCheck) { + return null; + } + + @Override + public @NotNull List computeTooltipLines(@NotNull ItemStack itemStack, @NotNull TooltipContext tooltipContext, @Nullable Player player) { + return List.of(); + } + + @Override + public ItemStack createEmptyStack() { + return null; + } + + @Override + public @NotNull Map serializeStack(ItemStack itemStack) { + return Map.of(); + } + + @Override + public @NotNull ItemStack deserializeStack(@NotNull Map args) { + return null; + } + + @Override + public @NotNull ItemStack deserializeItemHover(HoverEvent.@NotNull ShowItem itemHover) { + return null; + } + + @Override + public void checkSupported(PluginDescriptionFile pdf) throws InvalidPluginException { + // Be lenient during development - accept most plugins + String api = pdf.getAPIVersion(); + if (api != null && !isSupportedApiVersion(api)) { + throw new InvalidPluginException("Unsupported API: " + api); + } + } + + @Override + public byte[] processClass( + PluginDescriptionFile pdf, + String path, + byte[] clazz + ) { + // Return unchanged - skip Commodore remapping for now + return clazz; + } + + @Override + public Advancement loadAdvancement(NamespacedKey key, String advancement) { + return null; + } + + @Override + public boolean removeAdvancement(NamespacedKey key) { + return false; + } + + @Override + public Multimap getDefaultAttributeModifiers(Material material, EquipmentSlot slot) { + return null; + } + + @Override + public CreativeCategory getCreativeCategory(Material material) { + return null; + } + + @Override + public String getBlockTranslationKey(Material material) { + return ""; + } + + @Override + public String getItemTranslationKey(Material material) { + return ""; + } + + @Override + public String getTranslationKey(EntityType entityType) { + return ""; + } + + @Override + public String getTranslationKey(ItemStack itemStack) { + return ""; + } + + @Override + public String getTranslationKey(Attribute attribute) { + return ""; + } + + @Override + public PotionType.InternalPotionData getInternalPotionData(NamespacedKey key) { + return null; + } + + @Override + public DamageSource.@NotNull Builder createDamageSourceBuilder(@NotNull DamageType damageType) { + return null; + } + + @Override + public String get(Class aClass, String value) { + return ""; + } + + @Override + public B get(RegistryKey registry, NamespacedKey key) { + return null; + } + + // Adventure components - commonly used + @Override + public ComponentFlattener componentFlattener() { + return ComponentFlattener.basic(); + } + + @Override + public PlainComponentSerializer plainComponentSerializer() { + return null; + } + + @Override + public PlainTextComponentSerializer plainTextSerializer() { + return null; + } + + @Override + public GsonComponentSerializer gsonComponentSerializer() { + return null; + } + + @Override + public GsonComponentSerializer colorDownsamplingGsonComponentSerializer() { + return null; + } + + @Override + public LegacyComponentSerializer legacyComponentSerializer() { + return null; + } + + @Override + public Component resolveWithContext(Component component, CommandSender context, Entity scoreboardSubject, boolean bypassPermissions) throws IOException { + return null; + } + + // Stub everything else + @Override + public Material toLegacy(Material material) { + throw new UnsupportedOperationException( + "Pumpkin doesn't support legacy materials" + ); + } + + @Override + public Material fromLegacy(Material material) { + return null; + } + + @Override + public Material fromLegacy(MaterialData material) { + return null; + } + + @Override + public Material fromLegacy(MaterialData material, boolean itemPriority) { + return null; + } + + @Override + public BlockData fromLegacy(Material material, byte data) { + return null; + } + + @Override + public Material getMaterial(String material, int version) { + return null; + } + + // ... etc +} diff --git a/java/papkin/src/main/java/org/papkin/PluginLoader.java b/java/papkin/src/main/java/org/papkin/PluginLoader.java new file mode 100644 index 0000000..70fba95 --- /dev/null +++ b/java/papkin/src/main/java/org/papkin/PluginLoader.java @@ -0,0 +1,23 @@ +package org.papkin.loader; + +import io.papermc.paper.plugin.provider.util.ProviderUtil; +import java.io.File; +import java.net.URL; +import java.net.URLClassLoader; +import org.bukkit.plugin.java.JavaPlugin; + +public class PluginLoader { + + public JavaPlugin createPlugin(String mainClass) { + try { + return ProviderUtil.loadClass( + mainClass, + JavaPlugin.class, + this.getClass().getClassLoader() + ); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } +} diff --git a/java/papkin/src/main/java/org/papkin/PumpkinServerBuildInfo.java b/java/papkin/src/main/java/org/papkin/PumpkinServerBuildInfo.java new file mode 100644 index 0000000..a220c9e --- /dev/null +++ b/java/papkin/src/main/java/org/papkin/PumpkinServerBuildInfo.java @@ -0,0 +1,102 @@ +package org.papkin; + +import io.papermc.paper.ServerBuildInfo; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.Optional; +import java.util.OptionalInt; +import net.kyori.adventure.key.Key; +import org.jetbrains.annotations.NotNull; + +public final class PumpkinServerBuildInfo implements ServerBuildInfo { + + Key brandId; + Instant startTime = Instant.now(); + private static final String BUILD_DEV = "DEV"; + + @Override + public Key brandId() { + this.brandId = Key.key("pumpkinmc:paper"); + return brandId; + } + + @Override + public boolean isBrandCompatible(Key brandId) { + return ( + brandId.equals(this.brandId) || + brandId.equals(Key.key("papermc:paper")) + ); + } + + @Override + public String brandName() { + return "Pumpkin"; + } + + @Override + public String minecraftVersionId() { + return "1.21.10"; + } + + @Override + public String minecraftVersionName() { + return "1.21.10"; + } + + @Override + public OptionalInt buildNumber() { + return OptionalInt.empty(); + } + + @Override + public Instant buildTime() { + return this.startTime; + } + + @Override + public Optional gitBranch() { + return Optional.empty(); + } + + @Override + public Optional gitCommit() { + return Optional.empty(); + } + + @Override + public @NotNull String asString( + final @NotNull StringRepresentation representation + ) { + final StringBuilder sb = new StringBuilder(); + sb.append(this.minecraftVersionId()); + sb.append('-'); + if (this.buildNumber().isPresent()) { + sb.append(this.buildNumber().getAsInt()); + } else { + sb.append(BUILD_DEV); + } + final boolean hasGitBranch = this.gitBranch().isPresent(); + final boolean hasGitCommit = this.gitCommit().isPresent(); + if (hasGitBranch || hasGitCommit) { + sb.append('-'); + } + if ( + hasGitBranch && representation == StringRepresentation.VERSION_FULL + ) { + sb.append(this.gitBranch().get()); + if (hasGitCommit) { + sb.append('@'); + } + } + if (hasGitCommit) { + sb.append(this.gitCommit().get()); + } + if (representation == StringRepresentation.VERSION_FULL) { + sb.append(' '); + sb.append('('); + sb.append(this.buildTime().truncatedTo(ChronoUnit.SECONDS)); + sb.append(')'); + } + return sb.toString(); + } +} diff --git a/java/papkin/src/main/java/org/papkin/Versioning.java b/java/papkin/src/main/java/org/papkin/Versioning.java new file mode 100644 index 0000000..3a83be8 --- /dev/null +++ b/java/papkin/src/main/java/org/papkin/Versioning.java @@ -0,0 +1,36 @@ +package org.papkin; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.bukkit.Bukkit; + +public final class Versioning { + + public static String getBukkitVersion() { + String result = "Unknown-Version"; + + InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream( + "META-INF/maven/io.papermc.paper/paper-api/pom.properties" + ); + Properties properties = new Properties(); + + if (stream != null) { + try { + properties.load(stream); + + result = properties.getProperty("version"); + } catch (IOException ex) { + Logger.getLogger(Versioning.class.getName()).log( + Level.SEVERE, + "Could not get Bukkit version!", + ex + ); + } + } + + return result; + } +} diff --git a/java/papkin/src/main/resources/META-INF/services/io.papermc.paper.ServerBuildInfo b/java/papkin/src/main/resources/META-INF/services/io.papermc.paper.ServerBuildInfo new file mode 100644 index 0000000..628f511 --- /dev/null +++ b/java/papkin/src/main/resources/META-INF/services/io.papermc.paper.ServerBuildInfo @@ -0,0 +1 @@ +org.papkin.PumpkinServerBuildInfo diff --git a/java/settings.gradle.kts b/java/settings.gradle.kts new file mode 100644 index 0000000..aa2968e --- /dev/null +++ b/java/settings.gradle.kts @@ -0,0 +1,14 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.12.1/userguide/multi_project_builds.html in the Gradle documentation. + */ + +plugins { + // Apply the foojay-resolver plugin to allow automatic download of JDKs + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + +rootProject.name = "papkin" +include("papkin") diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml new file mode 100644 index 0000000..dfa84e8 --- /dev/null +++ b/rust/.cargo/config.toml @@ -0,0 +1,2 @@ +[unstable] +bindeps = true diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..1338c3e --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,3497 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "annotate-snippets" +version = "0.12.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15580ece6ea97cbf832d60ba19c021113469480852c6a2a6beb0db28f097bf1f" +dependencies = [ + "anstyle", + "unicode-width", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + +[[package]] +name = "async-compression" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base16ct" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96eb4cdd6cf1b31d671e9efe75c5d1ec614776856cefbe109ca373554a6d514f" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "bzip2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" +dependencies = [ + "libbz2-rs-sys", +] + +[[package]] +name = "cc" +version = "1.2.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb8" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "014c0a0e1ad0dae6a86c082db2f9bd7fe8c2c734227047d0d8b4d4a3a094a1e1" +dependencies = [ + "cipher", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chacha20" +version = "0.10.0-rc.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f895fb33c1ad22da4bc79d37c0bddff8aee2ba4575705345eb73b8ffbc386074" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.0-rc-3", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout", +] + +[[package]] +name = "clipboard-win" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" +dependencies = [ + "error-code", +] + +[[package]] +name = "cmov" +version = "0.5.0-pre.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5417da527aa9bf6a1e10a781231effd1edd3ee82f27d5f8529ac9b279babce96" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "colored" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "compression-codecs" +version = "0.4.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a" +dependencies = [ + "compression-core", + "flate2", +] + +[[package]] +name = "compression-core" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc4bff745c9b4c7fb1e97b25d13153da2bc7796260141df62378998d070207f" +dependencies = [ + "cookie", + "document-features", + "idna", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc-fast" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e75b2483e97a5a7da73ac68a05b629f9c53cff58d8ed1c77866079e18b00dba5" +dependencies = [ + "digest 0.10.7", + "spin", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossfire" +version = "2.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd901251b9b46c1752c85edfee0aee718c03a85a065f4126d32e5d6d419edf48" +dependencies = [ + "crossbeam-queue", + "crossbeam-utils", + "enum_dispatch", + "futures-core", + "parking_lot", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.7.0-rc.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37387ceb32048ff590f2cbd24d8b05fffe63c3f69a5cfa089d4f722ca4385a19" +dependencies = [ + "ctutils", + "num-traits", + "rand_core 0.10.0-rc-3", + "serdect", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.0-rc.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b8986f836d4aeb30ccf4c9d3bd562fd716074cfd7fc4a2948359fbd21ed809" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "crypto-primes" +version = "0.7.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79c98a281f9441200b24e3151407a629bfbe720399186e50516da939195e482" +dependencies = [ + "crypto-bigint 0.7.0-rc.18", + "libm", + "rand_core 0.10.0-rc-3", +] + +[[package]] +name = "ctutils" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758e5ed90be3c8abff7f9a6f37ab7f6d8c59c2210d448b81f3f508134aec84e4" +dependencies = [ + "cmov", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "deflate64" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204" + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid 0.9.6", + "pem-rfc7468 0.7.0", + "zeroize", +] + +[[package]] +name = "der" +version = "0.8.0-rc.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c1d73e9668ea6b6a28172aa55f3ebec38507131ce179051c8033b5c6037653" +dependencies = [ + "const-oid 0.10.2", + "pem-rfc7468 1.0.0", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.0-rc.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf9423bafb058e4142194330c52273c343f8a5beb7176d052f0e73b17dd35b9" +dependencies = [ + "block-buffer 0.11.0", + "const-oid 0.10.2", + "crypto-common 0.2.0-rc.9", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.10", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468 0.7.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "encoding_rs_io" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" +dependencies = [ + "encoding_rs", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "env_filter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fd-lock" +version = "4.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" +dependencies = [ + "cfg-if", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" + +[[package]] +name = "flate2" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" +dependencies = [ + "crc32fast", + "miniz_oxide", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.0-rc.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b99f0d993a2b9b97b9a201193aa8ad21305cde06a3be9a7e1f8f4201e5cc27e" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "rand_core 0.10.0-rc-3", + "wasip2", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac" +version = "0.13.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1c597ac7d6cc8143e30e83ef70915e7f883b18d8bec2e2b2bce47f5bbb06d57" +dependencies = [ + "digest 0.11.0-rc.5", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" +dependencies = [ + "typenum", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec 1.15.1", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec 1.15.1", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "j4rs" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19df11b7e099dfa6c1d3d9ec600dc95d4130b24a2196181cbb7dfcd75936f4a9" +dependencies = [ + "cesu8", + "dunce", + "fs_extra", + "futures", + "java-locator", + "jni-sys", + "libc", + "libloading", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "j4rs_derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6e49981d45d23643d89fa6383a54b73e9f49611b397c6656e6ad579b5122c7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "java-locator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c46c1fe465c59b1474e665e85e1256c3893dd00927b8d55f63b09044c1e64f" +dependencies = [ + "glob", +] + +[[package]] +name = "jiff" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libbz2-rs-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "lz4-java-wrc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed1c11dbd317fa5d0508cbb5ce47696bb27771e3c9604428e0e98c7c3d76d0d" +dependencies = [ + "lz4_flex", + "twox-hash 1.6.3", +] + +[[package]] +name = "lz4_flex" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" + +[[package]] +name = "lzma-rust2" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69" +dependencies = [ + "crc", + "sha2 0.10.9", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "md5" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec 1.15.1", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", +] + +[[package]] +name = "papkin" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "env_logger", + "glob", + "j4rs", + "j4rs_derive", + "log", + "pumpkin", + "pumpkin-api-macros", + "pumpkin-util", + "rust-embed", + "serde", + "serde-saphyr", + "tokio", + "walkdir", + "zip", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec 1.15.1", + "windows-link", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "pem-rfc7468" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pest" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +dependencies = [ + "pest", + "sha2 0.10.9", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.8.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +dependencies = [ + "der 0.8.0-rc.10", + "spki 0.8.0-rc.4", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.10", + "spki 0.7.3", +] + +[[package]] +name = "pkcs8" +version = "0.11.0-rc.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77089aec8290d0b7bb01b671b091095cf1937670725af4fd73d47249f03b12c0" +dependencies = [ + "der 0.8.0-rc.10", + "spki 0.8.0-rc.4", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppmd-rust" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d558c559f0450f16f2a27a1f017ef38468c1090c9ce63c8e51366232d53717b4" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pumpkin" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "base64", + "bytes", + "crossbeam", + "flate2", + "futures", + "hmac 0.13.0-rc.3", + "libloading", + "log", + "num-bigint", + "pkcs8 0.11.0-rc.8", + "pumpkin-config", + "pumpkin-data", + "pumpkin-inventory", + "pumpkin-macros", + "pumpkin-nbt", + "pumpkin-protocol", + "pumpkin-util", + "pumpkin-world", + "rand", + "rsa", + "rustc-hash", + "rustyline", + "serde", + "serde_json", + "sha1 0.11.0-rc.3", + "sha2 0.11.0-rc.3", + "signature 2.2.0", + "simplelog", + "thiserror", + "time", + "tokio", + "tokio-util", + "ureq", + "uuid", +] + +[[package]] +name = "pumpkin-api-macros" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pumpkin-config" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "log", + "pumpkin-util", + "serde", + "toml", + "uuid", +] + +[[package]] +name = "pumpkin-data" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "crc-fast", + "heck", + "indexmap", + "phf", + "proc-macro2", + "pumpkin-nbt", + "pumpkin-util", + "quote", + "rayon", + "serde", + "serde_json", + "serde_json5", + "syn", +] + +[[package]] +name = "pumpkin-inventory" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "crossbeam-utils", + "log", + "pumpkin-data", + "pumpkin-protocol", + "pumpkin-util", + "pumpkin-world", + "thiserror", + "tokio", +] + +[[package]] +name = "pumpkin-macros" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pumpkin-nbt" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "bytes", + "cesu8", + "flate2", + "serde", + "thiserror", +] + +[[package]] +name = "pumpkin-protocol" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "aes", + "async-compression", + "bitflags", + "bytes", + "cfb8", + "pumpkin-data", + "pumpkin-macros", + "pumpkin-nbt", + "pumpkin-util", + "pumpkin-world", + "serde", + "take_mut", + "thiserror", + "tokio", + "uuid", +] + +[[package]] +name = "pumpkin-util" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "base64", + "bytes", + "colored", + "ecdsa", + "enum_dispatch", + "md5", + "num-derive", + "num-traits", + "p384", + "proc-macro2", + "pumpkin-nbt", + "quote", + "serde", + "serde_json", + "syn", + "thiserror", + "tokio", + "uuid", +] + +[[package]] +name = "pumpkin-world" +version = "0.1.0-dev+1.21.11" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#bcdde4526fc8a96380d5aed72b6c002778cce697" +dependencies = [ + "bitflags", + "bytes", + "crossbeam", + "crossfire", + "dashmap", + "enum_dispatch", + "flate2", + "futures", + "itertools", + "log", + "lru", + "lz4-java-wrc", + "num-derive", + "num-traits", + "num_cpus", + "pumpkin-config", + "pumpkin-data", + "pumpkin-nbt", + "pumpkin-util", + "rand", + "rustc-hash", + "ruzstd", + "serde", + "serde_json", + "sha2 0.11.0-rc.3", + "slotmap", + "thiserror", + "thread_local", + "tokio", + "tokio-util", + "uuid", +] + +[[package]] +name = "quote" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.10.0-rc.6" +source = "git+https://github.com/rust-random/rand#f356bbae5817f382b19ac5741b549c4d2cd49b50" +dependencies = [ + "chacha20", + "getrandom 0.4.0-rc.0", + "rand_core 0.10.0-rc-3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.10.0-rc-3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66ee92bc15280519ef199a274fe0cafff4245d31bc39aaa31c011ad56cb1f05" + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rsa" +version = "0.10.0-rc.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9a2b1eacbc34fbaf77f6f1db1385518446008d49b9f9f59dc9d1340fce4ca9e" +dependencies = [ + "const-oid 0.10.2", + "crypto-bigint 0.7.0-rc.18", + "crypto-primes", + "digest 0.11.0-rc.5", + "pkcs1", + "pkcs8 0.11.0-rc.8", + "rand_core 0.10.0-rc-3", + "sha1 0.11.0-rc.3", + "signature 3.0.0-rc.6", + "spki 0.8.0-rc.4", + "zeroize", +] + +[[package]] +name = "rust-embed" +version = "8.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "8.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" +dependencies = [ + "proc-macro2", + "quote", + "rust-embed-utils", + "syn", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "8.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" +dependencies = [ + "sha2 0.10.9", + "walkdir", +] + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "rustyline" +version = "17.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e902948a25149d50edc1a8e0141aad50f54e22ba83ff988cf8f7c9ef07f50564" +dependencies = [ + "bitflags", + "cfg-if", + "clipboard-win", + "fd-lock", + "home", + "libc", + "log", + "memchr", + "nix", + "radix_trie", + "unicode-segmentation", + "unicode-width", + "utf8parse", + "windows-sys 0.60.2", +] + +[[package]] +name = "ruzstd" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01" +dependencies = [ + "twox-hash 2.1.2", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "saphyr-parser-bw" +version = "0.0.605" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1aee7486406df3541b5a657204a11be97175a467d77bc98e6d94a66289fb80" +dependencies = [ + "arraydeque", + "smallvec 2.0.0-alpha.12", + "thiserror", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.10", + "generic-array", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-saphyr" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4db5a4a562bcc0017c34cd0efbabf447be783f00576a2a516947f884e6a7ed57" +dependencies = [ + "ahash", + "annotate-snippets", + "base64", + "encoding_rs_io", + "nohash-hasher", + "num-traits", + "regex", + "saphyr-parser-bw", + "serde", + "serde_json", + "smallvec 2.0.0-alpha.12", + "zmij", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "indexmap", + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_json5" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d34d03f54462862f2a42918391c9526337f53171eaa4d8894562be7f252edd3" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serdect" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9af4a3e75ebd5599b30d4de5768e00b5095d518a79fefc3ecbaf77e665d1ec06" +dependencies = [ + "base16ct 1.0.0", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa1ae819b9870cadc959a052363de870944a1646932d274a4e270f64bf79e5ef" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.11.0-rc.5", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d43dc0354d88b791216bb5c1bfbb60c0814460cc653ae0ebd71f286d0bd927" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.11.0-rc.5", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "3.0.0-rc.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a96996ccff7dfa16f052bd995b4cecc72af22c35138738dc029f0ead6608d" +dependencies = [ + "digest 0.11.0-rc.5", + "rand_core 0.10.0-rc-3", +] + +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + +[[package]] +name = "simplelog" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" +dependencies = [ + "ansi_term", + "log", + "termcolor", + "time", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smallvec" +version = "2.0.0-alpha.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef784004ca8777809dcdad6ac37629f0a97caee4c685fcea805278d81dd8b857" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.10", +] + +[[package]] +name = "spki" +version = "0.8.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8baeff88f34ed0691978ec34440140e1572b68c7dd4a495fd14a3dc1944daa80" +dependencies = [ + "base64ct", + "der 0.8.0-rc.10", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "take_mut" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" + +[[package]] +name = "time-macros" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.9.11+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + +[[package]] +name = "twox-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" +dependencies = [ + "base64", + "cookie_store", + "flate2", + "log", + "percent-encoding", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "ureq-proto", + "utf-8", + "webpki-roots", +] + +[[package]] +name = "ureq-proto" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +dependencies = [ + "base64", + "http", + "httparse", + "log", +] + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +dependencies = [ + "getrandom 0.3.4", + "js-sys", + "md-5", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "webpki-roots" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9013f1222db8a6d680f13a7ccdc60a781199cd09c2fa4eff58e728bb181757fc" +dependencies = [ + "aes", + "bzip2", + "constant_time_eq", + "crc32fast", + "deflate64", + "flate2", + "generic-array", + "getrandom 0.3.4", + "hmac 0.12.1", + "indexmap", + "lzma-rust2", + "memchr", + "pbkdf2", + "ppmd-rust", + "sha1 0.10.6", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zlib-rs" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" + +[[package]] +name = "zmij" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd8f3f50b848df28f887acb68e41201b5aea6bc8a8dacc00fb40635ff9a72fea" + +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..23f52a6 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,35 @@ +[package] +name = "papkin" +version = "0.1.0" +edition = "2024" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +pumpkin = { git = "https://github.com/Pumpkin-MC/Pumpkin.git", branch = "master", package = "pumpkin" } +pumpkin-util = { git = "https://github.com/Pumpkin-MC/Pumpkin.git", branch = "master", package = "pumpkin-util" } +pumpkin-api-macros = { git = "https://github.com/Pumpkin-MC/Pumpkin.git", branch = "master", package = "pumpkin-api-macros" } + +async-trait = "0.1" +tokio = "1" +log = "0.4" +glob = "0.3.2" +j4rs = { version = "0.24" } +j4rs_derive = "0.1" +rust-embed = "8.9.0" +walkdir = "2" +zip = "7.1" + +serde-saphyr = "0.0.16" +serde = { version = "1", features = ["derive"] } + +anyhow = "1.0" + +[build-dependencies] +j4rs = { version = "0.24", artifact = "cdylib", lib = true } +env_logger = "0.11.8" +log = "0.4" + +[profile.release] +lto = true diff --git a/rust/build.rs b/rust/build.rs new file mode 100644 index 0000000..284bafd --- /dev/null +++ b/rust/build.rs @@ -0,0 +1,160 @@ +use std::{ + collections::HashSet, + error::Error, + fs, + path::{Path, PathBuf}, +}; + +use j4rs::{JvmBuilder, LocalJarArtifact, MavenArtifact, MavenArtifactRepo, MavenSettings}; + +fn main() -> Result<(), Box> { + println!("cargo::rerun-if-changed=rust/src/build.rs"); + println!("cargo::rerun-if-changed=java/build/libs/"); + env_logger::init(); + + let dependencies = [ + ("com.google.guava", "guava", "33.3.1-jre"), + ( + "net.md-5", + "bungeecord-chat", + "1.21-R0.2-deprecated+build.21", + ), + ("net.kyori", "adventure-text-logger-slf4j", "4.25.0"), + ("net.kyori", "adventure-text-minimessage", "4.25.0"), + ("net.kyori", "adventure-text-serializer-legacy", "4.25.0"), + ("net.kyori", "adventure-text-serializer-plain", "4.25.0"), + ("net.kyori", "adventure-text-serializer-json", "4.25.0"), + ("net.kyori", "adventure-api", "4.25.0"), + ("net.kyori", "adventure-key", "4.25.0"), + ("net.kyori", "adventure-text-serializer-commons", "4.25.0"), + ("net.kyori", "adventure-text-serializer-gson", "4.25.0"), + ("com.google.code.gson", "gson", "2.11.0"), + ("org.yaml", "snakeyaml", "2.2"), + ("org.joml", "joml", "1.10.8"), + ("it.unimi.dsi", "fastutil", "8.5.15"), + ("org.apache.logging.log4j", "log4j-api", "2.24.1"), + ( + "org.apache.maven.resolver", + "maven-resolver-connector-basic", + "1.9.18", + ), + ( + "org.apache.maven.resolver", + "maven-resolver-transport-http", + "1.9.18", + ), + ("org.apache.maven", "maven-resolver-provider", "3.9.6"), + ("org.apache.maven.resolver", "maven-resolver-impl", "1.9.18"), + ("org.slf4j", "jcl-over-slf4j", "1.7.36"), + ( + "org.apache.maven.resolver", + "maven-resolver-named-locks", + "1.9.18", + ), + ("org.slf4j", "slf4j-api", "2.0.16"), + ("com.mojang", "brigadier", "1.3.10"), + ("org.jspecify", "jspecify", "1.0.0"), + ("com.google.guava", "failureaccess", "1.0.2"), + ( + "com.google.guava", + "listenablefuture", + "9999.0-empty-to-avoid-conflict-with-guava", + ), + ("com.google.code.findbugs", "jsr305", "3.0.2"), + ("org.checkerframework", "checker-qual", "3.43.0"), + ("com.google.errorprone", "error_prone_annotations", "2.28.0"), + ("com.google.j2objc", "j2objc-annotations", "3.0.0"), + ("org.apache.maven", "maven-model-builder", "3.9.6"), + ("org.apache.maven", "maven-model", "3.9.6"), + ("org.apache.maven", "maven-repository-metadata", "3.9.6"), + ("org.apache.maven.resolver", "maven-resolver-spi", "1.9.18"), + ("org.apache.maven.resolver", "maven-resolver-util", "1.9.18"), + ("org.apache.maven.resolver", "maven-resolver-api", "1.9.18"), + ("org.apache.maven", "maven-artifact", "3.9.6"), + ("org.codehaus.plexus", "plexus-utils", "3.5.1"), + ("javax.inject", "javax.inject", "1"), + ("org.apache.httpcomponents", "httpclient", "4.5.14"), + ("org.apache.httpcomponents", "httpcore", "4.4.16"), + ("commons-codec", "commons-codec", "1.16.0"), + ("net.kyori", "examination-string", "1.3.0"), + ("net.kyori", "examination-api", "1.3.0"), + ("org.codehaus.plexus", "plexus-interpolation", "1.26"), + ("org.apache.maven", "maven-builder-support", "3.9.6"), + ("org.eclipse.sisu", "org.eclipse.sisu.inject", "0.9.0.M2"), + ("org.apache.commons", "commons-lang3", "3.12.0"), + ("net.kyori", "option", "1.1.0"), + ("io.papermc.paper", "paper-api", "1.21.11-R0.1-SNAPSHOT"), + ]; + + let jvm = JvmBuilder::new() + .with_maven_settings(MavenSettings::new(vec![MavenArtifactRepo::from( + "papermc::https://repo.papermc.io/repository/maven-public/", + )])) + .skip_setting_native_lib() + .with_base_path(&Path::new("./resources").canonicalize().unwrap()) + .build() + .map_err(|err| format!("jvm failed to init: {:?}", err)) + .unwrap(); + + let expected: HashSet = dependencies + .iter() + .map(|d| format!("{}-{}.jar", d.1, d.2)) + .collect(); + + for entry in fs::read_dir("./resources/jassets").unwrap() { + let entry = entry.unwrap(); + let file_name = entry.file_name().to_string_lossy().into_owned(); + + if file_name.starts_with("j4rs-") { + continue; + } + + if !expected.contains(&file_name) { + let remove_path = entry.path(); + fs::remove_file(remove_path).unwrap(); + } + } + + if Path::new("./resources/deps").exists() { + fs::remove_dir_all("./resources/deps").unwrap(); + } + + for dep in dependencies { + if !Path::new(&format!("./resources/jassets/{}-{}.jar", dep.1, dep.2)).exists() { + jvm.deploy_artifact(&MavenArtifact::from(format!( + "{}:{}:{}", + dep.0, dep.1, dep.2 + ))) + .unwrap(); + } + } + + if !Path::new("../java/papkin/build/libs/papkin.jar").exists() { + panic!( + "Failed to find papkin.jar, build the java library first by running `gradle build` in the java directory!" + ); + } + + jvm.deploy_artifact(&LocalJarArtifact::new( + "../java/papkin/build/libs/papkin.jar", + )) + .unwrap(); + + let cdylib = std::env::var("CARGO_CDYLIB_FILE_J4RS").unwrap(); + let cdylib = PathBuf::from(cdylib); + + let mut cdylib_to = PathBuf::from("./resources/deps"); + fs::create_dir_all(&cdylib_to).unwrap(); + + let original_name = cdylib.file_name().unwrap().to_string_lossy(); + let stem = original_name.split('-').next().unwrap(); // before the first '-' + let ext = cdylib.extension().unwrap().to_string_lossy(); + + cdylib_to.push(format!("{}.{}", stem, ext)); + + fs::copy(&cdylib, &cdylib_to) + .map_err(|err| format!("Failed to copy j4rs native lib: {:?}", err)) + .unwrap(); + + Ok(()) +} diff --git a/rust/resources/jassets/j4rs-0.24.0-jar-with-dependencies.jar b/rust/resources/jassets/j4rs-0.24.0-jar-with-dependencies.jar new file mode 100644 index 0000000..97e127e Binary files /dev/null and b/rust/resources/jassets/j4rs-0.24.0-jar-with-dependencies.jar differ diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml new file mode 100644 index 0000000..d9f6137 --- /dev/null +++ b/rust/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2025-12-11" +components = ["rust-analyzer", "rust-src"] diff --git a/rust/src/config/mod.rs b/rust/src/config/mod.rs new file mode 100644 index 0000000..a33bd6f --- /dev/null +++ b/rust/src/config/mod.rs @@ -0,0 +1,2 @@ +pub mod paper; +pub mod spigot; diff --git a/rust/src/config/paper.rs b/rust/src/config/paper.rs new file mode 100644 index 0000000..3ebac28 --- /dev/null +++ b/rust/src/config/paper.rs @@ -0,0 +1,284 @@ +use serde::Deserialize; +use std::collections::HashMap; + +pub const PAPER_PLUGIN_CONFIG: &str = "paper-plugin.yml"; + +/// Represents the load order for a dependency +#[derive(Debug, Deserialize, Default, Clone, PartialEq)] +#[serde(rename_all = "UPPERCASE")] +pub enum LoadOrder { + /// Load the dependency before this plugin + Before, + /// Load the dependency after this plugin + After, + /// Undefined ordering behavior + #[default] + Omit, +} + +/// Represents a single dependency declaration in Paper plugins +#[derive(Debug, Deserialize, Clone)] +pub struct PaperDependency { + /// Whether this plugin should load before or after your plugin + /// Defaults to OMIT + #[serde(default)] + pub load: LoadOrder, + + /// Whether this plugin is required for your plugin to load + /// Defaults to true + #[serde(default = "default_true")] + pub required: bool, + + /// Whether your plugin should have access to their classpath + /// Defaults to true + #[serde(rename = "join-classpath")] + #[serde(default = "default_true")] + pub join_classpath: bool, +} + +fn default_true() -> bool { + true +} + +impl Default for PaperDependency { + fn default() -> Self { + Self { + load: LoadOrder::Omit, + required: true, + join_classpath: true, + } + } +} + +/// Represents the dependencies section which is split into bootstrap and server +#[derive(Debug, Deserialize, Default, Clone)] +pub struct PaperDependencies { + /// Dependencies used in the bootstrapper phase + #[serde(default)] + pub bootstrap: Option>, + + /// Dependencies used for core functionality during server runtime + #[serde(default)] + pub server: Option>, +} + +impl PaperDependencies { + /// Get all bootstrap dependencies + pub fn get_bootstrap_deps(&self) -> Vec<(&String, &PaperDependency)> { + self.bootstrap + .as_ref() + .map(|deps| deps.iter().collect()) + .unwrap_or_default() + } + + /// Get all server dependencies + pub fn get_server_deps(&self) -> Vec<(&String, &PaperDependency)> { + self.server + .as_ref() + .map(|deps| deps.iter().collect()) + .unwrap_or_default() + } + + /// Get all required bootstrap dependencies + pub fn get_required_bootstrap_deps(&self) -> Vec<&String> { + self.bootstrap + .as_ref() + .map(|deps| { + deps.iter() + .filter(|(_, dep)| dep.required) + .map(|(name, _)| name) + .collect() + }) + .unwrap_or_default() + } + + /// Get all required server dependencies + pub fn get_required_server_deps(&self) -> Vec<&String> { + self.server + .as_ref() + .map(|deps| { + deps.iter() + .filter(|(_, dep)| dep.required) + .map(|(name, _)| name) + .collect() + }) + .unwrap_or_default() + } + + /// Check if a plugin is a bootstrap dependency + pub fn has_bootstrap_dep(&self, name: &str) -> bool { + self.bootstrap + .as_ref() + .map(|deps| deps.contains_key(name)) + .unwrap_or(false) + } + + /// Check if a plugin is a server dependency + pub fn has_server_dep(&self, name: &str) -> bool { + self.server + .as_ref() + .map(|deps| deps.contains_key(name)) + .unwrap_or(false) + } +} + +/// The main paper-plugin.yml configuration structure +#[derive(Debug, Deserialize)] +pub struct PaperPluginYml { + // Required fields + /// The name of your plugin + pub name: String, + + /// The current version of the plugin + pub version: String, + + /// The main class of your plugin (extends JavaPlugin) + pub main: String, + + // Optional metadata fields + /// A short description of your plugin + #[serde(default)] + pub description: Option, + + /// The author(s) of the plugin + #[serde(default)] + pub author: Option, + + /// List of authors + #[serde(default)] + pub authors: Option>, + + /// Contributors to the plugin + #[serde(default)] + pub contributors: Option>, + + /// The website of the plugin + #[serde(default)] + pub website: Option, + + // API version + /// The version of the Paper API (e.g., "1.21") + #[serde(rename = "api-version")] + #[serde(default)] + pub api_version: Option, + + // Paper-specific fields + /// The bootstrapper class that implements PluginBootstrap + #[serde(default)] + pub bootstrapper: Option, + + /// The loader class that implements PluginLoader + #[serde(default)] + pub loader: Option, + + // Dependencies (Paper plugin style) + /// Dependencies split into bootstrap and server sections + #[serde(default)] + pub dependencies: Option, + + // Optional: provides field (similar to Bukkit) + /// Other plugins this plugin can substitute for + #[serde(default)] + pub provides: Option>, +} + +impl PaperPluginYml { + /// Parse a paper-plugin.yml from a YAML string + pub fn from_str(yaml: &str) -> Result { + serde_saphyr::from_str(yaml) + } + + /// Get all authors (combines author and authors fields) + pub fn get_all_authors(&self) -> Vec { + let mut result = Vec::new(); + if let Some(ref author) = self.author { + result.push(author.clone()); + } + if let Some(ref authors) = self.authors { + result.extend(authors.clone()); + } + result + } + + /// Check if this plugin has a bootstrapper + pub fn has_bootstrapper(&self) -> bool { + self.bootstrapper.is_some() + } + + /// Check if this plugin has a custom loader + pub fn has_loader(&self) -> bool { + self.loader.is_some() + } + + /// Get dependencies (returns default if none specified) + pub fn get_dependencies(&self) -> PaperDependencies { + self.dependencies.clone().unwrap_or_default() + } + + /// Check if a plugin is required (in either bootstrap or server) + pub fn requires_plugin(&self, name: &str) -> bool { + if let Some(ref deps) = self.dependencies { + // Check bootstrap dependencies + if let Some(ref bootstrap) = deps.bootstrap { + if let Some(dep) = bootstrap.get(name) { + if dep.required { + return true; + } + } + } + // Check server dependencies + if let Some(ref server) = deps.server { + if let Some(dep) = server.get(name) { + if dep.required { + return true; + } + } + } + } + false + } + + /// Get all plugins that should load BEFORE this plugin + pub fn get_load_before_deps(&self) -> Vec { + let mut result = Vec::new(); + if let Some(ref deps) = self.dependencies { + if let Some(ref bootstrap) = deps.bootstrap { + for (name, dep) in bootstrap { + if dep.load == LoadOrder::Before { + result.push(name.clone()); + } + } + } + if let Some(ref server) = deps.server { + for (name, dep) in server { + if dep.load == LoadOrder::Before { + result.push(name.clone()); + } + } + } + } + result + } + + /// Get all plugins that should load AFTER this plugin + pub fn get_load_after_deps(&self) -> Vec { + let mut result = Vec::new(); + if let Some(ref deps) = self.dependencies { + if let Some(ref bootstrap) = deps.bootstrap { + for (name, dep) in bootstrap { + if dep.load == LoadOrder::After { + result.push(name.clone()); + } + } + } + if let Some(ref server) = deps.server { + for (name, dep) in server { + if dep.load == LoadOrder::After { + result.push(name.clone()); + } + } + } + } + result + } +} diff --git a/rust/src/config/spigot.rs b/rust/src/config/spigot.rs new file mode 100644 index 0000000..cceeecb --- /dev/null +++ b/rust/src/config/spigot.rs @@ -0,0 +1,193 @@ +use std::collections::HashMap; + +use serde::Deserialize; + +pub const SPIGOT_PLUGIN_CONFIG: &str = "plugin.yml"; + +/// Represents when a plugin should be loaded +#[derive(Debug, Deserialize, Default, Clone, PartialEq)] +#[serde(rename_all = "UPPERCASE")] +pub enum LoadOrder { + Startup, + #[default] + Postworld, +} + +/// Represents the default permission value +#[derive(Debug, Deserialize, Clone, PartialEq)] +#[serde(rename_all = "lowercase")] +pub enum DefaultPermission { + Op, + #[serde(alias = "notop")] + NotOp, + True, + False, +} + +impl Default for DefaultPermission { + fn default() -> Self { + DefaultPermission::Op + } +} + +/// Represents a permission node definition +#[derive(Debug, Deserialize, Clone)] +pub struct Permission { + #[serde(default)] + pub description: Option, + #[serde(default)] + pub default: Option, + #[serde(default)] + pub children: Option>, +} + +/// Represents a command definition +#[derive(Debug, Deserialize, Clone)] +pub struct Command { + #[serde(default)] + pub description: Option, + #[serde(default)] + pub usage: Option, + #[serde(default)] + pub aliases: Option, + #[serde(default)] + pub permission: Option, + #[serde(rename = "permission-message")] + #[serde(default)] + pub permission_message: Option, +} + +/// Helper type to handle fields that can be either a single string or a list of strings +#[derive(Debug, Deserialize, Clone)] +#[serde(untagged)] +pub enum StringOrList { + Single(String), + Multiple(Vec), +} + +impl StringOrList { + /// Convert to a Vec regardless of the variant + pub fn to_vec(&self) -> Vec { + match self { + StringOrList::Single(s) => vec![s.clone()], + StringOrList::Multiple(v) => v.clone(), + } + } +} + +/// The main plugin.yml configuration structure +#[derive(Debug, Deserialize)] +pub struct SpigotPluginYml { + // Required fields + /// The name of your plugin + pub name: String, + /// The current version of the plugin + pub version: String, + /// The main class of your plugin (extends JavaPlugin) + pub main: String, + + // Optional metadata fields + /// A short description of your plugin + #[serde(default)] + pub description: Option, + /// The author(s) of the plugin (can be single or list) + #[serde(default)] + pub author: Option, + /// List of authors (alternative to single author) + #[serde(default)] + pub authors: Option>, + /// Contributors to the plugin + #[serde(default)] + pub contributors: Option>, + /// The website of the plugin + #[serde(default)] + pub website: Option, + + // API and loading configuration + /// The version of the Paper API (e.g., "1.21") + #[serde(rename = "api-version")] + #[serde(default)] + pub api_version: Option, + /// When to load the plugin (STARTUP or POSTWORLD) + #[serde(default)] + pub load: Option, + /// The prefix for log messages + #[serde(default)] + pub prefix: Option, + + // Dependencies + /// Plugins that must be present for this plugin to load + #[serde(default)] + pub depend: Option>, + /// Plugins that enhance functionality if present + #[serde(default)] + pub softdepend: Option>, + /// Plugins that this plugin should load before + #[serde(default)] + pub loadbefore: Option>, + /// Other plugins this plugin can substitute for + #[serde(default)] + pub provides: Option>, + + // Libraries + /// Maven dependencies to download + #[serde(default)] + pub libraries: Option>, + + // Commands and permissions + /// Command definitions + #[serde(default)] + pub commands: Option>, + /// Permission definitions + #[serde(default)] + pub permissions: Option>, + /// Default permission value for unspecified permissions + #[serde(rename = "default-permission")] + #[serde(default)] + pub default_permission: Option, + + // Paper-specific fields + /// Paper plugin loader class + #[serde(rename = "paper-plugin-loader")] + #[serde(default)] + pub paper_plugin_loader: Option, + /// Skip library resolution (delegate to loader) + #[serde(rename = "paper-skip-libraries")] + #[serde(default)] + pub paper_skip_libraries: Option, +} + +impl SpigotPluginYml { + /// Parse a plugin.yml from a YAML string + pub fn from_str(yaml: &str) -> Result { + serde_saphyr::from_str(yaml) + } + + /// Get all authors (combines author and authors fields) + pub fn get_all_authors(&self) -> Vec { + let mut result = Vec::new(); + if let Some(ref author) = self.author { + result.push(author.clone()); + } + if let Some(ref authors) = self.authors { + result.extend(authors.clone()); + } + result + } + + /// Check if this plugin depends on another plugin + pub fn depends_on(&self, plugin_name: &str) -> bool { + if let Some(ref deps) = self.depend { + return deps.iter().any(|d| d == plugin_name); + } + false + } + + /// Check if this plugin soft-depends on another plugin + pub fn soft_depends_on(&self, plugin_name: &str) -> bool { + if let Some(ref deps) = self.softdepend { + return deps.iter().any(|d| d == plugin_name); + } + false + } +} diff --git a/rust/src/directories.rs b/rust/src/directories.rs new file mode 100644 index 0000000..2def2c2 --- /dev/null +++ b/rust/src/directories.rs @@ -0,0 +1,37 @@ +use std::{fs, path::PathBuf}; + +use pumpkin::plugin::Context; + +pub struct PapkinDirectories { + pub base: PathBuf, + pub plugins: PathBuf, + pub plugin_updates: PathBuf, + pub j4rs: PathBuf, + pub jassets: PathBuf, +} + +pub fn setup_directories(server: &Context) -> Result { + let base = server + .get_data_folder() + .canonicalize() + .map_err(|_| "Failed to get absolute directory from relative")?; + + let plugins = base.join("papkin-plugins"); + let plugin_updates = plugins.join("update"); + let j4rs = base.join("j4rs"); + let jassets = j4rs.join("jassets"); + + fs::create_dir_all(&plugin_updates) + .map_err(|err| format!("Failed to create plugin folder: {:?}", err))?; + + fs::create_dir_all(&jassets) + .map_err(|err| format!("Failed to create jassets folder: {:?}", err))?; + + Ok(PapkinDirectories { + base, + plugins, + plugin_updates, + j4rs, + jassets, + }) +} diff --git a/rust/src/java/jar.rs b/rust/src/java/jar.rs new file mode 100644 index 0000000..67acc51 --- /dev/null +++ b/rust/src/java/jar.rs @@ -0,0 +1,55 @@ +use std::{ + fs::File, + io::Read, + path::{Path, PathBuf}, +}; + +use anyhow::Result; +use glob::glob; +use zip::ZipArchive; + +use crate::config::{paper::PAPER_PLUGIN_CONFIG, spigot::SPIGOT_PLUGIN_CONFIG}; + +pub fn discover_jar_files(plugin_folder: &PathBuf) -> Vec { + let pattern = format!("{}/**/*.jar", plugin_folder.to_string_lossy()); + let mut entries = Vec::new(); + + for entry in glob(&pattern).expect("Failed to read glob pattern") { + match entry { + Ok(inner_path) => match inner_path.canonicalize() { + Ok(path) => entries.push(path), + Err(e) => log::error!("Failed to convert path to string: {:?}", e), + }, + Err(e) => log::error!("Failed to canonicalize path: {:?}", e), + } + } + + entries +} + +pub fn read_configs_from_jar>( + jar_path: P, +) -> Result<(Option, Option)> { + let file = File::open(jar_path.as_ref())?; + let mut archive = ZipArchive::new(file)?; + + let paper_plugin_yml = match archive.by_name(PAPER_PLUGIN_CONFIG).ok() { + Some(mut file) => { + let mut content = String::new(); + file.read_to_string(&mut content)?; + Some(content) + } + None => None, + }; + + let spigot_plugin_yml = match archive.by_name(SPIGOT_PLUGIN_CONFIG).ok() { + Some(mut file) => { + let mut content = String::new(); + file.read_to_string(&mut content)?; + Some(content) + } + None => None, + }; + + Ok((paper_plugin_yml, spigot_plugin_yml)) +} diff --git a/rust/src/java/java_to_rust.rs b/rust/src/java/java_to_rust.rs new file mode 100644 index 0000000..784c2c5 --- /dev/null +++ b/rust/src/java/java_to_rust.rs @@ -0,0 +1,10 @@ +use j4rs::prelude::*; +use j4rs_derive::*; + +#[call_from_java("io.github.astonbitecode.j4rs.example.RustSimpleFunctionCall.fnnoargs")] +fn my_function_with_no_args() { + println!("Hello from the Rust world!"); + // If you need to have a Jvm here, you need to attach the thread + let _jvm = Jvm::attach_thread().unwrap(); + // Now you may further call Java classes and methods as usual! +} diff --git a/rust/src/java/jvm.rs b/rust/src/java/jvm.rs new file mode 100644 index 0000000..c270255 --- /dev/null +++ b/rust/src/java/jvm.rs @@ -0,0 +1,31 @@ +use std::path::PathBuf; + +use j4rs::{ClasspathEntry, InvocationArg, Jvm, JvmBuilder}; + +pub fn initialize_jvm( + classpath_entries: Vec, + j4rs_folder: &PathBuf, +) -> Result { + let jvm = JvmBuilder::new() + .classpath_entries(classpath_entries) + .with_base_path(j4rs_folder) + .build() + .map_err(|err| format!("JVM failed to init: {:?}", err))?; + + Ok(jvm) +} + +pub fn setup_papkin_server(jvm: &Jvm) -> Result<(), String> { + let papkin_server = jvm + .create_instance("org.papkin.PapkinServer", InvocationArg::empty()) + .map_err(|err| format!("Failed to create PapkinServer instance: {:?}", err))?; + + jvm.invoke_static( + "org.bukkit.Bukkit", + "setServer", + &[InvocationArg::from(papkin_server)], + ) + .map_err(|err| format!("Failed to set Bukkit server: {:?}", err))?; + + Ok(()) +} diff --git a/rust/src/java/mod.rs b/rust/src/java/mod.rs new file mode 100644 index 0000000..6857f30 --- /dev/null +++ b/rust/src/java/mod.rs @@ -0,0 +1,4 @@ +pub mod jar; +pub mod java_to_rust; +pub mod jvm; +pub mod resources; diff --git a/rust/src/java/resources.rs b/rust/src/java/resources.rs new file mode 100644 index 0000000..3f1893f --- /dev/null +++ b/rust/src/java/resources.rs @@ -0,0 +1,62 @@ +use std::{collections::HashSet, fs, path::PathBuf}; + +use rust_embed::Embed; + +#[derive(Embed)] +#[folder = "resources/"] +pub struct Resources; + +pub fn cleanup_stale_files(j4rs_folder: &PathBuf) { + let allowed: HashSet = Resources::iter().map(|p| p.to_string()).collect(); + + for entry in walkdir::WalkDir::new(j4rs_folder) + .into_iter() + .filter_map(|e| e.ok()) + .filter(|e| e.file_type().is_file()) + { + let rel_path = entry + .path() + .strip_prefix(j4rs_folder) + .unwrap() + .to_string_lossy() + .to_string(); + + if !allowed.contains(&rel_path) { + log::warn!("Removing stale j4rs file: {rel_path}"); + let _ = fs::remove_file(entry.path()); + } + } +} + +pub fn sync_embedded_resources(j4rs_folder: &PathBuf) -> Result<(), String> { + for resource_path_str in Resources::iter() { + let resource_path = j4rs_folder.join(resource_path_str.to_string()); + let resource = Resources::get(&resource_path_str).unwrap(); + + if !resource_path.exists() { + write_resource(&resource_path, &resource.data)?; + } else { + update_resource_if_changed(&resource_path, &resource.data)?; + } + } + + Ok(()) +} + +fn write_resource(path: &PathBuf, data: &[u8]) -> Result<(), String> { + let parent = path.parent().ok_or("Resource has no parent directory")?; + fs::create_dir_all(parent) + .map_err(|err| format!("Failed to create parent for resource: {:?}", err))?; + + fs::write(path, data).map_err(|err| format!("Failed to add resource: {:?}", err)) +} + +fn update_resource_if_changed(path: &PathBuf, new_data: &[u8]) -> Result<(), String> { + let old_data = fs::read(path).map_err(|err| format!("Failed to read resource: {:?}", err))?; + + if new_data != old_data { + fs::write(path, new_data).map_err(|err| format!("Failed to update resource: {:?}", err))?; + } + + Ok(()) +} diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 0000000..532aea3 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,102 @@ +use std::sync::Arc; + +use j4rs::ClasspathEntry; +use pumpkin::plugin::Context; +use pumpkin_api_macros::{plugin_impl, plugin_method}; + +pub mod config; +pub mod directories; +pub mod java; +pub mod plugin; + +use directories::setup_directories; +use java::{ + jar::discover_jar_files, + jvm::{initialize_jvm, setup_papkin_server}, + resources::{cleanup_stale_files, sync_embedded_resources}, +}; + +use crate::{java::jar::read_configs_from_jar, plugin::manager::PluginManager}; + +async fn on_load_inner(_plugin: &mut MyPlugin, server: Arc) -> Result<(), String> { + server.init_log(); + log::info!("Starting Papkin"); + + // Setup directories + let dirs = setup_directories(&server)?; + + let mut plugin_manager = PluginManager::new(); + + // Discover and prepare JAR files + let jar_paths = discover_jar_files(&dirs.plugins); + for jar_path in &jar_paths { + match read_configs_from_jar(jar_path) { + Ok(configs) => match configs { + (Some(paper_plugin_config), spigot @ _) => { + match plugin_manager.load_paper_plugin(jar_path, &paper_plugin_config, &spigot) + { + Ok(_) => log::info!("Loaded Paper plugin from JAR: {}", jar_path.display()), + Err(err) => log::error!("Failed to load Paper plugin from JAR: {}", err), + } + } + (None, Some(spigot)) => { + match plugin_manager.load_spigot_plugin(jar_path, &spigot) { + Ok(_) => { + log::info!("Loaded Spigot plugin from JAR: {}", jar_path.display()) + } + Err(err) => log::error!("Failed to load Spigot plugin from JAR: {}", err), + } + } + (None, None) => log::warn!( + "Could not find any plugin configuration in JAR: {}", + jar_path.display() + ), + }, + Err(err) => { + log::error!("Failed to read configs from papkin plugin jar: {}", err); + } + } + } + let classpath_entries = jar_paths + .iter() + .map(|entry| ClasspathEntry::new(entry)) + .collect(); + + // Manage embedded resources + cleanup_stale_files(&dirs.j4rs); + sync_embedded_resources(&dirs.j4rs)?; + + // Initialize JVM and Papkin server + let jvm = initialize_jvm(classpath_entries, &dirs.j4rs)?; + setup_papkin_server(&jvm)?; + + plugin_manager + .load_all_plugins(&jvm) + .map_err(|err| format!("Failed to load papkin plugins: {}", err))?; + + plugin_manager + .enable_all_plugins(&jvm) + .map_err(|err| format!("Failed to enable papkin plugins: {}", err))?; + + Ok(()) +} + +#[plugin_method] +async fn on_load(&mut self, server: Arc) -> Result<(), String> { + on_load_inner(self, server).await +} + +#[plugin_impl] +pub struct MyPlugin {} + +impl MyPlugin { + pub fn new() -> Self { + MyPlugin {} + } +} + +impl Default for MyPlugin { + fn default() -> Self { + Self::new() + } +} diff --git a/rust/src/plugin/manager.rs b/rust/src/plugin/manager.rs new file mode 100644 index 0000000..d6663d4 --- /dev/null +++ b/rust/src/plugin/manager.rs @@ -0,0 +1,172 @@ +use std::path::{Path, PathBuf}; + +use anyhow::Result; +use j4rs::{Instance, InvocationArg, Jvm}; + +use crate::config::{paper::PaperPluginYml, spigot::SpigotPluginYml}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PluginState { + /// Plugin config has been loaded, but not yet initialized in JVM + Registered, + /// Plugin class has been loaded and instance created + Loaded, + /// Plugin is enabled (onEnable called) + Enabled, + /// Plugin is disabled (onDisable called) + Disabled, + /// Plugin failed to load or enable + Errored, +} + +#[derive(Debug)] +pub enum PluginType { + Paper(PaperPluginData), + Spigot(SpigotPluginData), +} + +#[derive(Debug)] +pub struct PaperPluginData { + pub paper_config: PaperPluginYml, + pub spigot_config: Option, +} + +#[derive(Debug)] +pub struct SpigotPluginData { + pub spigot_config: SpigotPluginYml, +} + +pub struct Plugin { + /// Unique plugin name + pub name: String, + /// Plugin version + pub version: String, + /// Main class fully qualified name + pub main_class: String, + /// Path to the JAR file + pub path: PathBuf, + /// Plugin-specific data (Paper or Spigot) + pub plugin_type: PluginType, + /// Current state + pub state: PluginState, + /// Data folder for this plugin + pub data_folder: PathBuf, + pub instance: Option, +} + +pub struct PluginManager { + plugins: Vec, +} + +impl PluginManager { + pub fn new() -> Self { + Self { + plugins: Vec::new(), + } + } + + pub fn add_plugin(&mut self, plugin: Plugin) { + self.plugins.push(plugin); + } + + pub fn load_paper_plugin>( + &mut self, + jar_path: P, + paper_plugin_config: &str, + spigot_plugin_config: &Option, + ) -> Result<()> { + let parsed_paper_plugin = PaperPluginYml::from_str(paper_plugin_config)?; + let parsed_spigot_plugin = match spigot_plugin_config { + Some(config) => Some(SpigotPluginYml::from_str(config)?), + None => None, + }; + + let plugin = Plugin { + name: parsed_paper_plugin.name.clone(), + version: parsed_paper_plugin.version.clone(), + main_class: parsed_paper_plugin.main.clone(), + plugin_type: PluginType::Paper(PaperPluginData { + paper_config: parsed_paper_plugin, + spigot_config: parsed_spigot_plugin, + }), + state: PluginState::Registered, + data_folder: jar_path.as_ref().parent().unwrap().join("data"), + path: jar_path.as_ref().to_path_buf(), + instance: None, + }; + + self.add_plugin(plugin); + Ok(()) + } + + pub fn load_spigot_plugin>( + &mut self, + jar_path: P, + spigot_plugin_config: &str, + ) -> Result<()> { + let parsed_spigot_plugin = SpigotPluginYml::from_str(spigot_plugin_config)?; + + let plugin = Plugin { + name: parsed_spigot_plugin.name.clone(), + version: parsed_spigot_plugin.version.clone(), + main_class: parsed_spigot_plugin.main.clone(), + plugin_type: PluginType::Spigot(SpigotPluginData { + spigot_config: parsed_spigot_plugin, + }), + state: PluginState::Registered, + data_folder: jar_path.as_ref().parent().unwrap().join("data"), + path: jar_path.as_ref().to_path_buf(), + instance: None, + }; + + self.add_plugin(plugin); + Ok(()) + } + + pub fn enable_all_plugins(&mut self, jvm: &Jvm) -> Result<()> { + for plugin in &mut self.plugins { + let result = jvm.invoke( + plugin.instance.as_ref().unwrap(), + "onEnable", + InvocationArg::empty(), + ); + + match result { + Ok(_) => { + plugin.state = PluginState::Enabled; + log::info!("Enabled papkin plugin: {}", plugin.name); + } + Err(e) => { + plugin.state = PluginState::Errored; + log::error!("Failed to enable papkin plugin {}: {:?}", plugin.name, e); + } + } + } + Ok(()) + } + + pub fn load_all_plugins(&mut self, jvm: &Jvm) -> Result<()> { + let loader = + jvm.create_instance("org.papkin.loader.PluginLoader", InvocationArg::empty())?; + for plugin in &mut self.plugins { + let result = jvm.invoke( + &loader, + "createPlugin", + &[InvocationArg::try_from(&plugin.main_class)?], + ); + + match result { + Ok(instance) => { + plugin.instance = Some(instance); + plugin.state = PluginState::Loaded; + log::info!("Loaded papkin plugin: {}", plugin.name); + } + Err(e) => { + plugin.state = PluginState::Errored; + log::error!("Failed to load papkin plugin {}: {:?}", plugin.name, e); + } + } + } + Ok(()) + } +} diff --git a/rust/src/plugin/mod.rs b/rust/src/plugin/mod.rs new file mode 100644 index 0000000..ff8de9e --- /dev/null +++ b/rust/src/plugin/mod.rs @@ -0,0 +1 @@ +pub mod manager;