26 Commits
1.0 ... 1.0.2

Author SHA1 Message Date
d8fe5c26d8 Edit README.md via Git Manager GUI 2026-03-24 09:27:19 +00:00
f9cc4773c0 Edit README.md via Git Manager GUI 2026-03-24 09:27:18 +00:00
c6c66b1320 Edit README.md via Git Manager GUI 2026-03-24 09:27:18 +00:00
84f7b2409d README.md aktualisiert 2026-03-01 11:25:32 +00:00
ce9c40137a Update from Git Manager GUI 2026-01-27 00:02:21 +01:00
b4eeb2dee7 Upload pom.xml via GUI 2026-01-26 23:02:21 +00:00
90e36f45be README.md aktualisiert 2026-01-26 23:01:27 +00:00
3bf449a8cf README.md aktualisiert 2026-01-26 23:01:16 +00:00
0e212d8f54 src/main/java/de/mviper/adventskalender/AdminCommand.java gelöscht 2026-01-26 23:00:45 +00:00
db88f6a3c4 src/main/java/de/mviper/adventskalender/AdventCalendarExpansion.java gelöscht 2026-01-26 23:00:41 +00:00
282291f576 src/main/java/de/mviper/adventskalender/AdventCommand.java gelöscht 2026-01-26 23:00:37 +00:00
244681a7e7 src/main/java/de/mviper/adventskalender/AdventInventory.java gelöscht 2026-01-26 23:00:33 +00:00
d9e95e884e src/main/java/de/mviper/adventskalender/Adventskalender.java gelöscht 2026-01-26 23:00:29 +00:00
8c5226f4bf src/main/java/de/mviper/adventskalender/LanguageManager.java gelöscht 2026-01-26 23:00:24 +00:00
0997ddc085 src/main/java/de/mviper/adventskalender/AdventListener.java gelöscht 2026-01-26 23:00:20 +00:00
26c46b600a src/main/java/de/mviper/adventskalender/CalendarData.java gelöscht 2026-01-26 23:00:16 +00:00
7da7e18da8 src/main/java/de/mviper/adventskalender/PlayerData.java gelöscht 2026-01-26 23:00:10 +00:00
0d30fc12e1 README.md aktualisiert 2026-01-26 22:35:36 +00:00
c446233dbd README.md aktualisiert 2026-01-26 22:35:11 +00:00
9aa5d326ca Dateien nach "img" hochladen 2026-01-26 22:34:45 +00:00
67db6bae72 img/01.PNG gelöscht 2026-01-26 22:34:32 +00:00
e3540b34f1 README.md aktualisiert 2026-01-01 14:09:23 +00:00
b3d791ae4f LICENSE gelöscht 2026-01-01 14:08:33 +00:00
3747b6fff7 src/main/java/de/mviper/adventskalender/Adventskalender.java aktualisiert 2025-12-21 19:29:15 +00:00
664a18f83e src/main/java/de/mviper/adventskalender/AdventListener.java aktualisiert 2025-12-21 19:28:48 +00:00
cbf23cb493 src/main/java/de/mviper/adventskalender/AdventInventory.java aktualisiert 2025-12-21 19:28:18 +00:00
22 changed files with 1123 additions and 1006 deletions

232
LICENSE
View File

@@ -1,232 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
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.
Advenskalender
Copyright (C) 2025 M_Viper
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 <https://www.gnu.org/licenses/>.
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:
Advenskalender Copyright (C) 2025 M_Viper
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 <https://www.gnu.org/licenses/>.
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 <https://www.gnu.org/philosophy/why-not-lgpl.html>.

188
README.md
View File

@@ -1,136 +1,124 @@
# 🎄 Minecraft Adventskalender Plugin
<div align="center">
Ein hochgradig konfigurierbares Adventskalender-Plugin für **Spigot/Paper-Server**, das dir die volle Kontrolle über Belohnungen, Sprache und Funktionen gibt.
Perfekt, um die Weihnachtszeit auf deinem Server zu versüßen!
# ❄️ Minecraft Adventskalender ❄️
*Bringe festliche Stimmung auf deinen Server mit einem hochgradig anpassbaren System*
![Version](https://img.shields.io/badge/Version-1.18.x--1.21.x-green.svg)
![Java](https://img.shields.io/badge/Java-17+-orange.svg)
![Update Checker](https://img.shields.io/badge/Update--Checker-Klickbar-blue.svg)
![Type](https://img.shields.io/badge/Type-Event-red.svg)
</div>
---
## 🖥️ Adventskalender GUI
![Adventskalender GUI](https://git.viper.ipv64.net/M_Viper/Advenskalender/raw/branch/main/img/01.PNG)
## Über Minecraft Adventskalender
Das **Minecraft Adventskalender Plugin** ist die ultimative Lösung für deinen Server im Dezember! Es bietet volle Kontrolle über Belohnungen, Sprache und Funktionen. Dank des neuen klickbaren Update-Checkers und dem erweiterten Admin-Test-System war die Verwaltung eines Events noch nie so einfach. Perfekt für Community-Events, um die Spielerbindung in der Weihnachtszeit zu stärken!
---
## ✨ Features
## ✨ Exklusive Features
- **Anpassbare Belohnungen**
Definiere in der `config.yml` für jeden Tag ein eigenes Item, inklusive:
- Menge
- Name
- Lore
- Verzauberungen
- **Globaler oder individueller Kalender**
Entscheide, ob:
- jeder Spieler seinen eigenen Fortschritt hat oder
- ein Türchen serverweit nur einmal geöffnet werden kann
- **Sound & Partikel**
Angenehme Sound- und Partikeleffekte beim Öffnen eines Türchens.
- **Mehrsprachig**
Unterstützt **Deutsch** und **Englisch**.
Weitere Sprachen können einfach hinzugefügt werden.
- **Admin-Befehle**
Konfigurationen neu laden oder Türchen gezielt für Spieler öffnen.
- **Permissions-System**
Feingranulare Kontrolle über Spieler- und Admin-Rechte.
- **PlaceholderAPI-Unterstützung**
Zeige Statistiken:
- auf Schildern
- in der Tab-Liste
- mit Hologramm-Plugins
- Scoreboard
und vieles mehr.
- **Datenpersistenz**
Spielerfortschritt bleibt auch nach Server-Neustarts erhalten.
- **Vollständig Anpassbare Belohnungen:** Definiere für jeden Tag individuelle Items mit Menge, Name, Lore und Verzauberungen.
- **Smart Update-Checker:** Erhalte beim Joinen als Admin eine dezente, **klickbare Benachrichtigung**, falls eine neue Version verfügbar ist (erscheint verzögert nach 2 Sek.).
- **Simulations Modus (Admin-Test):** Teste alle Türchen vorab durch Datums-Simulation, ohne deine Systemzeit zu ändern. Inklusive einfachem Reset auf das Echtzeit-Datum.
- **Präzises Reset-System:** Setze einzelne Tage oder komplette Fortschritte zurück wahlweise für einzelne Spieler oder global für den ganzen Server.
- **Immersive Effekte:** Festliche Sound- und Partikeleffekte beim Öffnen eines Türchens.
- **Optimierte Tab-Completion:** Intelligente Befehlsvorschläge mit korrekter numerischer Sortierung (1, 2, 3... statt 1, 10, 11...).
---
## 📸 Screenshots
## 🎄 Adventskalender GUI
<div align="center">
<img src="https://git.viper.ipv64.net/M_Viper/Advenskalender/raw/branch/main/img/03.png" width="400" alt="Kalender GUI 1">
<img src="https://git.viper.ipv64.net/M_Viper/Advenskalender/raw/branch/main/img/04.png" width="400" alt="Kalender GUI 2">
*Die intuitive Kalender-Oberfläche mit allen 24 Türchen*
</div>
---
## ⚙️ Befehle & Permissions
### ▶ Spieler-Befehle
**`/adventskalender`** (Aliase: `/ak`, `/advent`, `/kalender`)
- **Beschreibung:** Öffnet die Kalender-Oberfläche.
- **Berechtigung:** `adventskalender.use`
### ▶ Admin-Befehle
**`/ak admin test <1-24 | reset>`**
- **Beschreibung:** Simuliert einen bestimmten Tag für Belohnungstests. Nutze `reset`, um zum echten Datum zurückzukehren.
- **Berechtigung:** `adventskalender.admin`
**`/ak admin resetday <global | Spieler> <1-24>`**
- **Beschreibung:** Setzt den Status eines spezifischen Tages für einen Spieler oder den gesamten Server zurück.
- **Berechtigung:** `adventskalender.admin`
**`/ak admin reset <global | Spieler>`**
- **Beschreibung:** Löscht den kompletten Fortschritt (alle Tage) für einen Spieler oder global.
- **Berechtigung:** `adventskalender.admin`
**`/ak admin reload`**
- **Beschreibung:** Lädt Config, Sprachdateien und Datenbank-Verbindung im laufenden Betrieb neu.
- **Berechtigung:** `adventskalender.admin`
---
## 📊 PlaceholderAPI (PAPI)
- **`%ak_c%`** - Anzahl bereits geöffneter Türchen.
- **`%ak_n%`** - Nummer des nächsten verfügbaren Türchens.
- **`%ak_d%`** - Verbleibende Tage bis zum 25. Dezember.
### Placeholder auf einem Schild
Ein Schild, das die Placeholder des Plugins anzeigt.
<div align="center">
<img src="https://git.viper.ipv64.net/M_Viper/Advenskalender/raw/branch/main/img/02.png" width="450" alt="Adventskalender Placeholder">
<img src="https://git.viper.ipv64.net/M_Viper/Advenskalender/raw/branch/main/img/02.png" alt="Placeholder Beispiel">
*Ein Schild, das die Placeholder des Plugins anzeigt.*
</div>
---
## 🚀 Installation
## 💬 Support & Community
1. Lade die neueste Version des Plugins als **`.jar`-Datei** herunter.
2. Platziere die Datei im Ordner:
Du hast Fragen oder Feedback? Tritt unserem Discord bei!
/plugins
<div align="center">
3. Stelle sicher, dass **PlaceholderAPI** installiert ist (Pflichtabhängigkeit).
4. Starte oder starte den Server neu.
5. Passe die Konfigurationsdateien an: /plugins/Adventskalender/
[![Discord Support](https://img.shields.io/badge/Discord-Support-7289DA?style=for-the-badge&logo=discord)](https://discord.com/invite/FdRs4BRd8D)
*Klicke auf den Button für direkten Support durch die Community!*
</div>
---
## ⚙️ Konfiguration
## 🔧 Technische Details
Das Plugin verwendet drei Hauptdateien:
- **`config.yml`**
- Sprache
- Kalender-Typ (global / individuell)
- Belohnungen für alle 24 Tage
- **`messages_de.yml` / `messages_en.yml`**
- GUI-Titel
- Chat-Nachrichten
- Systemmeldungen
Diese Dateien können frei angepasst oder übersetzt werden.
- **Kompatibilität:** Paper, Spigot, Purpur (1.18.x - 1.21.x)
- **Smart Caching:** Minimale Serverlast durch asynchrone Datenbankaufrufe.
- **Join-Delay:** Update-Meldungen erscheinen erst nach 2 Sekunden, um den Chat-Spam beim Joinen zu umgehen.
---
## 📋 Befehle & Berechtigungen
<div align="center">
### Befehle
*Viper Plugins © 2026 - Effizienz und Magie für deinen Server*
| Befehl | Alias | Beschreibung | Berechtigung |
|------|------|-------------|--------------|
| `/adventskalender` | `/advent`, `/kalender`, `/ak` | Öffnet den Adventskalender | `adventskalender.use` |
| `/adventskalender admin reload` | `/ak admin reload` | Lädt Konfigurations- & Sprachdateien neu | `adventskalender.admin` |
| `/adventskalender admin open <spieler> <tag>` | `/ak admin open ...` | Öffnet ein Türchen für einen Spieler | `adventskalender.admin` |
### Berechtigungen
| Berechtigung | Standard | Beschreibung |
|-------------|----------|--------------|
| `adventskalender.use` | `true` | Erlaubt das Öffnen des Kalenders |
| `adventskalender.admin` | `op` | Erlaubt alle Admin-Befehle |
</div>
---
## 🔗 Placeholders
**Copyright © 2026 - M_Viper - Alle Rechte vorbehalten**
Alle Placeholder sind **PlaceholderAPI-kompatibel** und kurz gehalten.
| Placeholder | Beschreibung |
|------------|--------------|
| `%ak_c%` | Anzahl geöffneter Türchen |
| `%ak_n%` | Nächstes verfügbares Türchen |
| `%ak_d%` | Verbleibende Tage bis 25. Dezember |
### Beispiel für ein Schild
Dein Fortschritt:
%ak_c%/24 Türchen
---
## 📜 Lizenz
Dieses Projekt steht unter der **GNU General Public License v3.0 (GPL-3.0)**.
Die unbefugte Vervielfältigung, Verbreitung oder Weitergabe dieses Plugins ist strafbar und wird rechtlich verfolgt.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

BIN
img/03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
img/04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -6,7 +6,7 @@
<groupId>de.mviper</groupId>
<artifactId>adventskalender</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>
<properties>

View File

@@ -1,56 +0,0 @@
package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.Material;
public class AdminCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length == 1 && args[0].equalsIgnoreCase("reload")) {
Adventskalender.getInstance().reloadConfig();
LanguageManager.setup();
sender.sendMessage(LanguageManager.getString("messages.admin.reload_success"));
return true;
}
if (args.length == 3 && args[0].equalsIgnoreCase("open")) {
Player target = Bukkit.getPlayer(args[1]);
if (target == null) {
sender.sendMessage(LanguageManager.getString("messages.admin.player_not_found").replace("%player%", args[1]));
return true;
}
try {
int day = Integer.parseInt(args[2]);
if (day < 1 || day > 24) {
sender.sendMessage(LanguageManager.getString("messages.admin.invalid_day"));
return true;
}
if (target.getInventory().firstEmpty() == -1) {
target.getWorld().dropItemNaturally(target.getLocation(), AdventInventory.getRewardItem(day));
} else {
target.getInventory().addItem(AdventInventory.getRewardItem(day));
}
CalendarData.setClaimed(target, day);
sender.sendMessage(LanguageManager.getString("messages.admin.open_success").replace("%player%", target.getName()).replace("%day%", String.valueOf(day)));
target.sendMessage(LanguageManager.getString("messages.reward_received").replace("%day%", String.valueOf(day)));
} catch (NumberFormatException e) {
sender.sendMessage(LanguageManager.getString("messages.admin.invalid_day"));
}
return true;
}
sender.sendMessage("§cUsage: /adventskalender admin reload");
sender.sendMessage("§cUsage: /adventskalender admin open <player> <day>");
return true;
}
}

View File

@@ -2,61 +2,68 @@ package de.mviper.adventskalender;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.time.LocalDate;
import java.time.Month;
public class AdventCalendarExpansion extends PlaceholderExpansion {
@Override
public String getIdentifier() {
// Der Identifier ist jetzt nur noch "ak"
public @NotNull String getIdentifier() {
return "ak";
}
@Override
public String getAuthor() {
return "mviper";
public @NotNull String getAuthor() {
return "M_Viper";
}
@Override
public String getVersion() {
return "1.1.0";
public @NotNull String getVersion() {
return "2.0.0";
}
@Override
public boolean canRegister() {
return true;
public boolean persist() {
return true; // Expansion bleibt nach PAPI-Reload registriert
}
@Override
public String onPlaceholderRequest(Player player, String identifier) {
if (player == null) {
return "";
if (player == null) return "";
// Aktuellen Tag ermitteln (Berücksichtigt den test_day aus der Config)
int testDay = Adventskalender.getInstance().getConfig().getInt("general.test_day", 0);
LocalDate date = LocalDate.now();
int currentDay = (testDay > 0) ? testDay : (date.getMonth() == Month.DECEMBER ? date.getDayOfMonth() : 0);
switch (identifier.toLowerCase()) {
// %ak_claimed% - Anzahl der bereits geöffneten Türchen
case "claimed":
return String.valueOf(DataHandler.getClaimedDays(player).size());
// %ak_day% - Der aktuelle Tag des Adventskalenders (1-24)
case "day":
return String.valueOf(currentDay);
// %ak_has_claimed_today% - Gibt "Ja" oder "Nein" zurück, ob heute schon geöffnet wurde
case "has_claimed_today":
if (currentDay == 0) return "Keine Adventszeit";
return DataHandler.hasClaimed(player, currentDay) ? "Ja" : "Nein";
// %ak_remaining% - Wie viele Türchen sind noch offen (für diesen Spieler)?
case "remaining":
int claimedCount = DataHandler.getClaimedDays(player).size();
return String.valueOf(24 - claimedCount);
// %ak_is_global% - Zeigt an, ob der globale Modus aktiv ist
case "is_global":
boolean isGlobal = Adventskalender.getInstance().getConfig().getBoolean("calendar.use_global_calendar", false);
return isGlobal ? "Global" : "Spieler-basiert";
}
// Die Platzhalter sind jetzt viel kürzer
switch (identifier) {
case "c": // Geöffnet (claimed)
return String.valueOf(CalendarData.getClaimedCount(player));
case "n": // Nächstes (next)
for (int day = 1; day <= 24; day++) {
if (!CalendarData.hasClaimed(player, day)) {
return String.valueOf(day);
}
}
return "None";
case "d": // Tage (days)
LocalDate today = LocalDate.now();
LocalDate christmas = LocalDate.of(today.getYear(), Month.DECEMBER, 25);
if (today.isAfter(christmas)) {
christmas = christmas.plusYears(1);
}
return String.valueOf((int) java.time.temporal.ChronoUnit.DAYS.between(today, christmas));
default:
return null;
}
return null; // Placeholder unbekannt
}
}

View File

@@ -1,23 +1,18 @@
package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.*;
import java.util.stream.Collectors;
public class AdventCommand implements CommandExecutor {
public class AdventCommand implements CommandExecutor, TabCompleter {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
// --- Admin-Befehle (/ak admin ...) ---
if (args.length >= 1 && args[0].equalsIgnoreCase("admin")) {
// Prüfen, ob der Spieler die Admin-Berechtigung hat
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (args.length > 0 && args[0].equalsIgnoreCase("admin")) {
if (!sender.hasPermission("adventskalender.admin")) {
sender.sendMessage(LanguageManager.getString("messages.no_permission"));
sender.sendMessage(LanguageManager.getMessage("messages.no_permission"));
return true;
}
@@ -25,63 +20,141 @@ public class AdventCommand implements CommandExecutor {
if (args.length == 2 && args[1].equalsIgnoreCase("reload")) {
Adventskalender.getInstance().reloadConfig();
LanguageManager.setup();
sender.sendMessage(LanguageManager.getString("messages.admin.reload_success"));
DataHandler.setup();
sender.sendMessage(LanguageManager.getMessage("messages.admin.reload_success"));
return true;
}
// /ak admin open <player> <day>
if (args.length == 4 && args[1].equalsIgnoreCase("open")) {
Player target = Bukkit.getPlayer(args[2]);
if (target == null) {
sender.sendMessage(LanguageManager.getString("messages.admin.player_not_found").replace("%player%", args[2]));
// /ak admin test <Tag/reset>
if (args.length == 3 && args[1].equalsIgnoreCase("test")) {
if (args[2].equalsIgnoreCase("reset")) {
Adventskalender.getInstance().getConfig().set("general.test_day", 0);
Adventskalender.getInstance().saveConfig();
sender.sendMessage("§e[Admin] §7Test-Modus §cbeendet§7. Das echte Datum wird nun verwendet.");
return true;
}
try {
int day = Integer.parseInt(args[3]);
int day = Integer.parseInt(args[2]);
if (day < 1 || day > 24) {
sender.sendMessage(LanguageManager.getString("messages.admin.invalid_day"));
sender.sendMessage("§cBitte gib einen Tag zwischen 1 und 24 an (oder 'reset').");
return true;
}
ItemStack reward = AdventInventory.getRewardItem(day);
if (reward != null && reward.getType() != Material.AIR) {
if (target.getInventory().firstEmpty() == -1) {
target.getWorld().dropItemNaturally(target.getLocation(), reward);
} else {
target.getInventory().addItem(reward);
}
}
CalendarData.setClaimed(target, day);
sender.sendMessage(LanguageManager.getString("messages.admin.open_success").replace("%player%", target.getName()).replace("%day%", String.valueOf(day)));
target.sendMessage(LanguageManager.getString("messages.reward_received").replace("%day%", String.valueOf(day)));
Adventskalender.getInstance().getConfig().set("general.test_day", day);
Adventskalender.getInstance().saveConfig();
sender.sendMessage("§e[Admin] §7Test-Tag auf §6" + day + " §7gesetzt.");
} catch (NumberFormatException e) {
sender.sendMessage(LanguageManager.getString("messages.admin.invalid_day"));
sender.sendMessage("§cBitte gib eine gültige Zahl (1-24) oder 'reset' an.");
}
return true;
}
// Falsche Nutzung der Admin-Befehle
sender.sendMessage("§cUsage: /ak admin reload");
sender.sendMessage("§cUsage: /ak admin open <player> <day>");
// /ak admin resetday <global/Spieler> <Tag>
if (args.length == 4 && args[1].equalsIgnoreCase("resetday")) {
String target = args[2];
try {
int day = Integer.parseInt(args[3]);
if (day < 1 || day > 24) throw new NumberFormatException();
if (target.equalsIgnoreCase("global")) {
DataHandler.GlobalDataManager.resetGlobalDay(day);
sender.sendMessage("§a[Admin] §7Tag §6" + day + " §7global zurückgesetzt.");
} else {
DataHandler.resetPlayerDay(target, day);
sender.sendMessage("§a[Admin] §7Tag §6" + day + " §7für §e" + target + " §7zurückgesetzt.");
}
} catch (NumberFormatException e) {
sender.sendMessage("§cTag muss zwischen 1 und 24 liegen.");
}
return true;
}
// --- Hauptbefehl (/ak) ---
if (!(sender instanceof Player)) {
sender.sendMessage(LanguageManager.getString("messages.only_player"));
// /ak admin reset <global/Spieler>
if (args.length >= 3 && args[1].equalsIgnoreCase("reset")) {
String baseTitle = LanguageManager.getString("gui.title");
if (args[2].equalsIgnoreCase("global")) {
DataHandler.resetAll();
for (Player online : Bukkit.getOnlinePlayers()) {
if (online.getOpenInventory().getTitle().contains(baseTitle)) online.closeInventory();
}
sender.sendMessage("§a[Admin] §7Kompletter Reset durchgeführt.");
} else {
String targetName = args[2];
Player target = Bukkit.getPlayer(targetName);
if (target != null) {
DataHandler.resetPlayer(target);
if (target.getOpenInventory().getTitle().contains(baseTitle)) target.closeInventory();
sender.sendMessage("§a[Admin] §7Daten für §e" + target.getName() + " §7gelöscht.");
} else {
DataHandler.resetOfflinePlayer(targetName);
sender.sendMessage("§a[Admin] §7Offline-Daten für §e" + targetName + " §7gelöscht.");
}
}
return true;
}
Player player = (Player) sender;
sender.sendMessage("§8§m---§r §6Advent Admin §8§m---");
sender.sendMessage("§e/ak admin reload §7- Config neu laden");
sender.sendMessage("§e/ak admin test <1-24/reset> §7- Datum simulieren");
sender.sendMessage("§e/ak admin resetday <global/Spieler> <Tag> §7- Tag löschen");
sender.sendMessage("§e/ak admin reset <global/Spieler> §7- Alles löschen");
return true;
}
if (!(sender instanceof Player player)) return true;
if (!player.hasPermission("adventskalender.use")) {
player.sendMessage(LanguageManager.getString("messages.no_permission"));
player.sendMessage(LanguageManager.getMessage("messages.no_permission"));
return true;
}
AdventInventory.openCalendar(player);
AdventInventory.open(player);
return true;
}
@Override
public List<String> onTabComplete(CommandSender s, Command c, String a, String[] args) {
if (args.length == 1) return Collections.singletonList("admin");
if (args.length == 2 && args[0].equalsIgnoreCase("admin"))
return Arrays.asList("reload", "test", "reset", "resetday");
// Tab-Completion für das Ziel (global oder Spielername)
if (args.length == 3 && (args[1].equalsIgnoreCase("reset") || args[1].equalsIgnoreCase("resetday"))) {
List<String> options = new ArrayList<>();
options.add("global");
Bukkit.getOnlinePlayers().forEach(p -> options.add(p.getName()));
return options.stream()
.filter(opt -> opt.toLowerCase().startsWith(args[2].toLowerCase()))
.collect(Collectors.toList());
}
// Tab-Completion für die TAGE (Numerisch sortiert)
if ((args.length == 3 && args[1].equalsIgnoreCase("test")) || (args.length == 4 && args[1].equalsIgnoreCase("resetday"))) {
List<String> options = new ArrayList<>();
// "reset" Option nur für den test command hinzufügen
if (args[1].equalsIgnoreCase("test")) {
options.add("reset");
}
for (int i = 1; i <= 24; i++) {
options.add(String.valueOf(i));
}
String currentInput = (args.length == 3) ? args[2] : args[3];
return options.stream()
.filter(opt -> opt.toLowerCase().startsWith(currentInput.toLowerCase()))
.sorted((s1, s2) -> {
// "reset" immer nach oben sortieren
if (s1.equalsIgnoreCase("reset")) return -1;
if (s2.equalsIgnoreCase("reset")) return 1;
// Restliche Zahlen numerisch vergleichen
return Integer.compare(Integer.parseInt(s1), Integer.parseInt(s2));
})
.collect(Collectors.toList());
}
return Collections.emptyList();
}
}

View File

@@ -3,118 +3,152 @@ package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.profile.PlayerProfile;
import org.bukkit.profile.PlayerTextures;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.LocalDate;
import java.time.Month;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
public class AdventInventory {
public static void openCalendar(org.bukkit.entity.Player player) {
// KORREKTUR: Wir lesen den Titel direkt aus der Sprachdatei.
// Der Pfad "gui.title" entspricht der Struktur in deiner messages_de.yml
String title = LanguageManager.getString("gui.title");
Inventory inv = Bukkit.createInventory(null, 54, title);
// Textur für das geöffnete Geschenk (Wreath)
private static final String OPEN_WREATH_URL = "http://textures.minecraft.net/texture/5e39248b341c87ce3e4294ac214c6f74468889cb1273ae7412906fd28db097e8";
for (int i = 0; i < 24; i++) {
int day = i + 1;
ItemStack item = getCalendarItem(player, day);
inv.setItem(i, item);
// Texturen für die geschlossenen Tage (1-24)
private static final Map<Integer, String> CLOSED_TEXTURES = new HashMap<>();
private static final Map<String, ItemStack> HEAD_CACHE = new HashMap<>();
static {
// Hier sind die URLs für die "Christmas Calendar #01-24 (red)" Reihe
CLOSED_TEXTURES.put(1, "http://textures.minecraft.net/texture/105b356be68ac56cfe0611b95027adf1ee67050e4cd66a0a99678fc2e25b6b0f");
CLOSED_TEXTURES.put(2, "http://textures.minecraft.net/texture/40ec45e8ffb9cb714d1412bb9ee54fd1e7a3140c02e35ae0d3f308f1666ba126");
CLOSED_TEXTURES.put(3, "http://textures.minecraft.net/texture/2466629a31aae22dba15a7b710a4517308656c19ba39a89ac2de2915a46e2823");
CLOSED_TEXTURES.put(4, "http://textures.minecraft.net/texture/97a1956ed6f32e18b139f2d709355ac6945d0ab8fecd04d4c159d08006bfbe58");
CLOSED_TEXTURES.put(5, "http://textures.minecraft.net/texture/855fad012c8844fc313510436b4919e002d93d6a0761f7bdaf78069683eee5e6");
CLOSED_TEXTURES.put(6, "http://textures.minecraft.net/texture/c0400111ae026101077b59d8482c84a832c74f4f2105fc13b7c94f5b8000ea3");
CLOSED_TEXTURES.put(7, "http://textures.minecraft.net/texture/a34505ed2567ea2efbab49977f7da8f1178db9ae53a0e99737286dc56e63636a");
CLOSED_TEXTURES.put(8, "http://textures.minecraft.net/texture/a17ddf12485fb54cab9c9ffb55feea62a2d90b825772c6ea38561ce750cb6f83");
CLOSED_TEXTURES.put(9, "http://textures.minecraft.net/texture/f75022feb11b736e50bc7d19d26d4ee00cecd6734a2138d2579f799b119b6734");
CLOSED_TEXTURES.put(10, "http://textures.minecraft.net/texture/6b84208e4be2233fcd96e7f02d9613d5437f1d006236277c57d40652c5be2f23");
CLOSED_TEXTURES.put(11, "http://textures.minecraft.net/texture/19aa8a65ba29b4b7cbb9c66cf59fb537ba2c3013a958620b976b9f06248e8dda");
CLOSED_TEXTURES.put(12, "http://textures.minecraft.net/texture/7dc1330b302e800c31c8dfefbd1b996016c34649f3a396749d3e048637364aad");
CLOSED_TEXTURES.put(13, "http://textures.minecraft.net/texture/7e98a3884e0eac967c73a2bcbff7df62ab2fb327b4ceb9e636c74254866b5c7c");
CLOSED_TEXTURES.put(14, "http://textures.minecraft.net/texture/3866643decb2d148999f9768dae89fbdb196b30d55f8846b1fbbe736bb7e5042");
CLOSED_TEXTURES.put(15, "http://textures.minecraft.net/texture/744a95611950cc7f154c9f56ad472c1941376ec171efb8ba476e6cec4f866526");
CLOSED_TEXTURES.put(16, "http://textures.minecraft.net/texture/1546959556eff4b8827ca50d8df686e8f20d5c843da689dddc48bff0a217efbe");
CLOSED_TEXTURES.put(17, "http://textures.minecraft.net/texture/1f4fb00e824c97d9cfba4c44def27a79513978979515048f2e69eb5b7123c159");
CLOSED_TEXTURES.put(18, "http://textures.minecraft.net/texture/9216b42018004a86081b5c1ee87dc8f12770f1859266e2cd359b75b44b5e7680");
CLOSED_TEXTURES.put(19, "http://textures.minecraft.net/texture/93c7097291042c394267892c56feee9ba3936826ea5b2232f46cb5474f9cd937");
CLOSED_TEXTURES.put(20, "http://textures.minecraft.net/texture/4f85a13977d01865a9d95d3279528285872551c36fd5231c7e3ab9897a7560fd");
CLOSED_TEXTURES.put(21, "http://textures.minecraft.net/texture/cdb512403f3610966d10bd3ca9fc61fdc5021268382f69719ac5679f3efd4c14");
CLOSED_TEXTURES.put(22, "http://textures.minecraft.net/texture/cadaef824771250374fc3e82efe020ab765e665340cc2393f3b4ae8d6d18529c");
CLOSED_TEXTURES.put(23, "http://textures.minecraft.net/texture/266f896c37a9d7fb857ff8c9f6f5e3540d17e1b893419f523eb199b71e71dde3");
CLOSED_TEXTURES.put(24, "http://textures.minecraft.net/texture/f081f9274e4ef802453ac95381c00426e462440d3bb085fb3afefa6ded6a8d01");
// Hinweis: In der Praxis füllst du hier alle 1-24 mit den URLs von Minecraft-Heads.
}
ItemStack filler = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta fillerMeta = filler.getItemMeta();
fillerMeta.setDisplayName(" ");
filler.setItemMeta(fillerMeta);
for (int i = 24; i < 54; i++) {
inv.setItem(i, filler);
public static void initCache() {
// Cache den Wreath-Kopf
HEAD_CACHE.put("OPENED", createBaseSkull(OPEN_WREATH_URL));
// Cache alle nummerierten geschlossenen Köpfe
for (int i = 1; i <= 24; i++) {
if (CLOSED_TEXTURES.containsKey(i)) {
HEAD_CACHE.put("CLOSED_" + i, createBaseSkull(CLOSED_TEXTURES.get(i)));
}
}
}
public static void open(Player player) {
String title = " " + LanguageManager.getString("gui.title");
Inventory inv = Bukkit.createInventory(null, 54, title);
int testDay = Adventskalender.getInstance().getConfig().getInt("general.test_day", 0);
LocalDate date = LocalDate.now();
int currentDay = (testDay > 0) ? testDay : (date.getMonth() == Month.DECEMBER ? date.getDayOfMonth() : 0);
for (int i = 0; i < 54; i++) {
if (i < 9 || i >= 45 || i % 9 == 0 || (i + 1) % 9 == 0) {
Material m = (i % 2 == 0) ? Material.RED_STAINED_GLASS_PANE : Material.GREEN_STAINED_GLASS_PANE;
inv.setItem(i, createFiller(m));
} else {
inv.setItem(i, createFiller(Material.WHITE_STAINED_GLASS_PANE));
}
}
int[] slots = {10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 39, 40, 41};
for (int day = 1; day <= 24; day++) {
boolean claimed = DataHandler.hasClaimed(player, day);
boolean isAvailable = currentDay >= day;
inv.setItem(slots[day - 1], createGiftItem(day, claimed, isAvailable));
}
player.openInventory(inv);
}
public static ItemStack getCalendarItem(org.bukkit.entity.Player player, int day) {
LocalDate today = LocalDate.now();
String prefix = LanguageManager.getString("prefix");
private static ItemStack createGiftItem(int day, boolean claimed, boolean isAvailable) {
ItemStack item;
if (claimed) {
item = HEAD_CACHE.getOrDefault("OPENED", new ItemStack(Material.PLAYER_HEAD)).clone();
} else {
item = HEAD_CACHE.getOrDefault("CLOSED_" + day, new ItemStack(Material.PLAYER_HEAD)).clone();
}
if (today.getMonth() != Month.DECEMBER || today.getDayOfMonth() < day) {
ItemStack item = new ItemStack(Material.BARRIER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(prefix + "§cTag " + day);
List<String> lore = new ArrayList<>();
lore.add(prefix + "§7Noch nicht verfügbar.");
lore.add(prefix + "§7Komme am " + day + ". Dezember wieder.");
lore.add(" ");
if (claimed) {
meta.setDisplayName(LanguageManager.getString("rewards.day_" + day + ".name"));
meta.addEnchant(Enchantment.LUCK, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
lore.add("§8» §6Bereits abgeholt");
lore.add("§aDu hast dieses Geschenk bereits geöffnet! ✔");
} else {
if (!isAvailable) {
meta.setDisplayName("§c§lTag #" + day);
lore.add("§8» §7Noch verschlossen");
lore.add("§7Komme am " + day + ". Dezember wieder!");
} else {
meta.setDisplayName(LanguageManager.getString("rewards.day_" + day + ".name"));
lore.add("§8» §eKlicke zum Öffnen!");
lore.addAll(LanguageManager.getStringList("rewards.day_" + day + ".lore"));
}
}
meta.setLore(lore);
item.setItemMeta(meta);
return item;
}
if (CalendarData.hasClaimed(player, day)) {
ItemStack item = new ItemStack(Material.GREEN_STAINED_GLASS_PANE);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(prefix + "§aTag " + day + " - Geöffnet");
List<String> lore = new ArrayList<>();
lore.add(prefix + LanguageManager.getString("messages.day_already_claimed"));
meta.setLore(lore);
private static ItemStack createBaseSkull(String url) {
ItemStack item = new ItemStack(Material.PLAYER_HEAD);
SkullMeta meta = (SkullMeta) item.getItemMeta();
try {
UUID uuid = UUID.nameUUIDFromBytes(url.getBytes());
PlayerProfile profile = Bukkit.createPlayerProfile(uuid, "AdventHead");
profile.getTextures().setSkin(new URL(url));
meta.setOwnerProfile(profile);
item.setItemMeta(meta);
} catch (MalformedURLException e) { e.printStackTrace(); }
return item;
}
ItemStack item = new ItemStack(Material.CHEST);
private static ItemStack createFiller(Material material) {
ItemStack item = new ItemStack(material);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(prefix + "§eTag " + day + " - Noch zu holen!");
List<String> lore = new ArrayList<>();
lore.add(prefix + "§7Klicke, um dein Geschenk zu erhalten.");
meta.setLore(lore);
item.setItemMeta(meta);
return item;
}
public static ItemStack getRewardItem(int day) {
String path = "rewards." + day;
if (!Adventskalender.getInstance().getConfig().contains(path)) {
return new ItemStack(Material.AIR);
}
String materialName = Adventskalender.getInstance().getConfig().getString(path + ".material");
int amount = Adventskalender.getInstance().getConfig().getInt(path + ".amount");
String key = Adventskalender.getInstance().getConfig().getString(path + ".key");
Material material = Material.getMaterial(materialName);
if (material == null) {
Adventskalender.getInstance().getLogger().warning("Material '" + materialName + "' für Tag " + day + " nicht gefunden!");
return new ItemStack(Material.BARRIER);
}
ItemStack item = new ItemStack(material, amount);
ItemMeta meta = item.getItemMeta();
String namePath = key + ".name";
String lorePath = key + ".lore";
meta.setDisplayName(LanguageManager.getString(namePath));
meta.setLore(LanguageManager.getStringList(lorePath));
List<Map<?, ?>> enchantmentList = Adventskalender.getInstance().getConfig().getMapList(path + ".enchantments");
if (enchantmentList != null) {
for (Map<?, ?> enchantmentMap : enchantmentList) {
String enchantName = (String) enchantmentMap.get("type");
int level = (int) enchantmentMap.get("level");
Enchantment enchantment = Enchantment.getByName(enchantName);
if (enchantment != null) {
meta.addEnchant(enchantment, level, true);
}
}
}
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
item.setItemMeta(meta);
if (meta != null) { meta.setDisplayName(" "); item.setItemMeta(meta); }
return item;
}
}

View File

@@ -1,58 +1,135 @@
package de.mviper.adventskalender;
import org.bukkit.*;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.chat.hover.content.Text;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.time.LocalDate;
import java.time.Month;
import java.util.List;
import java.util.Map;
public class AdventListener implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
// Nachricht an Admins senden, wenn ein Update da ist
if (player.hasPermission("adventskalender.admin")) {
// Delay von 2 Sekunden (40 Ticks), damit die Nachricht nicht im Join-Spam untergeht
Bukkit.getScheduler().runTaskLater(Adventskalender.getInstance(), () -> {
if (Adventskalender.getInstance().isUpdateAvailable()) {
String latest = Adventskalender.getInstance().getLatestVersion();
String current = Adventskalender.getInstance().getDescription().getVersion();
player.sendMessage("§7 ");
player.sendMessage("§8§m+-------------------------------------------+");
player.sendMessage("§6§l ADVENTSKALENDER UPDATE");
player.sendMessage("§7 ");
player.sendMessage("§7 Eine neue Version ist verfügbar: §a§l" + latest);
player.sendMessage("§7 Installierte Version: §c" + current);
player.sendMessage("§7 ");
// Erstellung der klickbaren Nachricht
TextComponent message = new TextComponent("§e §nKLICKE HIER ZUM DOWNLOAD");
message.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.spigotmc.org/resources/130974/"));
message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("§7Öffnet die Spigot-Seite")));
player.spigot().sendMessage(message);
player.sendMessage("§7 ");
player.sendMessage("§8§m+-------------------------------------------+");
player.sendMessage("§7 ");
}
}, 40L);
}
}
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
// KORREKTUR: Wir verwenden den gleichen Schlüssel wie in der AdventInventory.java,
// um den Titel zu laden. So sind beide Titel identisch.
String translatedTitle = LanguageManager.getString("gui.title");
String baseTitle = LanguageManager.getString("gui.title");
if (!event.getView().getTitle().contains(baseTitle)) return;
if (event.getView().getTitle().equals(translatedTitle)) {
event.setCancelled(true); // Diese Zeile wird jetzt wieder ausgeführt!
event.setCancelled(true);
if (!(event.getWhoClicked() instanceof Player)) return;
Player player = (Player) event.getWhoClicked();
if (!(event.getWhoClicked() instanceof Player player)) return;
int slot = event.getSlot();
if (slot < 0 || slot > 23) return;
ItemStack clicked = event.getCurrentItem();
if (clicked == null || clicked.getType() != Material.PLAYER_HEAD) return;
if (!clicked.hasItemMeta() || !clicked.getItemMeta().hasDisplayName()) return;
int day = slot + 1;
LocalDate today = LocalDate.now();
String displayName = ChatColor.stripColor(clicked.getItemMeta().getDisplayName());
int day;
try {
day = Integer.parseInt(displayName.replaceAll("[^0-9]", ""));
} catch (NumberFormatException e) {
return;
}
int testDay = Adventskalender.getInstance().getConfig().getInt("general.test_day", 0);
LocalDate date = LocalDate.now();
int currentDay = (testDay > 0) ? testDay : (date.getMonth() == Month.DECEMBER ? date.getDayOfMonth() : 0);
if (currentDay >= day) {
if (DataHandler.hasClaimed(player, day)) {
player.sendMessage(LanguageManager.getMessage("messages.day_already_claimed"));
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_BASS, 1f, 1f);
return;
}
giveReward(player, day);
DataHandler.setClaimed(player, day);
player.playSound(player.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1.5f);
AdventInventory.open(player);
} else {
player.sendMessage(LanguageManager.getMessage("messages.day_not_available"));
player.playSound(player.getLocation(), Sound.BLOCK_CHEST_LOCKED, 1f, 1f);
}
}
private void giveReward(Player player, int day) {
String path = "rewards." + day;
String matName = Adventskalender.getInstance().getConfig().getString(path + ".material", "COOKIE");
int amount = Adventskalender.getInstance().getConfig().getInt(path + ".amount", 1);
ItemStack reward = new ItemStack(Material.valueOf(matName.toUpperCase()), amount);
ItemMeta meta = reward.getItemMeta();
if (meta != null) {
List<Map<?, ?>> enchants = Adventskalender.getInstance().getConfig().getMapList(path + ".enchantments");
for (Map<?, ?> entry : enchants) {
String type = (String) entry.get("type");
Object levelObj = entry.get("level");
int level = (levelObj instanceof Integer) ? (int) levelObj : 1;
Enchantment enc = Enchantment.getByName(type.toUpperCase());
if (enc != null) {
meta.addEnchant(enc, level, true);
}
}
reward.setItemMeta(meta);
}
if (today.getMonth() == Month.DECEMBER && today.getDayOfMonth() >= day && !CalendarData.hasClaimed(player, day)) {
ItemStack reward = AdventInventory.getRewardItem(day);
if (reward != null && reward.getType() != Material.AIR) {
if (player.getInventory().firstEmpty() == -1) {
player.getWorld().dropItemNaturally(player.getLocation(), reward);
player.sendMessage(LanguageManager.getString("messages.inventory_full"));
player.sendMessage(LanguageManager.getMessage("messages.inventory_full"));
} else {
player.getInventory().addItem(reward);
}
player.sendMessage(LanguageManager.getString("messages.reward_received").replace("%day%", String.valueOf(day)));
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1.0f, 1.0f);
player.spawnParticle(Particle.VILLAGER_HAPPY, player.getLocation().add(0, 1, 0), 20, 0.5, 0.5, 0.5, 0);
}
CalendarData.setClaimed(player, day);
ItemStack newItem = AdventInventory.getCalendarItem(player, day);
event.getInventory().setItem(slot, newItem);
} else {
player.sendMessage(LanguageManager.getString("messages.day_not_available"));
player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1.0f, 1.0f);
}
}
player.sendMessage(LanguageManager.getMessage("messages.reward_received").replace("%day%", String.valueOf(day)));
}
}

View File

@@ -1,40 +1,62 @@
package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
public final class Adventskalender extends JavaPlugin {
private static Adventskalender instance;
private NamespacedKey dataKey;
// Update-Status Variablen
private boolean updateAvailable = false;
private String latestVersion = "";
@Override
public void onEnable() {
instance = this;
saveDefaultConfig();
this.dataKey = new NamespacedKey(this, "claimed_days_v2");
saveDefaultConfig();
LanguageManager.setup();
CalendarData.setup();
// Initialisierung der Daten (MySQL wird hier bevorzugt behandelt)
DataHandler.setup();
// Textur-Puffer füllen, um Steve-Köpfe zu vermeiden
AdventInventory.initCache();
getCommand("adventskalender").setExecutor(new AdventCommand());
getServer().getPluginManager().registerEvents(new AdventListener(), this);
// Prüfen, ob PlaceholderAPI vorhanden ist und unsere neue Erweiterung registrieren
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
// HIER IST DIE ÄNDERUNG: Wir erstellen eine Instanz der neuen Klasse
new AdventCalendarExpansion().register();
getLogger().info("PlaceholderAPI expansion registered.");
// Update Checker Integration (ID: 130974)
new UpdateChecker(this, 130974).getVersion(version -> {
if (!this.getDescription().getVersion().equals(version)) {
this.updateAvailable = true;
this.latestVersion = version;
getLogger().warning("Eine neue Version (" + version + ") ist verfügbar!");
getLogger().warning("Download: https://www.spigotmc.org/resources/130974/");
} else {
getLogger().warning("PlaceholderAPI not found. Placeholders will not work.");
getLogger().info("Das Plugin ist auf dem neuesten Stand.");
}
});
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new AdventCalendarExpansion().register();
}
getLogger().info("Adventskalender-Plugin wurde erfolgreich aktiviert!");
getLogger().info("Adventskalender erfolgreich gestartet!");
}
@Override
public void onDisable() {
getLogger().info("Adventskalender-Plugin wurde deaktiviert.");
MySQLManager.close();
}
public static Adventskalender getInstance() {
return instance;
}
public static Adventskalender getInstance() { return instance; }
public NamespacedKey getDataKey() { return dataKey; }
// Getter für den Update-Status
public boolean isUpdateAvailable() { return updateAvailable; }
public String getLatestVersion() { return latestVersion; }
}

View File

@@ -1,68 +0,0 @@
package de.mviper.adventskalender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class CalendarData {
private static File file;
private static FileConfiguration customFile;
public static void setup() {
file = new File(Adventskalender.getInstance().getDataFolder(), "calendar.yml");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
Adventskalender.getInstance().getLogger().severe("Konnte calendar.yml nicht erstellen: " + e.getMessage());
}
}
customFile = YamlConfiguration.loadConfiguration(file);
}
public static void save() {
try {
customFile.save(file);
} catch (IOException e) {
Adventskalender.getInstance().getLogger().severe("Konnte calendar.yml nicht speichern: " + e.getMessage());
}
}
public static boolean hasClaimed(Player player, int day) {
boolean isGlobal = Adventskalender.getInstance().getConfig().getBoolean("calendar.use_global_calendar");
if (isGlobal) {
List<Integer> claimedDays = customFile.getIntegerList("global_claimed_days");
return claimedDays.contains(day);
} else {
List<Integer> claimedDays = customFile.getIntegerList(player.getUniqueId().toString());
return claimedDays.contains(day);
}
}
public static void setClaimed(Player player, int day) {
boolean isGlobal = Adventskalender.getInstance().getConfig().getBoolean("calendar.use_global_calendar");
if (isGlobal) {
List<Integer> claimedDays = customFile.getIntegerList("global_claimed_days");
claimedDays.add(day);
customFile.set("global_claimed_days", claimedDays);
} else {
List<Integer> claimedDays = customFile.getIntegerList(player.getUniqueId().toString());
claimedDays.add(day);
customFile.set(player.getUniqueId().toString(), claimedDays);
}
save();
}
public static int getClaimedCount(Player player) {
if (Adventskalender.getInstance().getConfig().getBoolean("calendar.use_global_calendar")) {
return customFile.getIntegerList("global_claimed_days").size();
} else {
return customFile.getIntegerList(player.getUniqueId().toString()).size();
}
}
}

View File

@@ -0,0 +1,241 @@
package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.HashSet;
public class DataHandler {
private static File file;
private static FileConfiguration dataConfig;
private static boolean mysqlActive = false;
public static void setup() {
if (Adventskalender.getInstance().getConfig().getBoolean("mysql.enable")) {
MySQLManager.connect();
if (MySQLManager.isConnected()) {
mysqlActive = true;
Adventskalender.getInstance().getLogger().info("MySQL-Verbindung steht. data.yml wird deaktiviert.");
return;
} else {
Adventskalender.getInstance().getLogger().warning("MySQL aktiviert, aber Verbindung fehlgeschlagen! Nutze data.yml als Backup.");
}
}
if (!Adventskalender.getInstance().getDataFolder().exists()) {
Adventskalender.getInstance().getDataFolder().mkdirs();
}
file = new File(Adventskalender.getInstance().getDataFolder(), "data.yml");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
dataConfig = YamlConfiguration.loadConfiguration(file);
}
public static boolean hasClaimed(Player player, int day) {
if (isGlobal()) {
return GlobalDataManager.isDayClaimedGlobally(day);
}
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("SELECT 1 FROM advent_players WHERE uuid = ? AND day = ?")) {
ps.setString(1, player.getUniqueId().toString());
ps.setInt(2, day);
return ps.executeQuery().next();
} catch (SQLException e) {
e.printStackTrace();
}
}
if (dataConfig != null) {
List<Integer> claimed = dataConfig.getIntegerList("players." + player.getUniqueId() + ".claimed");
return claimed.contains(day);
}
return false;
}
public static void setClaimed(Player player, int day) {
if (isGlobal()) {
GlobalDataManager.setDayClaimedGlobally(day, player.getName());
return;
}
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("INSERT IGNORE INTO advent_players (uuid, day) VALUES (?, ?)")) {
ps.setString(1, player.getUniqueId().toString());
ps.setInt(2, day);
ps.executeUpdate();
return;
} catch (SQLException e) {
e.printStackTrace();
}
}
if (dataConfig != null) {
List<Integer> claimed = dataConfig.getIntegerList("players." + player.getUniqueId() + ".claimed");
if (!claimed.contains(day)) {
claimed.add(day);
dataConfig.set("players." + player.getUniqueId() + ".claimed", claimed);
dataConfig.set("players." + player.getUniqueId() + ".name", player.getName());
save();
}
}
}
public static void resetPlayerDay(String playerName, int day) {
if (mysqlActive && MySQLManager.isConnected()) {
@SuppressWarnings("deprecation")
OfflinePlayer target = Bukkit.getOfflinePlayer(playerName);
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("DELETE FROM advent_players WHERE uuid = ? AND day = ?")) {
ps.setString(1, target.getUniqueId().toString());
ps.setInt(2, day);
ps.executeUpdate();
} catch (SQLException e) { e.printStackTrace(); }
}
if (dataConfig != null && dataConfig.getConfigurationSection("players") != null) {
for (String uuid : dataConfig.getConfigurationSection("players").getKeys(false)) {
if (playerName.equalsIgnoreCase(dataConfig.getString("players." + uuid + ".name"))) {
List<Integer> claimed = dataConfig.getIntegerList("players." + uuid + ".claimed");
claimed.remove(Integer.valueOf(day));
dataConfig.set("players." + uuid + ".claimed", claimed);
save();
break;
}
}
}
}
public static Set<Integer> getClaimedDays(Player player) {
if (mysqlActive && MySQLManager.isConnected()) {
Set<Integer> days = new HashSet<>();
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("SELECT day FROM advent_players WHERE uuid = ?")) {
ps.setString(1, player.getUniqueId().toString());
ResultSet rs = ps.executeQuery();
while (rs.next()) days.add(rs.getInt("day"));
return days;
} catch (SQLException e) {
e.printStackTrace();
}
}
if (dataConfig != null) {
return new HashSet<>(dataConfig.getIntegerList("players." + player.getUniqueId() + ".claimed"));
}
return new HashSet<>();
}
public static void resetPlayer(Player player) {
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("DELETE FROM advent_players WHERE uuid = ?")) {
ps.setString(1, player.getUniqueId().toString());
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
}
if (dataConfig != null) {
dataConfig.set("players." + player.getUniqueId(), null);
save();
}
}
public static void resetOfflinePlayer(String name) {
if (dataConfig == null || dataConfig.getConfigurationSection("players") == null) return;
for (String uuid : dataConfig.getConfigurationSection("players").getKeys(false)) {
String savedName = dataConfig.getString("players." + uuid + ".name");
if (name.equalsIgnoreCase(savedName)) {
dataConfig.set("players." + uuid, null);
save();
break;
}
}
}
public static void resetAll() {
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps1 = MySQLManager.getConnection().prepareStatement("DELETE FROM advent_players");
PreparedStatement ps2 = MySQLManager.getConnection().prepareStatement("DELETE FROM advent_global")) {
ps1.executeUpdate();
ps2.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
}
if (dataConfig != null) {
dataConfig.set("players", null);
dataConfig.set("global", null);
save();
}
}
private static boolean isGlobal() {
return Adventskalender.getInstance().getConfig().getBoolean("calendar.use_global_calendar", false);
}
private static void save() {
if (dataConfig == null || file == null) return;
try {
dataConfig.save(file);
} catch (IOException e) {
e.printStackTrace();
}
}
public static class GlobalDataManager {
public static boolean isDayClaimedGlobally(int day) {
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("SELECT 1 FROM advent_global WHERE day = ?")) {
ps.setInt(1, day);
return ps.executeQuery().next();
} catch (SQLException e) {
e.printStackTrace();
}
}
return dataConfig != null && dataConfig.contains("global.day_" + day);
}
public static void setDayClaimedGlobally(int day, String playerName) {
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("REPLACE INTO advent_global (day, player_name) VALUES (?, ?)")) {
ps.setInt(1, day);
ps.setString(2, playerName);
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
} else if (dataConfig != null) {
dataConfig.set("global.day_" + day, playerName);
save();
}
}
public static void resetGlobalDay(int day) {
if (mysqlActive && MySQLManager.isConnected()) {
try (PreparedStatement ps = MySQLManager.getConnection().prepareStatement("DELETE FROM advent_global WHERE day = ?")) {
ps.setInt(1, day);
ps.executeUpdate();
} catch (SQLException e) { e.printStackTrace(); }
} else if (dataConfig != null) {
dataConfig.set("global.day_" + day, null);
DataHandler.save();
}
}
}
}

View File

@@ -1,41 +1,35 @@
package de.mviper.adventskalender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.util.List;
import java.util.stream.Collectors;
public class LanguageManager {
private static FileConfiguration languageConfig;
private static YamlConfiguration cfg;
private static String prefix;
public static void setup() {
String lang = Adventskalender.getInstance().getConfig().getString("general.language", "de");
File languageFile = new File(Adventskalender.getInstance().getDataFolder(), "messages_" + lang + ".yml");
if (!languageFile.exists()) {
Adventskalender.getInstance().saveResource("messages_" + lang + ".yml", false);
}
languageConfig = YamlConfiguration.loadConfiguration(languageFile);
File f = new File(Adventskalender.getInstance().getDataFolder(), "messages_" + lang + ".yml");
if (!f.exists()) Adventskalender.getInstance().saveResource("messages_" + lang + ".yml", false);
cfg = YamlConfiguration.loadConfiguration(f);
prefix = ChatColor.translateAlternateColorCodes('&', cfg.getString("prefix", "&6[Advent] "));
}
public static String getString(String path) {
if (languageConfig.contains(path)) {
return format(languageConfig.getString(path));
String s = cfg.getString(path);
return s == null ? "§cKey error: " + path : ChatColor.translateAlternateColorCodes('&', s);
}
return "§cLanguage key not found: " + path;
public static String getMessage(String path) {
return prefix + getString(path);
}
public static List<String> getStringList(String path) {
if (languageConfig.contains(path)) {
return languageConfig.getStringList(path).stream().map(LanguageManager::format).toList();
}
return List.of("§cLanguage key list not found: " + path);
}
private static String format(String message) {
return org.bukkit.ChatColor.translateAlternateColorCodes('&', message);
return cfg.getStringList(path).stream()
.map(s -> ChatColor.translateAlternateColorCodes('&', s))
.collect(Collectors.toList());
}
}

View File

@@ -0,0 +1,66 @@
package de.mviper.adventskalender;
import org.bukkit.configuration.file.FileConfiguration;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class MySQLManager {
private static Connection connection;
public static void connect() {
FileConfiguration config = Adventskalender.getInstance().getConfig();
String host = config.getString("mysql.host");
int port = config.getInt("mysql.port");
String database = config.getString("mysql.database");
String user = config.getString("mysql.user");
String password = config.getString("mysql.password");
try {
if (connection != null && !connection.isClosed()) return;
synchronized (MySQLManager.class) {
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database + "?autoReconnect=true&useSSL=false", user, password);
}
createTables();
Adventskalender.getInstance().getLogger().info("MySQL-Verbindung erfolgreich hergestellt!");
} catch (Exception e) {
Adventskalender.getInstance().getLogger().severe("MySQL-Verbindung fehlgeschlagen: " + e.getMessage());
}
}
private static void createTables() {
try (Statement s = connection.createStatement()) {
// Tabelle für Einzelspieler-Daten
s.executeUpdate("CREATE TABLE IF NOT EXISTS advent_players (uuid VARCHAR(36), day INT, PRIMARY KEY(uuid, day))");
// Tabelle für globalen Modus
s.executeUpdate("CREATE TABLE IF NOT EXISTS advent_global (day INT PRIMARY KEY, player_name VARCHAR(16))");
} catch (SQLException e) {
e.printStackTrace();
}
}
public static boolean isConnected() {
try {
return connection != null && !connection.isClosed();
} catch (SQLException e) {
return false;
}
}
public static void close() {
try {
if (isConnected()) connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
public static Connection getConnection() {
return connection;
}
}

View File

@@ -1,75 +0,0 @@
package de.mviper.adventskalender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* Verwaltet die Spielerdaten in einer separaten YAML-Datei.
* Speichert, welcher Spieler an welchem Tag sein Geschenk bereits geholt hat.
*/
public class PlayerData {
private static File file;
private static FileConfiguration customFile;
/**
* Erstellt die playerdata.yml-Datei, falls sie nicht existiert.
*/
public static void setup() {
file = new File(Adventskalender.getInstance().getDataFolder(), "playerdata.yml");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
Adventskalender.getInstance().getLogger().severe("Konnte playerdata.yml nicht erstellen: " + e.getMessage());
}
}
customFile = YamlConfiguration.loadConfiguration(file);
}
public static FileConfiguration get() {
return customFile;
}
public static void save() {
try {
customFile.save(file);
} catch (IOException e) {
Adventskalender.getInstance().getLogger().severe("Konnte playerdata.yml nicht speichern: " + e.getMessage());
}
}
public static void reload() {
customFile = YamlConfiguration.loadConfiguration(file);
}
/**
* Prüft, ob ein Spieler ein Geschenk für einen bestimmten Tag bereits geholt hat.
* @param uuid Die UUID des Spielers
* @param day Der Tag (1-24)
* @return true, wenn bereits geholt, sonst false
*/
public static boolean hasClaimed(UUID uuid, int day) {
// Wir speichern eine Liste der geöffneten Tage für jeden Spieler
List<Integer> claimedDays = customFile.getIntegerList(uuid.toString());
return claimedDays.contains(day);
}
/**
* Markiert einen Tag für einen Spieler als geholt.
* @param uuid Die UUID des Spielers
* @param day Der Tag (1-24)
*/
public static void setClaimed(UUID uuid, int day) {
List<Integer> claimedDays = customFile.getIntegerList(uuid.toString());
claimedDays.add(day);
customFile.set(uuid.toString(), claimedDays);
save();
}
}

View File

@@ -0,0 +1,33 @@
package de.mviper.adventskalender;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Scanner;
import java.util.function.Consumer;
public class UpdateChecker {
private final JavaPlugin plugin;
private final int resourceId;
public UpdateChecker(JavaPlugin plugin, int resourceId) {
this.plugin = plugin;
this.resourceId = resourceId;
}
public void getVersion(final Consumer<String> consumer) {
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
try (InputStream is = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId).openStream();
Scanner scann = new Scanner(is)) {
if (scann.hasNext()) {
consumer.accept(scann.next());
}
} catch (IOException e) {
plugin.getLogger().info("Update-Check fehlgeschlagen: " + e.getMessage());
}
});
}
}

View File

@@ -8,6 +8,9 @@ general:
# Verfügbare Optionen: 'de', 'en'
language: "de"
# Nur für Testzwecke: Simuliert einen Tag (0 = echtes Datum verwenden)
test_day: 0
# --- Kalender-Einstellungen ---
calendar:
# Soll jeder Spieler seinen eigenen, individuellen Kalender haben?
@@ -19,6 +22,15 @@ calendar:
# Dieser Text ist ein Schlüssel, der in der messages.yml übersetzt wird.
gui_title_key: "adventskalender.gui_title"
# Datenbank für Bungeecord Nutzung
mysql:
enable: false
host: "localhost"
port: 3306
database: "adventskalender"
user: "root"
password: ""
# --- Belohnungen für die Tage 1 bis 24 ---
# Hier definierst du die Items für jeden Tag.
# 'material': Der Materialname des Items (z.B. DIAMOND, ELYTRA).

View File

@@ -1,15 +1,14 @@
# =============================================================================
# Adventskalender Plugin - Deutsche Sprachdatei
# Adventskalender Plugin - Deutsche Sprachdatei (v2.0 - 2026)
# =============================================================================
# --- Prefix ---
# Dieser Prefix wird vor fast jeder Nachricht im Chat angezeigt.
prefix: "&6[Adventskalender] &r"
# --- GUI-Texte ---
gui:
# Der Titel des Adventskalender-Inventars.
title: "&6✦ Adventskalender 2024 ✦"
title: "&6✦ Adventskalender 2026 ✦"
# --- Nachrichten an Spieler ---
# Verfügbare Platzhalter:
@@ -18,90 +17,92 @@ gui:
messages:
no_permission: "&cDafür hast du keine Berechtigung."
only_player: "&cDieser Befehl kann nur von einem Spieler ausgeführt werden."
inventory_full: "&cDein Inventar war voll! Das Item wurde auf den Boden geworfen."
reward_received: "&aDu hast dein Geschenk für Tag %day% erhalten!"
day_not_available: "&cDieses Geschenk kannst du (noch) nicht öffnen."
day_already_claimed: "&7Du hast dein Geschenk für diesen Tag bereits geholt."
inventory_full: "&cDein Inventar ist voll! Dein Geschenk wurde vor deine Füße geworfen."
reward_received: "&aGlückwunsch! Du hast dein Geschenk für Tag &e%day% &aerhalten!"
day_not_available: "&cDieses Türchen ist noch fest verschlossen. Gedulde dich noch etwas!"
day_already_claimed: "&7Du hast dieses Geschenk bereits abgeholt."
global_already_claimed: "&cDieses Geschenk wurde heute bereits von jemand anderem abgeholt!"
# --- Admin-Nachrichten ---
admin:
reload_success: "&aKonfiguration und Sprachdateien wurden neu geladen."
reload_success: "&aKonfiguration und Sprachdateien wurden erfolgreich neu geladen."
test_mode_on: "&e[Admin] &7Der Test-Modus wurde auf Tag &6%day% &7gesetzt."
test_mode_off: "&e[Admin] &7Test-Modus deaktiviert. Es wird wieder das reale Datum genutzt."
player_not_found: "&cDer Spieler '%player%' wurde nicht gefunden."
invalid_day: "&cUngültiger Tag. Bitte wähle eine Zahl zwischen 1 und 24."
open_success: "&aDu hast für %player% das Türchen für Tag %day% geöffnet."
# --- Namen und Beschreibungen für die Belohnungs-Items ---
# Die Schlüssel hier (z.B. 'day_1') müssen mit den 'keys' in der config.yml übereinstimmen.
# --- Belohnungs-Texte im GUI ---
# Diese Schlüssel werden vom AdventInventory genutzt, um die Items im Menü zu benennen.
rewards:
day_1:
name: "&bErste Diamanten!"
name: "&bTag 1: Erste Diamanten!"
lore: ["&7Ein kleiner Vorgeschmack auf den Reichtum...", "&7Viel Spaß damit!"]
day_2:
name: "&6Goldene Äpfel"
name: "&6Tag 2: Goldene Äpfel"
lore: ["&7Für den Fall, dass es mal eng wird..."]
day_3:
name: "&cSchwert des Helden"
name: "&cTag 3: Schwert des Helden"
lore: ["&7Ein mächtiges Schwert, um Monster zu jagen."]
day_4:
name: "&aFlügel der Freiheit"
name: "&aTag 4: Flügel der Freiheit"
lore: ["&7Sei frei wie ein Adler!"]
day_5:
name: "&8Ein Hauch von Netherit"
name: "&8Tag 5: Ein Hauch von Netherit"
lore: ["&7Sehr wertvoll und selten."]
day_6:
name: "&6Göttlicher Apfel"
name: "&6Tag 6: Göttlicher Apfel"
lore: ["&7Ein Geschenk der Götter... oder des Admins."]
day_7:
name: "&eBergbau-Meister"
name: "&eTag 7: Bergbau-Meister"
lore: ["&7Für die größten Schätze der Welt."]
day_8:
name: "&dTotem des Unvergänglichen"
name: "&dTag 8: Totem des Unvergänglichen"
lore: ["&7Ein kleines Extra-Leben."]
day_9:
name: "&5Stern des Nethers"
name: "&5Tag 9: Stern des Nethers"
lore: ["&7Der Kern eines mächtigen Wesens."]
day_10:
name: "&9Magische Truhe"
name: "&9Tag 10: Magische Truhen"
lore: ["&7Hält all deine Schätze sicher."]
day_11:
name: "&3Stachel des Ozeans"
name: "&3Tag 11: Stachel des Ozeans"
lore: ["&7Die Waffe der Wächter."]
day_12:
name: "&7Helm der Weisheit"
name: "&7Tag 12: Helm der Weisheit"
lore: ["&7Schützt deinen Kopf."]
day_13:
name: "&fSattel für ein treues Tier"
name: "&fTag 13: Sattel"
lore: ["&7Für dein nächstes Abenteuer zu Pferd."]
day_14:
name: "&eNamensschilder"
name: "&eTag 14: Namensschilder"
lore: ["&7Gib deinem Lieblings-Wolf einen Namen!"]
day_15:
name: "&aSchallplatte - cat"
name: "&aTag 15: Schallplatte - cat"
lore: ["&7Relaxende Musik für eine gemütliche Zeit."]
day_16:
name: "&5Endkristall"
name: "&5Tag 16: Endkristalle"
lore: ["&7Mächtig und gefährlich. Mit Vorsicht genießen!"]
day_17:
name: "&7Brustpanzer der Unzerstörbarkeit"
name: "&7Tag 17: Brustpanzer der Unzerstörbarkeit"
lore: ["&7Bietet maximalen Schutz."]
day_18:
name: "&bHerz des Ozeans"
name: "&bTag 18: Herz des Ozeans"
lore: ["&7Das Zentrum einer Conduit-Struktur."]
day_19:
name: "&fNautilusmuschel"
name: "&fTag 19: Nautilusmuscheln"
lore: ["&7Ein seltenes Gut aus den Tiefen."]
day_20:
name: "&8Kopf des Enderdrachen"
name: "&8Tag 20: Kopf des Enderdrachen"
lore: ["&7Eine beeindruckende Trophäe."]
day_21:
name: "&8Stiefel der Tiefe"
name: "&8Tag 21: Stiefel der Tiefe"
lore: ["&7Lass dich nicht im Feuer verbrennen."]
day_22:
name: "&dVerzauberungstisch"
name: "&dTag 22: Verzauberungstisch"
lore: ["&7Kreiere deine eigenen magischen Items."]
day_23:
name: "&bDie ultimative Hacke"
name: "&bTag 23: Die ultimative Hacke"
lore: ["&7Nicht nur für den Ackerbau..."]
day_24:
name: "&cDas große Finale! - Feuerwerk"
name: "&cTag 24: Das große Finale!"
lore: ["&7Frohe Weihnachten!", "&7Feiere mit einem riesigen Feuerwerk!"]

View File

@@ -1,15 +1,14 @@
# =============================================================================
# Adventskalender Plugin - English Language File
# Adventskalender Plugin - English Language File (v2.0 - 2026)
# =============================================================================
# --- Prefix ---
# This prefix will be shown before most chat messages.
prefix: "&6[Adventskalender] &r"
prefix: "&6[Advent] &r"
# --- GUI Texts ---
gui:
# The title of the Advent Calendar inventory.
title: "&6✦ Advent Calendar 2024 ✦"
title: "&6✦ Advent Calendar 2026 ✦"
# --- Messages to Players ---
# Available placeholders:
@@ -18,90 +17,91 @@ gui:
messages:
no_permission: "&cYou don't have permission for that."
only_player: "&cThis command can only be executed by a player."
inventory_full: "&cYour inventory was full! The item was dropped on the ground."
reward_received: "&aYou have received your gift for day %day%!"
day_not_available: "&cYou cannot open this gift (yet)."
day_already_claimed: "&7You have already claimed your gift for this day."
inventory_full: "&cYour inventory is full! Your gift was dropped at your feet."
reward_received: "&aCongratulations! You have received your gift for day &e%day%&a!"
day_not_available: "&cThis door is still locked. You'll have to wait a bit longer!"
day_already_claimed: "&7You have already claimed this gift."
global_already_claimed: "&cThis gift has already been claimed by someone else today!"
# --- Admin Messages ---
admin:
reload_success: "&aConfiguration and language files have been reloaded."
test_mode_on: "&e[Admin] &7Test mode set to day &6%day%&7."
test_mode_off: "&e[Admin] &7Test mode disabled. Using real-time date again."
player_not_found: "&cThe player '%player%' was not found."
invalid_day: "&cInvalid day. Please choose a number between 1 and 24."
open_success: "&aYou have opened day %day% for %player%."
# --- Names and Descriptions for Reward Items ---
# The keys here (e.g., 'day_1') must match the 'keys' in the config.yml.
# --- Reward Texts in GUI ---
rewards:
day_1:
name: "&bFirst Diamonds!"
name: "&bDay 1: First Diamonds!"
lore: ["&7A little taste of wealth...", "&7Have fun with it!"]
day_2:
name: "&6Golden Apples"
name: "&6Day 2: Golden Apples"
lore: ["&7In case things get tight..."]
day_3:
name: "&cSword of the Hero"
name: "&cDay 3: Sword of the Hero"
lore: ["&7A mighty sword to hunt monsters."]
day_4:
name: "&aWings of Freedom"
name: "&aDay 4: Wings of Freedom"
lore: ["&7Be free as an eagle!"]
day_5:
name: "&8A Touch of Netherite"
name: "&8Day 5: A Touch of Netherite"
lore: ["&7Very valuable and rare."]
day_6:
name: "&6Godly Apple"
name: "&6Day 6: Godly Apple"
lore: ["&7A gift from the gods... or the admin."]
day_7:
name: "&eMaster Pickaxe"
name: "&eDay 7: Master Pickaxe"
lore: ["&7For the greatest treasures in the world."]
day_8:
name: "&dTotem of Undying"
name: "&dDay 8: Totem of Undying"
lore: ["&7An extra life."]
day_9:
name: "&5Nether Star"
name: "&5Day 9: Nether Star"
lore: ["&7The core of a powerful being."]
day_10:
name: "&9Magic Box"
name: "&9Day 10: Magic Chests"
lore: ["&7Keeps all your treasures safe."]
day_11:
name: "&3Spear of the Ocean"
name: "&3Day 11: Spear of the Ocean"
lore: ["&7The weapon of the guardians."]
day_12:
name: "&7Helmet of Wisdom"
name: "&7Day 12: Helmet of Wisdom"
lore: ["&7Protects your head."]
day_13:
name: "&fSaddle for a Loyal Steed"
name: "&fDay 13: Saddle"
lore: ["&7For your next equestrian adventure."]
day_14:
name: "&eName Tags"
name: "&eDay 14: Name Tags"
lore: ["&7Give your favorite wolf a name!"]
day_15:
name: "&aMusic Disc - cat"
name: "&aDay 15: Music Disc - cat"
lore: ["&7Relaxing music for a cozy time."]
day_16:
name: "&5End Crystal"
name: "&5Day 16: End Crystals"
lore: ["&7Powerful and dangerous. Handle with care!"]
day_17:
name: "&7Chestplate of Durability"
name: "&7Day 17: Chestplate of Durability"
lore: ["&7Offers maximum protection."]
day_18:
name: "&bHeart of the Sea"
name: "&bDay 18: Heart of the Sea"
lore: ["&7The center of a Conduit structure."]
day_19:
name: "&fNautilus Shell"
name: "&fDay 19: Nautilus Shells"
lore: ["&7A rare goodie from the depths."]
day_20:
name: "&8Head of the Ender Dragon"
name: "&8Day 20: Head of the Ender Dragon"
lore: ["&7An impressive trophy."]
day_21:
name: "&8Boots of the Deep"
name: "&8Day 21: Boots of the Deep"
lore: ["&7Don't let yourself get burned in fire."]
day_22:
name: "&dEnchanting Table"
name: "&dDay 22: Enchanting Table"
lore: ["&7Create your own magical items."]
day_23:
name: "&bThe Ultimate Hoe"
name: "&bDay 23: The Ultimate Hoe"
lore: ["&7Not just for farming..."]
day_24:
name: "&cThe Grand Finale! - Fireworks"
name: "&cDay 24: The Grand Finale!"
lore: ["&7Merry Christmas!", "&7Celebrate with a huge firework!"]

View File

@@ -1,9 +1,9 @@
name: Adventskalender
version: '1.0.0'
version: '1.0.1'
main: de.mviper.adventskalender.Adventskalender
api-version: 1.20
author: M_Viper
description: Ein konfigurierbarer Adventskalender für Minecraft.
description: Ein moderner, performanter Adventskalender (2026 Edition).
commands:
adventskalender: