diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..fb50116 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..b3f2881 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + CuraHQ + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/LICENSE b/LICENSE index 261eeb9..f288702 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,674 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - 1. Definitions. + Preamble - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + The GNU General Public License is a free, copyleft license for +software and other kinds of works. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + 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. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + 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. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + 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. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + 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. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + 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. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + 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. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. + 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. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + 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. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + The precise terms and conditions for copying, distribution and +modification follow. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. + TERMS AND CONDITIONS - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + 0. Definitions. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: + "This License" refers to version 3 of the GNU General Public License. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "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. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and + 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. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. + A "covered work" means either the unmodified Program or a work based +on the Program. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + 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. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. + 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. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. + 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. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + 1. Source Code. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. + 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. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + 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. - END OF TERMS AND CONDITIONS + 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. - APPENDIX: How to apply the Apache License to your work. + 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. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - Copyright [yyyy] [name of copyright owner] + The Corresponding Source for a work in source code form is that +same work. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + 2. Basic Permissions. - http://www.apache.org/licenses/LICENSE-2.0 + 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. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..9ec633f --- /dev/null +++ b/config.yml @@ -0,0 +1,49 @@ +Scoreboard_title: '&6&lExample &7%straight_line% &fMap 1' +Timers: + protection: 'Invincibility' + teleport: 'Home' + home: 'Home' + archer: 'Archer Tag' + enderpearl: 'Enderpearl' + logout: 'Logout' + notch: 'Notch Apple' + warmup: 'Class Warmup' + spawntag: 'Combat' +Combat_building: true +Kitmap: + Sharpness: 1 + Protection: 1 +Kit-Map: true +PRIMAIRY-COLOR: '&2' +SECONDAIRY-COLOR: '&7' +THIRD-COLOR: '&e' +SERVER-NAME: 'Vorcide' +DEATHBAN-MAXTIME: 3 +MAX-FACTION: 10 +MAX-ALLY: 1 +MAP-BORDER: 3000 +CURRENT-MAP: 1 +MAP-KIT: 'S1 P1' +WARZONE-RADIUS: 800 +Help: +- '&8&m------------------------------------' +- '&6&lconfig.yml' +- '&8&m------------------------------------' +Teamspeak: +- '&6&lTeamspeak IP: ts.example.us' +teamspeak-frozen: ts.example.us +store: 'store.example.us' +top-rank: 'Vorcide' +website: 'www.example.us' +Coords: +- '&8&m----------------------------------------' +- '&6&lconfig.yml' +- '&8&m----------------------------------------' +spawn: + world: world + x: 0.538049846829157 + y: 69.0 + z: 0.6617853658512408 + yaw: 0.78689575 + pitch: 11.715501 +warp-delay-millis: 0 diff --git a/items.csv b/items.csv new file mode 100644 index 0000000..f5a7593 --- /dev/null +++ b/items.csv @@ -0,0 +1,7450 @@ +#version: TeamCity +#If you change this file, it will not be automatically updated after the next release. +#item,id,metadata +stone,1,0 +sstone,1,0 +smoothstone,1,0 +rock,1,0 +grass,2,0 +greendirt,2,0 +greenearth,2,0 +greenland,2,0 +dirt,3,0 +earth,3,0 +land,3,0 +grasslessdirt,3,1 +grasslessearth,3,1 +grasslessland,3,1 +podzol,3,2 +cobblestone,4,0 +cstone,4,0 +cobble,4,0 +wood,5,0 +plank,5,0 +woodenplank,5,0 +woodplank,5,0 +wplank,5,0 +plankwooden,5,0 +plankwood,5,0 +plankw,5,0 +oakplank,5,0 +oakwoodenplank,5,0 +oakwoodplank,5,0 +oakwplank,5,0 +oakplankwooden,5,0 +oakplankwood,5,0 +oakplankw,5,0 +oplank,5,0 +owoodenplank,5,0 +owoodplank,5,0 +owplank,5,0 +oplankwooden,5,0 +oplankwood,5,0 +oplankw,5,0 +pineplank,5,1 +pinewoodenplank,5,1 +pinewoodplank,5,1 +pinewplank,5,1 +pineplankwooden,5,1 +pineplankwood,5,1 +pineplankw,5,1 +pplank,5,1 +pwoodenplank,5,1 +pwoodplank,5,1 +pwplank,5,1 +pplankwooden,5,1 +pplankwood,5,1 +pplankw,5,1 +darkplank,5,1 +darkwoodenplank,5,1 +darkwoodplank,5,1 +darkwplank,5,1 +darkplankwooden,5,1 +darkplankwood,5,1 +darkplankw,5,1 +dplank,5,1 +dwoodenplank,5,1 +dwoodplank,5,1 +dwplank,5,1 +dplankwooden,5,1 +dplankwood,5,1 +dplankw,5,1 +spruceplank,5,1 +sprucewoodenplank,5,1 +sprucewoodplank,5,1 +sprucewplank,5,1 +spruceplankwooden,5,1 +spruceplankwood,5,1 +spruceplankw,5,1 +splank,5,1 +swoodenplank,5,1 +swoodplank,5,1 +swplank,5,1 +splankwooden,5,1 +splankwood,5,1 +splankw,5,1 +birchplank,5,2 +birchwoodenplank,5,2 +birchwoodplank,5,2 +birchwplank,5,2 +birchplankwooden,5,2 +birchplankwood,5,2 +birchplankw,5,2 +bplank,5,2 +bwoodenplank,5,2 +bwoodplank,5,2 +bwplank,5,2 +bplankwooden,5,2 +bplankwood,5,2 +bplankw,5,2 +lightplank,5,2 +lightwoodenplank,5,2 +lightwoodplank,5,2 +lightwplank,5,2 +lightplankwooden,5,2 +lightplankwood,5,2 +lightplankw,5,2 +lplank,5,2 +lwoodenplank,5,2 +lwoodplank,5,2 +lwplank,5,2 +lplankwooden,5,2 +lplankwood,5,2 +lplankw,5,2 +whiteplank,5,2 +whitewoodenplank,5,2 +whitewoodplank,5,2 +whitewplank,5,2 +whiteplankwooden,5,2 +whiteplankwood,5,2 +whiteplankw,5,2 +wwoodenplank,5,2 +wwoodplank,5,2 +wwplank,5,2 +wplankwooden,5,2 +wplankwood,5,2 +wplankw,5,2 +jungleplank,5,3 +junglewoodenplank,5,3 +junglewoodplank,5,3 +junglewplank,5,3 +jungleplankwooden,5,3 +jungleplankwood,5,3 +jungleplankw,5,3 +jplank,5,3 +jwoodenplank,5,3 +jwoodplank,5,3 +jwplank,5,3 +jplankwooden,5,3 +jplankwood,5,3 +jplankw,5,3 +forestplank,5,3 +forestwoodenplank,5,3 +forestwoodplank,5,3 +forestwplank,5,3 +forestplankwooden,5,3 +forestplankwood,5,3 +forestplankw,5,3 +fplank,5,3 +fwoodenplank,5,3 +fwoodplank,5,3 +fwplank,5,3 +fplankwooden,5,3 +fplankwood,5,3 +fplankw,5,3 +acaciaplank,5,4 +acaciawoodenplank,5,4 +acaciawoodplank,5,4 +acaciawplank,5,4 +acaciaplankwooden,5,4 +acaciaplankwood,5,4 +acaciaplankw,5,4 +aplank,5,4 +awoodenplank,5,4 +awoodplank,5,4 +awplank,5,4 +aplankwooden,5,4 +aplankwood,5,4 +aplankw,5,4 +darkoakplank,5,5 +darkoakwoodenplank,5,5 +darkoakwoodplank,5,5 +darkoakwplank,5,5 +darkoakplankwooden,5,5 +darkoakplankwood,5,5 +darkoakplankw,5,5 +doakplank,5,5 +doakwoodenplank,5,5 +doakwoodplank,5,5 +doakwplank,5,5 +doakplankwooden,5,5 +doakplankwood,5,5 +doakplankw,5,5 +doplank,5,5 +dowoodenplank,5,5 +dowoodplank,5,5 +dowplank,5,5 +doplankwooden,5,5 +doplankwood,5,5 +doplankw,5,5 +sapling,6,0 +treesapling,6,0 +logsapling,6,0 +trunksapling,6,0 +woodsapling,6,0 +oaktreesapling,6,0 +oaklogsapling,6,0 +oaktrunksapling,6,0 +oakwoodsapling,6,0 +osapling,6,0 +otreesapling,6,0 +ologsapling,6,0 +otrunksapling,6,0 +owoodsapling,6,0 +darksapling,6,1 +darktreesapling,6,1 +darklogsapling,6,1 +darktrunksapling,6,1 +darkwoodsapling,6,1 +sprucesapling,6,1 +sprucetreesapling,6,1 +sprucelogsapling,6,1 +sprucetrunksapling,6,1 +sprucewoodsapling,6,1 +pinesapling,6,1 +pinetreesapling,6,1 +pinelogsapling,6,1 +pinetrunksapling,6,1 +pinewoodsapling,6,1 +dsapling,6,1 +dtreesapling,6,1 +dlogsapling,6,1 +dtrunksapling,6,1 +dwoodsapling,6,1 +ssapling,6,1 +streesapling,6,1 +slogsapling,6,1 +strunksapling,6,1 +swoodsapling,6,1 +psapling,6,1 +ptreesapling,6,1 +plogsapling,6,1 +ptrunksapling,6,1 +pwoodsapling,6,1 +birchsapling,6,2 +birchtreesapling,6,2 +birchlogsapling,6,2 +birchtrunksapling,6,2 +birchwoodsapling,6,2 +lightsapling,6,2 +lighttreesapling,6,2 +lightlogsapling,6,2 +lighttrunksapling,6,2 +lightwoodsapling,6,2 +whitesapling,6,2 +whitetreesapling,6,2 +whitelogsapling,6,2 +whitetrunksapling,6,2 +whitewoodsapling,6,2 +bsapling,6,2 +btreesapling,6,2 +blogsapling,6,2 +btrunksapling,6,2 +bwoodsapling,6,2 +lsapling,6,2 +ltreesapling,6,2 +llogsapling,6,2 +ltrunksapling,6,2 +lwoodsapling,6,2 +wsapling,6,2 +wtreesapling,6,2 +wlogsapling,6,2 +wtrunksapling,6,2 +wwoodsapling,6,2 +junglesapling,6,3 +jungletreesapling,6,3 +junglelogsapling,6,3 +jungletrunksapling,6,3 +junglewoodsapling,6,3 +forestsapling,6,3 +foresttreesapling,6,3 +forestlogsapling,6,3 +foresttrunksapling,6,3 +forestwoodsapling,6,3 +jsapling,6,3 +jtreesapling,6,3 +jlogsapling,6,3 +jtrunksapling,6,3 +jwoodsapling,6,3 +fsapling,6,3 +ftreesapling,6,3 +flogsapling,6,3 +ftrunksapling,6,3 +fwoodsapling,6,3 +acaciasapling,6,4 +acaciatreesapling,6,4 +acacialogsapling,6,4 +acaciatrunksapling,6,4 +acaciawoodsapling,6,4 +asapling,6,4 +atreesapling,6,4 +alogsapling,6,4 +atrunksapling,6,4 +awoodsapling,6,4 +darkoaksapling,6,5 +darkoaktreesapling,6,5 +darkoaklogsapling,6,5 +darkoaktrunksapling,6,5 +darkoakwoodsapling,6,5 +doaksapling,6,5 +doaktreesapling,6,5 +doaklogsapling,6,5 +doaktrunksapling,6,5 +dosapling,6,5 +dowoodsapling,6,5 +dotreesapling,6,5 +dologsapling,6,5 +dotrunksapling,6,5 +bedrock,7,0 +oprock,7,0 +opblock,7,0 +adminblock,7,0 +adminrock,7,0 +adminium,7,0 +water,8,0 +stationarywater,9,0 +stillwater,9,0 +swater,9,0 +lava,10,0 +stationarylava,11,0 +stilllava,11,0 +slava,11,0 +sand,12,0 +redsand,12,1 +rsand,12,1 +gravel,13,0 +goldore,14,0 +oregold,14,0 +gore,14,0 +oreg,14,0 +ogold,14,0 +goldo,14,0 +ironore,15,0 +oreiron,15,0 +irono,15,0 +oiron,15,0 +steelore,15,0 +oresteel,15,0 +steelo,15,0 +osteel,15,0 +iore,15,0 +orei,15,0 +sore,15,0 +ores,15,0 +coalore,16,0 +orecoal,16,0 +coalo,16,0 +ocoal,16,0 +core,16,0 +tree,17,0 +log,17,0 +trunk,17,0 +oak,17,0 +oaktree,17,0 +oaklog,17,0 +oaktrunk,17,0 +oakwood,17,0 +otree,17,0 +olog,17,0 +otrunk,17,0 +owood,17,0 +pine,17,1 +pinetree,17,1 +pinelog,17,1 +pinetrunk,17,1 +pinewood,17,1 +darktree,17,1 +darklog,17,1 +darktrunk,17,1 +darkwood,17,1 +spruce,17,1 +sprucetree,17,1 +sprucelog,17,1 +sprucetrunk,17,1 +sprucewood,17,1 +dtree,17,1 +dlog,17,1 +dtrunk,17,1 +dwood,17,1 +stree,17,1 +slog,17,1 +strunk,17,1 +swood,17,1 +ptree,17,1 +plog,17,1 +ptrunk,17,1 +pwood,17,1 +birch,17,2 +birchtree,17,2 +birchlog,17,2 +birchtrunk,17,2 +birchwood,17,2 +whitetree,17,2 +whitelog,17,2 +whitetrunk,17,2 +whitewood,17,2 +lighttree,17,2 +lightlog,17,2 +lighttrunk,17,2 +lightwood,17,2 +btree,17,2 +blog,17,2 +btrunk,17,2 +bwood,17,2 +wtree,17,2 +wlog,17,2 +wtrunk,17,2 +wwood,17,2 +ltree,17,2 +llog,17,2 +ltrunk,17,2 +lwood,17,2 +jungletree,17,3 +junglelog,17,3 +jungletrunk,17,3 +junglewood,17,3 +jungle,17,3 +forest,17,3 +foresttree,17,3 +forestlog,17,3 +foresttrunk,17,3 +forestwood,17,3 +jtree,17,3 +jlog,17,3 +jtrunk,17,3 +jwood,17,3 +ftree,17,3 +flog,17,3 +ftrunk,17,3 +fwood,17,3 +leaves,18,0 +leaf,18,0 +treeleaves,18,0 +logleaves,18,0 +trunkleaves,18,0 +woodleaves,18,0 +oakleaves,18,0 +oakleaf,18,0 +oleaves,18,0 +oleaf,18,0 +oaktreeleaves,18,0 +oaklogleaves,18,0 +oaktrunkleaves,18,0 +oakwoodleaves,18,0 +otreeleaves,18,0 +ologleaves,18,0 +otrunkleaves,18,0 +owoodleaves,18,0 +treeleaf,18,0 +logleaf,18,0 +trunkleaf,18,0 +woodleaf,18,0 +oaktreeleaf,18,0 +oaklogleaf,18,0 +oaktrunkleaf,18,0 +oakwoodleaf,18,0 +otreeleaf,18,0 +ologleaf,18,0 +otrunkleaf,18,0 +owoodleaf,18,0 +pineleaves,18,1 +pineleaf,18,1 +pleaves,18,1 +pleaf,18,1 +pinetreeleaves,18,1 +pinelogleaves,18,1 +pinetrunkleaves,18,1 +pinewoodleaves,18,1 +ptreeleaves,18,1 +plogleaves,18,1 +ptrunkleaves,18,1 +pwoodleaves,18,1 +spruceleaves,18,1 +spruceleaf,18,1 +sleaves,18,1 +sleaf,18,1 +sprucetreeleaves,18,1 +sprucelogleaves,18,1 +sprucetrunkleaves,18,1 +sprucewoodleaves,18,1 +streeleaves,18,1 +slogleaves,18,1 +strunkleaves,18,1 +swoodleaves,18,1 +darkleaves,18,1 +darkleaf,18,1 +dleaves,18,1 +dleaf,18,1 +darktreeleaves,18,1 +darklogleaves,18,1 +darktrunkleaves,18,1 +darkwoodleaves,18,1 +dtreeleaves,18,1 +dlogleaves,18,1 +dtrunkleaves,18,1 +dwoodleaves,18,1 +sprucetreeleaf,18,1 +sprucelogleaf,18,1 +sprucetrunkleaf,18,1 +sprucewoodleaf,18,1 +streeleaf,18,1 +slogleaf,18,1 +strunkleaf,18,1 +swoodleaf,18,1 +pinetreeleaf,18,1 +pinelogleaf,18,1 +pinetrunkleaf,18,1 +pinewoodleaf,18,1 +ptreeleaf,18,1 +plogleaf,18,1 +ptrunkleaf,18,1 +pwoodleaf,18,1 +darktreeleaf,18,1 +darklogleaf,18,1 +darktrunkleaf,18,1 +darkwoodleaf,18,1 +dtreeleaf,18,1 +dlogleaf,18,1 +dtrunkleaf,18,1 +dwoodleaf,18,1 +birchleaves,18,2 +birchleaf,18,2 +bleaves,18,2 +bleaf,18,2 +birchtreeleaves,18,2 +birchlogleaves,18,2 +birchtrunkleaves,18,2 +birchwoodleaves,18,2 +btreeleaves,18,2 +blogleaves,18,2 +btrunkleaves,18,2 +bwoodleaves,18,2 +lightleaves,18,2 +lightleaf,18,2 +lleaves,18,2 +lleaf,18,2 +lighttreeleaves,18,2 +lightlogleaves,18,2 +lighttrunkleaves,18,2 +lightwoodleaves,18,2 +ltreeleaves,18,2 +llogleaves,18,2 +ltrunkleaves,18,2 +lwoodleaves,18,2 +whiteleaves,18,2 +whiteleaf,18,2 +wleaves,18,2 +wleaf,18,2 +whitetreeleaves,18,2 +whitelogleaves,18,2 +whitetrunkleaves,18,2 +whitewoodleaves,18,2 +wtreeleaves,18,2 +wlogleaves,18,2 +wtrunkleaves,18,2 +wwoodleaves,18,2 +birchtreeleaf,18,2 +birchlogleaf,18,2 +birchtrunkleaf,18,2 +birchwoodleaf,18,2 +btreeleaf,18,2 +blogleaf,18,2 +btrunkleaf,18,2 +bwoodleaf,18,2 +lighttreeleaf,18,2 +lightlogleaf,18,2 +lighttrunkleaf,18,2 +lightwoodleaf,18,2 +ltreeleaf,18,2 +llogleaf,18,2 +ltrunkleaf,18,2 +lwoodleaf,18,2 +whitetreeleaf,18,2 +whitelogleaf,18,2 +whitetrunkleaf,18,2 +whitewoodleaf,18,2 +wtreeleaf,18,2 +wlogleaf,18,2 +wtrunkleaf,18,2 +wwoodleaf,18,2 +jungleleaves,18,3 +jungleleaf,18,3 +jleaves,18,3 +jleaf,18,3 +jungletreeleaves,18,3 +junglelogleaves,18,3 +jungletrunkleaves,18,3 +junglewoodleaves,18,3 +jtreeleaves,18,3 +jlogleaves,18,3 +jtrunkleaves,18,3 +jwoodleaves,18,3 +forestleaves,18,3 +forestleaf,18,3 +fleaves,18,3 +fleaf,18,3 +foresttreeleaves,18,3 +forestlogleaves,18,3 +foresttrunkleaves,18,3 +forestwoodleaves,18,3 +ftreeleaves,18,3 +flogleaves,18,3 +ftrunkleaves,18,3 +fwoodleaves,18,3 +jungletreeleaf,18,3 +junglelogleaf,18,3 +jungletrunkleaf,18,3 +junglewoodleaf,18,3 +jtreeleaf,18,3 +jlogleaf,18,3 +jtrunkleaf,18,3 +jwoodleaf,18,3 +foresttreeleaf,18,3 +forestlogleaf,18,3 +foresttrunkleaf,18,3 +forestwoodleaf,18,3 +ftreeleaf,18,3 +flogleaf,18,3 +ftrunkleaf,18,3 +fwoodleaf,18,3 +sponge,19,0 +glass,20,0 +blockglass,20,0 +glassblock,20,0 +lapislazuliore,21,0 +lapislazulio,21,0 +orelapislazuli,21,0 +olapislazuli,21,0 +lapisore,21,0 +lapiso,21,0 +orelapis,21,0 +olapis,21,0 +lore,21,0 +orel,21,0 +lapislazuliblock,22,0 +blocklapislazuli,22,0 +lapisblock,22,0 +blocklapis,22,0 +lblock,22,0 +blockl,22,0 +dispenser,23,0 +dispense,23,0 +sandstone,24,0 +sastone,24,0 +creepersandstone,24,1 +creepersastone,24,1 +creepsandstone,24,1 +creepsastone,24,1 +csandstone,24,1 +csastone,24,1 +hieroglyphicsandstone,24,1 +hieroglyphicsastone,24,1 +hieroglyphsandstone,24,1 +hieroglyphsastone,24,1 +hsandstone,24,1 +hsastone,24,1 +pyramidsandstone,24,1 +pyramidsastone,24,1 +psandstone,24,1 +psastone,24,1 +chiseledsandstone,24,1 +chiseledsastone,24,1 +chiselsandstone,24,1 +chiselsastone,24,1 +smoothsandstone,24,2 +smoothsastone,24,2 +ssandstone,24,2 +smsastone,24,2 +ssastone,24,2 +noteblock,25,0 +musicblock,25,0 +nblock,25,0 +mblock,25,0 +poweredtrack,27,0 +poweredrails,27,0 +poweredrail,27,0 +boostertrack,27,0 +boosterrails,27,0 +boosterrail,27,0 +powertrack,27,0 +powerrails,27,0 +powerrail,27,0 +boosttrack,27,0 +boostrails,27,0 +boostrail,27,0 +ptrack,27,0 +prails,27,0 +prail,27,0 +btrack,27,0 +brails,27,0 +brail,27,0 +detectortrack,28,0 +detectorrails,28,0 +detectorrail,28,0 +detectingtrack,28,0 +detectingrails,28,0 +detectingrail,28,0 +detecttrack,28,0 +detectrails,28,0 +detectrail,28,0 +dtrack,28,0 +drails,28,0 +drail,28,0 +stickypistonbase,29,0 +stickypiston,29,0 +stickpistonbase,29,0 +stickpiston,29,0 +stickyp,29,0 +spistonbase,29,0 +spiston,29,0 +pistonstickybase,29,0 +pistonsticky,29,0 +pistonstickbase,29,0 +pistonstick,29,0 +pistonsbase,29,0 +pistons,29,0 +psticky,29,0 +pstick,29,0 +spiderweb,30,0 +cobweb,30,0 +sweb,30,0 +cweb,30,0 +web,30,0 +longgrass,31,1 +tallgrass,31,1 +wildgrass,31,1 +grasslong,31,1 +grasstall,31,1 +grasswild,31,1 +lgrass,31,1 +tgrass,31,1 +wgrass,31,1 +fern,31,2 +bush,31,2 +deadshrub,32,0 +dshrub,32,0 +deadbush,32,0 +dbush,32,0 +deadsapling,32,0 +piston,33,0 +pistonbase,33,0 +pistonblock,33,0 +whitewool,35,0 +whitecloth,35,0 +whitecotton,35,0 +wcloth,35,0 +wwool,35,0 +wcotton,35,0 +cloth,35,0 +wool,35,0 +cotton,35,0 +orangewool,35,1 +orangecloth,35,1 +orangecotton,35,1 +ocloth,35,1 +owool,35,1 +ocotton,35,1 +magentawool,35,2 +magentacloth,35,2 +magentacotton,35,2 +mcloth,35,2 +mwool,35,2 +mcotton,35,2 +lightbluewool,35,3 +lightbluecloth,35,3 +lightbluecotton,35,3 +lbluecloth,35,3 +lbluewool,35,3 +lbluecotton,35,3 +lightblucloth,35,3 +lightbluwool,35,3 +lightblucotton,35,3 +lblucloth,35,3 +lbluwool,35,3 +lblucotton,35,3 +lbcloth,35,3 +lbwool,35,3 +lbcotton,35,3 +yellowwool,35,4 +yellowcloth,35,4 +yellowcotton,35,4 +ycloth,35,4 +ywool,35,4 +ycotton,35,4 +lightgreenwool,35,5 +lightgreencloth,35,5 +lightgreencotton,35,5 +lgreencloth,35,5 +lgreenwool,35,5 +lgreencotton,35,5 +lightgrecloth,35,5 +lightgrewool,35,5 +lightgrecotton,35,5 +lgrecloth,35,5 +lgrewool,35,5 +lgrecotton,35,5 +limecloth,35,5 +limewool,35,5 +limecotton,35,5 +lcloth,35,5 +lwool,35,5 +lcotton,35,5 +pinkwool,35,6 +pinkcloth,35,6 +pinkcotton,35,6 +picloth,35,6 +piwool,35,6 +picotton,35,6 +darkgraywool,35,7 +darkgraycloth,35,7 +darkgraycotton,35,7 +darkgreywool,35,7 +darkgreycloth,35,7 +darkgreycotton,35,7 +dgraycloth,35,7 +dgraywool,35,7 +dgraycotton,35,7 +dgreycloth,35,7 +dgreywool,35,7 +dgreycotton,35,7 +darkgracloth,35,7 +darkgrawool,35,7 +darkgracotton,35,7 +dgracloth,35,7 +dgrawool,35,7 +dgracotton,35,7 +graycloth,35,7 +graywool,35,7 +graycotton,35,7 +greycloth,35,7 +greywool,35,7 +greycotton,35,7 +gracloth,35,7 +grawool,35,7 +gracotton,35,7 +lightgraywool,35,8 +lightgraycloth,35,8 +lightgraycotton,35,8 +lgraycloth,35,8 +lgraywool,35,8 +lgraycotton,35,8 +lightgreywool,35,8 +lightgreycloth,35,8 +lightgreycotton,35,8 +lgreycloth,35,8 +lgreywool,35,8 +lgreycotton,35,8 +lightgracloth,35,8 +lightgrawool,35,8 +lightgracotton,35,8 +lgracloth,35,8 +lgrawool,35,8 +lgracotton,35,8 +silvercloth,35,8 +silverwool,35,8 +silvercotton,35,8 +sicloth,35,8 +siawool,35,8 +siacotton,35,8 +cyanwool,35,9 +cyancloth,35,9 +cyancotton,35,9 +ccloth,35,9 +cwool,35,9 +ccotton,35,9 +purplewool,35,10 +purplecloth,35,10 +purplecotton,35,10 +pucloth,35,10 +puwool,35,10 +pucotton,35,10 +bluewool,35,11 +bluecloth,35,11 +bluecotton,35,11 +blucloth,35,11 +bluwool,35,11 +blucotton,35,11 +brownwool,35,12 +browncloth,35,12 +browncotton,35,12 +brocloth,35,12 +browool,35,12 +brocotton,35,12 +darkgreenwool,35,13 +darkgreencloth,35,13 +darkgreencotton,35,13 +dgreencloth,35,13 +dgreenwool,35,13 +dgreencotton,35,13 +greencloth,35,13 +greenwool,35,13 +greencotton,35,13 +darkgrecloth,35,13 +darkgrewool,35,13 +darkgrecotton,35,13 +dgrecloth,35,13 +dgrewool,35,13 +dgrecotton,35,13 +grecloth,35,13 +grewool,35,13 +grecotton,35,13 +redwool,35,14 +redcloth,35,14 +redcotton,35,14 +rcloth,35,14 +rwool,35,14 +rcotton,35,14 +blackwool,35,15 +blackcloth,35,15 +blackcotton,35,15 +blacloth,35,15 +blawool,35,15 +blacotton,35,15 +dandelion,37,0 +yellowdandelion,37,0 +ydandelion,37,0 +yellowflower,37,0 +yflower,37,0 +flower,37,0 +rose,38,0 +redrose,38,0 +rrose,38,0 +redflower,38,0 +rflower,38,0 +poppy,38,0 +redpoppy,38,0 +blueorchid,38,1 +cyanorchid,38,1 +lightblueorchid,38,1 +lblueorchid,38,1 +orchid,38,1 +allium,38,2 +magentaallium,38,2 +azurebluet,38,3 +whiteazurebluet,38,3 +abluet,38,3 +azureb,38,3 +houstonia,38,3 +redtulip,38,4 +tulipred,38,4 +rtulip,38,4 +tulipr,38,4 +orangetulip,38,5 +tuliporange,38,5 +otulip,38,5 +tulipo,38,5 +whitetulip,38,6 +tulipwhite,38,6 +wtulip,38,6 +tulipw,38,6 +pinktulip,38,7 +tulippink,38,7 +ptulip,38,7 +tulipp,38,7 +oxeye,38,8 +daisy,38,8 +oxeyedaisy,38,8 +daisyoxeye,38,8 +moondaisy,38,8 +daisymoon,38,8 +lightgrayoxeye,38,8 +lgrayoxeye,38,8 +lightgreyoxeye,38,8 +lgreyoxeye,38,8 +brownmushroom,39,0 +brownshroom,39,0 +brownmush,39,0 +bmushroom,39,0 +bshroom,39,0 +bmush,39,0 +redmushroom,40,0 +redshroom,40,0 +redmush,40,0 +rmushroom,40,0 +rshroom,40,0 +rmush,40,0 +goldblock,41,0 +blockgold,41,0 +gblock,41,0 +blockg,41,0 +ironblock,42,0 +steelblock,42,0 +blockiron,42,0 +blocksteel,42,0 +iblock,42,0 +stblock,42,0 +blocki,42,0 +blockst,42,0 +stonedoublestep,43,0 +stonedstep,43,0 +sdoublestep,43,0 +sdstep,43,0 +doublestonestep,43,0 +dstonestep,43,0 +doublesstep,43,0 +doublestep,43,0 +dstep,43,0 +stonedoubleslab,43,0 +stonedslab,43,0 +sdoubleslab,43,0 +sdslab,43,0 +doublestoneslab,43,0 +dstoneslab,43,0 +doublesslab,43,0 +doubleslab,43,0 +dslab,43,0 +stonedoublehalfblock,43,0 +stonedhalfblock,43,0 +sdoublehalfblock,43,0 +sdhalfblock,43,0 +doublestonehalfblock,43,0 +dstonehalfblock,43,0 +doubleshalfblock,43,0 +doublehalfblock,43,0 +dhalfblock,43,0 +sandstonedoublestep,43,1 +sandstonedstep,43,1 +sstonedoublestep,43,1 +sstonedstep,43,1 +ssdoublestep,43,1 +ssdstep,43,1 +doublesandstonestep,43,1 +dsandstonestep,43,1 +doublesstonestep,43,1 +dsstonestep,43,1 +doublessstep,43,1 +dsstep,43,1 +sandstonedoubleslab,43,1 +sandstonedslab,43,1 +sstonedoubleslab,43,1 +sstonedslab,43,1 +ssdoubleslab,43,1 +ssdslab,43,1 +doublesandstoneslab,43,1 +dsandstoneslab,43,1 +doublesstoneslab,43,1 +dsstoneslab,43,1 +doublessslab,43,1 +dsslab,43,1 +sandstonedoublehalfblock,43,1 +sandstonedhalfblock,43,1 +sstonedoublehalfblock,43,1 +sstonedhalfblock,43,1 +ssdoublehalfblock,43,1 +ssdhalfblock,43,1 +doublesandstonehalfblock,43,1 +dsandstonehalfblock,43,1 +doublesstonehalfblock,43,1 +dsstonehalfblock,43,1 +doublesshalfblock,43,1 +dsshalfblock,43,1 +plankstonedoublestep,43,2 +woodenstonedoublestep,43,2 +woodenstonedstep,43,2 +woodstonedoublestep,43,2 +woodstonedstep,43,2 +wstonedoublestep,43,2 +wstonedstep,43,2 +doublewoodenstonestep,43,2 +dwoodenstonestep,43,2 +doublewoodstonestep,43,2 +dwoodstonestep,43,2 +doublewstonestep,43,2 +dwstonestep,43,2 +woodenstonedoubleslab,43,2 +woodenstonedslab,43,2 +woodstonedoubleslab,43,2 +woodstonedslab,43,2 +wstonedoubleslab,43,2 +wstonedslab,43,2 +doublewoodenstoneslab,43,2 +dwoodenstoneslab,43,2 +doublewoodstoneslab,43,2 +dwoodstoneslab,43,2 +doublewstoneslab,43,2 +dwstoneslab,43,2 +woodenstonedoublehalfblock,43,2 +woodenstonedhalfblock,43,2 +woodstonedoublehalfblock,43,2 +woodstonedhalfblock,43,2 +wstonedoublehalfblock,43,2 +wstonedhalfblock,43,2 +doublewoodenstonehalfblock,43,2 +dwoodenstonehalfblock,43,2 +doublewoodstonehalfblock,43,2 +dwoodstonehalfblock,43,2 +doublewstonehalfblock,43,2 +dwstonehalfblock,43,2 +cobblestonedoublestep,43,3 +cobblestonedstep,43,3 +cobbledoublestep,43,3 +cobbledstep,43,3 +cstonedoublestep,43,3 +cstonedstep,43,3 +csdoublestep,43,3 +csdstep,43,3 +doublecobblestonestep,43,3 +dcobblestonestep,43,3 +doublecobblestep,43,3 +dcobblestep,43,3 +doublecstonestep,43,3 +dcstonestep,43,3 +doublecsstep,43,3 +dcsstep,43,3 +cobblestonedoubleslab,43,3 +cobblestonedslab,43,3 +cobbledoubleslab,43,3 +cobbledslab,43,3 +cstonedoubleslab,43,3 +cstonedslab,43,3 +csdoubleslab,43,3 +csdslab,43,3 +doublecobblestoneslab,43,3 +dcobblestoneslab,43,3 +doublecobbleslab,43,3 +dcobbleslab,43,3 +doublecstoneslab,43,3 +dcstoneslab,43,3 +doublecsslab,43,3 +dcsslab,43,3 +cobblestonedoublehalfblock,43,3 +cobblestonedhalfblock,43,3 +cobbledoublehalfblock,43,3 +cobbledhalfblock,43,3 +cstonedoublehalfblock,43,3 +cstonedhalfblock,43,3 +csdoublehalfblock,43,3 +csdhalfblock,43,3 +doublecobblestonehalfblock,43,3 +dcobblestonehalfblock,43,3 +doublecobblehalfblock,43,3 +dcobblehalfblock,43,3 +doublecstonehalfblock,43,3 +dcstonehalfblock,43,3 +doublecshalfblock,43,3 +dcshalfblock,43,3 +brickdoublestep,43,4 +brickdstep,43,4 +bdoublestep,43,4 +bdstep,43,4 +brickdoubleslab,43,4 +brickdslab,43,4 +bdoubleslab,43,4 +bdslab,43,4 +doublebrickstep,43,4 +dbrickstep,43,4 +doublebstep,43,4 +dbstep,43,4 +doublebrickslab,43,4 +dbrickslab,43,4 +doublebslab,43,4 +dbslab,43,4 +brickdoublehalfblock,43,4 +brickdhalfblock,43,4 +bdoublehalfblock,43,4 +bdhalfblock,43,4 +doublebrickhalfblock,43,4 +dbrickhalfblock,43,4 +doublebhalfblock,43,4 +dbhalfblock,43,4 +stonebrickdoublestep,43,5 +stonebrickdstep,43,5 +stonebdoublestep,43,5 +stonebdstep,43,5 +sbrickdoublestep,43,5 +sbrickdstep,43,5 +sbdoublestep,43,5 +sbdstep,43,5 +stonebrickdoubleslab,43,5 +stonebrickdslab,43,5 +stonebdoubleslab,43,5 +stonebdslab,43,5 +sbrickdoubleslab,43,5 +sbrickdslab,43,5 +sbdoubleslab,43,5 +sbdslab,43,5 +doublestonebrickstep,43,5 +dstonebrickstep,43,5 +doublestonebstep,43,5 +dstonebstep,43,5 +doublesbrickstep,43,5 +dsbrickstep,43,5 +doublesbstep,43,5 +dsbstep,43,5 +doublestonebrickslab,43,5 +dstonebrickslab,43,5 +doublestonebslab,43,5 +dstonebslab,43,5 +doublesbrickslab,43,5 +dsbrickdslab,43,5 +doublesbslab,43,5 +dsbslab,43,5 +stonebrickdoublehalfblock,43,5 +stonebrickdhalfblock,43,5 +stonebdoublehalfblock,43,5 +stonebdhalfblock,43,5 +sbrickdoublehalfblock,43,5 +sbrickdhalfblock,43,5 +sbdoublehalfblock,43,5 +sbdhalfblock,43,5 +doublestonebrickhalfblock,43,5 +dstonebrickhalfblock,43,5 +doublestonebhalfblock,43,5 +dstonebhalfblock,43,5 +doublesbrickhalfblock,43,5 +dsbrickhalfblock,43,5 +doublesbhalfblock,43,5 +dsbhalfblock,43,5 +netherbrickdoubleslab,43,6 +hellbrickdoubleslab,43,6 +nbrickdoubleslab,43,6 +hbrickdoubleslab,43,6 +netherdoubleslab,43,6 +helldoubleslab,43,6 +nbdoubleslab,43,6 +hbdoubleslab,43,6 +hdoubleslab,43,6 +ndoubleslab,43,6 +netherbrickdoublestep,43,6 +hellbrickdoublestep,43,6 +nbrickdoublestep,43,6 +hbrickdoublestep,43,6 +netherdoublestep,43,6 +helldoublestep,43,6 +nbdoublestep,43,6 +hbdoublestep,43,6 +ndoublestep,43,6 +hdoublestep,43,6 +netherbrickdoublehalfblock,43,6 +hellbrickdoublehalfblock,43,6 +nbrickdoublehalfblock,43,6 +hbrickdoublehalfblock,43,6 +netherdoublehalfblock,43,6 +helldoublehalfblock,43,6 +nbdoublehalfblock,43,6 +hbdoublehalfblock,43,6 +ndoublehalfblock,43,6 +hdoublehalfblock,43,6 +netherbrickdslab,43,6 +hellbrickdslab,43,6 +nbrickdslab,43,6 +hbrickdslab,43,6 +netherdslab,43,6 +helldslab,43,6 +nbdslab,43,6 +hbdslab,43,6 +hdslab,43,6 +ndslab,43,6 +netherbrickdstep,43,6 +hellbrickdstep,43,6 +nbrickdstep,43,6 +hbrickdstep,43,6 +netherdstep,43,6 +helldstep,43,6 +nbdstep,43,6 +hbdstep,43,6 +ndstep,43,6 +hdstep,43,6 +netherbrickdhalfblock,43,6 +hellbrickdhalfblock,43,6 +nbrickdhalfblock,43,6 +hbrickdhalfblock,43,6 +netherdhalfblock,43,6 +helldhalfblock,43,6 +nbdhalfblock,43,6 +hbdhalfblock,43,6 +ndhalfblock,43,6 +hdhalfblock,43,6 +doublenetherbrickslab,43,6 +doublehellbrickslab,43,6 +doublenbrickslab,43,6 +doublehbrickslab,43,6 +doublenetherslab,43,6 +doublehellslab,43,6 +doublenbslab,43,6 +doublehbslab,43,6 +doublehslab,43,6 +doublenslab,43,6 +doublenetherbrickstep,43,6 +doublehellbrickstep,43,6 +doublenbrickstep,43,6 +doublehbrickstep,43,6 +doublenetherstep,43,6 +doublehellstep,43,6 +doublenbstep,43,6 +doublehbstep,43,6 +doublenstep,43,6 +doublehstep,43,6 +doublenetherbrickhalfblock,43,6 +doublehellbrickhalfblock,43,6 +doublenbrickhalfblock,43,6 +doublehbrickhalfblock,43,6 +doublenetherhalfblock,43,6 +doublehellhalfblock,43,6 +doublenbhalfblock,43,6 +doublehbhalfblock,43,6 +doublenhalfblock,43,6 +doublehhalfblock,43,6 +dnetherbrickslab,43,6 +dhellbrickslab,43,6 +dnbrickslab,43,6 +dhbrickslab,43,6 +dnetherslab,43,6 +dhellslab,43,6 +dnbslab,43,6 +dhbslab,43,6 +dhslab,43,6 +dnslab,43,6 +dnetherbrickstep,43,6 +dhellbrickstep,43,6 +dnbrickstep,43,6 +dhbrickstep,43,6 +dnetherstep,43,6 +dhellstep,43,6 +dnbstep,43,6 +dhbstep,43,6 +dnstep,43,6 +dhstep,43,6 +dnetherbrickhalfblock,43,6 +dhellbrickhalfblock,43,6 +dnbrickhalfblock,43,6 +dhbrickhalfblock,43,6 +dnetherhalfblock,43,6 +dhellhalfblock,43,6 +dnbhalfblock,43,6 +dhbhalfblock,43,6 +dnhalfblock,43,6 +dhhalfblock,43,6 +netherquartzdoublestep,43,7 +hellquartzdoublestep,43,7 +deathquartzdoublestep,43,7 +nquartzdoublestep,43,7 +hquartzdoublestep,43,7 +dquartzdoublestep,43,7 +quartzdoublestep,43,7 +nqdoublestep,43,7 +hqdoublestep,43,7 +dqdoublestep,43,7 +qdoublestep,43,7 +netherquartzdoubleslab,43,7 +hellquartzdoubleslab,43,7 +deathquartzdoubleslab,43,7 +nquartzdoubleslab,43,7 +hquartzdoubleslab,43,7 +dquartzdoubleslab,43,7 +quartzdoubleslab,43,7 +nqdoubleslab,43,7 +hqdoubleslab,43,7 +dqdoubleslab,43,7 +qdoubleslab,43,7 +netherquartzdoublehalfblock,43,7 +hellquartzdoublehalfblock,43,7 +deathquartzdoublehalfblock,43,7 +nquartzdoublehalfblock,43,7 +hquartzdoublehalfblock,43,7 +dquartzdoublehalfblock,43,7 +quartzdoublehalfblock,43,7 +nqdoublehalfblock,43,7 +hqdoublehalfblock,43,7 +dqdoublehalfblock,43,7 +qdoublehalfblock,43,7 +netherquartzdslab,43,7 +hellquartzdslab,43,7 +deathquartzdslab,43,7 +nquartzdslab,43,7 +hquartzdslab,43,7 +dquartzdslab,43,7 +quartzdslab,43,7 +nqdslab,43,7 +hqdslab,43,7 +dqdslab,43,7 +qdslab,43,7 +netherquartzdstep,43,7 +hellquartzdstep,43,7 +deathquartzdstep,43,7 +nquartzdstep,43,7 +hquartzdstep,43,7 +dquartzdstep,43,7 +quartzdstep,43,7 +nqdstep,43,7 +hqdstep,43,7 +dqdstep,43,7 +qdstep,43,7 +netherquartzdhalfblock,43,7 +hellquartzdhalfblock,43,7 +deathquartzdhalfblock,43,7 +nquartzdhalfblock,43,7 +hquartzdhalfblock,43,7 +dquartzdhalfblock,43,7 +quartzdhalfblock,43,7 +nqdhalfblock,43,7 +hqdhalfblock,43,7 +dqdhalfblock,43,7 +qdhalfblock,43,7 +doublenetherquartzslab,43,7 +doublehellquartzslab,43,7 +doubledeathquartzslab,43,7 +doublenquartzslab,43,7 +doublehquartzslab,43,7 +doubledquartzslab,43,7 +doublequartzslab,43,7 +doublenqslab,43,7 +doublehqslab,43,7 +doubledqslab,43,7 +doubleqslab,43,7 +doublenetherquartzstep,43,7 +doublehellquartzstep,43,7 +doubledeathquartzstep,43,7 +doublenquartzstep,43,7 +doublehquartzstep,43,7 +doubledquartzstep,43,7 +doublequartzstep,43,7 +doublenqstep,43,7 +doublehqstep,43,7 +doubledqstep,43,7 +doubleqstep,43,7 +doublenetherquartzhalfblock,43,7 +doublehellquartzhalfblock,43,7 +doubledeathquartzhalfblock,43,7 +doublenquartzhalfblock,43,7 +doublehquartzhalfblock,43,7 +doubledquartzhalfblock,43,7 +doublequartzhalfblock,43,7 +doublenqhalfblock,43,7 +doublehqhalfblock,43,7 +doubledqhalfblock,43,7 +doubleqhalfblock,43,7 +dnetherquartzslab,43,7 +dhellquartzslab,43,7 +ddeathquartzslab,43,7 +dnquartzslab,43,7 +dhquartzslab,43,7 +ddquartzslab,43,7 +dnqslab,43,7 +dhqslab,43,7 +ddqslab,43,7 +dnetherquartzstep,43,7 +dhellquartzstep,43,7 +ddeathquartzstep,43,7 +dnquartzstep,43,7 +dhquartzstep,43,7 +ddquartzstep,43,7 +dnqstep,43,7 +dhqstep,43,7 +ddqstep,43,7 +dnetherquartzhalfblock,43,7 +dhellquartzhalfblock,43,7 +ddeathquartzhalfblock,43,7 +dnquartzhalfblock,43,7 +dhquartzhalfblock,43,7 +ddquartzhalfblock,43,7 +dnqhalfblock,43,7 +dhqhalfblock,43,7 +ddqhalfblock,43,7 +smoothstonedoubleslab,43,8 +smoothstonedoublestep,43,8 +smoothstonedoublehalfblock,43,8 +smoothstonedslab,43,8 +smoothstonedstep,43,8 +smoothstonedhalfblock,43,8 +doublesmoothstoneslab,43,8 +doublesmoothstonestep,43,8 +doublesmoothstonehalfblock,43,8 +dsmoothstoneslab,43,8 +dsmoothstonestep,43,8 +dsmoothstonehalfblock,43,8 +smoothsandstonedoubleslab,43,9 +ssandstonedoubleslab,43,9 +ssstonedoubleslab,43,9 +sssdoubleslab,43,9 +smoothsandstonedoublestep,43,9 +ssandstonedoublestep,43,9 +ssstonedoublestep,43,9 +sssdoublestep,43,9 +smoothsandstonedoublehalfblock,43,9 +ssandstonedoublehalfblock,43,9 +ssstonedoublehalfblock,43,9 +sssdoublehalfblock,43,9 +smoothsandstonedslab,43,9 +ssandstonedslab,43,9 +ssstonedslab,43,9 +sssdslab,43,9 +smoothsandstonedstep,43,9 +ssandstonedstep,43,9 +ssstonedstep,43,9 +sssdstep,43,9 +smoothsandstonedhalfblock,43,9 +ssandstonedhalfblock,43,9 +ssstonedhalfblock,43,9 +sssdhalfblock,43,9 +doublesmoothsandstoneslab,43,9 +doublessandstoneslab,43,9 +doublessstoneslab,43,9 +doublesssslab,43,9 +doublesmoothsandstonestep,43,9 +doublessandstonestep,43,9 +doublessstonestep,43,9 +doublesssstep,43,9 +doublesmoothsandstonehalfblock,43,9 +doublessandstonehalfblock,43,9 +doublessstonehalfblock,43,9 +doublessshalfblock,43,9 +dsmoothsandstoneslab,43,9 +dssandstoneslab,43,9 +dssstoneslab,43,9 +dsssslab,43,9 +dsmoothsandstonestep,43,9 +dssandstonestep,43,9 +dssstonestep,43,9 +dsssstep,43,9 +dsmoothsandstonehalfblock,43,9 +dssandstonehalfblock,43,9 +dssstonehalfblock,43,9 +dssshalfblock,43,9 +smoothstonestep,44,0 +stonestep,44,0 +sstep,44,0 +step,44,0 +smoothstoneslab,44,0 +stoneslab,44,0 +sslab,44,0 +slab,44,0 +smoothstonehalfblock,44,0 +stonehalfblock,44,0 +shalfblock,44,0 +halfblock,44,0 +sandstonestep,44,1 +sstonestep,44,1 +ssstep,44,1 +sandstoneslab,44,1 +sstoneslab,44,1 +ssslab,44,1 +sandstonehalfblock,44,1 +sstonehalfblock,44,1 +sshalfblock,44,1 +woodenstonestep,44,2 +woodstonestep,44,2 +wstonestep,44,2 +woodenstoneslab,44,2 +woodstoneslab,44,2 +wstoneslab,44,2 +woodenstonehalfblock,44,2 +woodstonehalfblock,44,2 +wstonehalfblock,44,2 +cobblestonestep,44,3 +cobblestep,44,3 +cstonestep,44,3 +csstep,44,3 +cobblestoneslab,44,3 +cobbleslab,44,3 +cstoneslab,44,3 +csslab,44,3 +cobblestonehalfblock,44,3 +cobblehalfblock,44,3 +cstonehalfblock,44,3 +cshalfblock,44,3 +brickstep,44,4 +bstep,44,4 +brickslab,44,4 +bslab,44,4 +brickhalfblock,44,4 +bhalfblock,44,4 +stonebrickstep,44,5 +stonebstep,44,5 +sbrickstep,44,5 +sbstep,44,5 +stonebrickslab,44,5 +stonebslab,44,5 +sbrickslab,44,5 +sbslab,44,5 +stonebrickhalfblock,44,5 +stonebhalfblock,44,5 +sbrickhalfblock,44,5 +sbhalfblock,44,5 +netherbrickslab,44,6 +hellbrickslab,44,6 +nbrickslab,44,6 +hbrickslab,44,6 +netherslab,44,6 +hellslab,44,6 +nbslab,44,6 +hbslab,44,6 +hslab,44,6 +nslab,44,6 +netherbrickstep,44,6 +hellbrickstep,44,6 +nbrickstep,44,6 +hbrickstep,44,6 +netherstep,44,6 +hellstep,44,6 +nbstep,44,6 +hbstep,44,6 +nstep,44,6 +hstep,44,6 +netherbrickhalfblock,44,6 +hellbrickhalfblock,44,6 +nbrickhalfblock,44,6 +hbrickhalfblock,44,6 +netherhalfblock,44,6 +hellhalfblock,44,6 +nbhalfblock,44,6 +hbhalfblock,44,6 +nhalfblock,44,6 +hhalfblock,44,6 +netherquartzstep,44,7 +hellquartzstep,44,7 +deathquartzstep,44,7 +nquartzstep,44,7 +hquartzstep,44,7 +dquartzstep,44,7 +quartzstep,44,7 +nqstep,44,7 +hqstep,44,7 +dqstep,44,7 +qstep,44,7 +netherquartzslab,44,7 +hellquartzslab,44,7 +deathquartzslab,44,7 +nquartzslab,44,7 +hquartzslab,44,7 +dquartzslab,44,7 +quartzslab,44,7 +nqslab,44,7 +hqslab,44,7 +dqslab,44,7 +qslab,44,7 +netherquartzhalfblock,44,7 +hellquartzhalfblock,44,7 +deathquartzhalfblock,44,7 +nquartzhalfblock,44,7 +hquartzhalfblock,44,7 +dquartzhalfblock,44,7 +quartzhalfblock,44,7 +nqhalfblock,44,7 +hqhalfblock,44,7 +dqhalfblock,44,7 +qhalfblock,44,7 +brickblock,45,0 +blockbrick,45,0 +bblock,45,0 +blockb,45,0 +tnt,46,0 +tntblock,46,0 +blocktnt,46,0 +bombblock,46,0 +blockbomb,46,0 +dynamiteblock,46,0 +blockdynamite,46,0 +bomb,46,0 +dynamite,46,0 +bookcase,47,0 +casebook,47,0 +bookshelf,47,0 +shelfbook,47,0 +bookblock,47,0 +blockbook,47,0 +mossycobblestone,48,0 +mosscobblestone,48,0 +mcobblestone,48,0 +mossycobble,48,0 +mosscobble,48,0 +mcobble,48,0 +mossstone,48,0 +mossystone,48,0 +mstone,48,0 +obsidian,49,0 +obsi,49,0 +obby,49,0 +torch,50,0 +burningstick,50,0 +burnstick,50,0 +fire,51,0 +flame,51,0 +flames,51,0 +mobspawner,52,0 +mobcage,52,0 +monsterspawner,52,0 +monstercage,52,0 +mspawner,52,0 +mcage,52,0 +spawner,52,0 +cage,52,0 +woodenstairs,53,0 +woodstairs,53,0 +wstairs,53,0 +woodenstair,53,0 +woodstair,53,0 +wstair,53,0 +chest,54,0 +container,54,0 +diamondore,56,0 +crystalore,56,0 +orediamond,56,0 +orecrystal,56,0 +dore,56,0 +ored,56,0 +diamondblock,57,0 +blockdiamond,57,0 +crystalblock,57,0 +blockcrystal,57,0 +dblock,57,0 +blockd,57,0 +workbench,58,0 +craftingbench,58,0 +crafterbench,58,0 +craftbench,58,0 +worktable,58,0 +craftingtable,58,0 +craftertable,58,0 +crafttable,58,0 +wbench,58,0 +cbench,58,0 +soil,60,0 +furnace,61,0 +litfurnace,62,0 +lfurnace,62,0 +burningfurnace,62,0 +burnfurnace,62,0 +bfurnace,62,0 +ladder,65,0 +minecarttrack,66,0 +minecartrails,66,0 +minecartrail,66,0 +mcarttrack,66,0 +mcartrails,66,0 +mcartrail,66,0 +mctrack,66,0 +mcrails,66,0 +mcrail,66,0 +track,66,0 +rails,66,0 +rail,66,0 +cobblestonestairs,67,0 +cstonestairs,67,0 +stonestairs,67,0 +cobblestairs,67,0 +csstairs,67,0 +sstairs,67,0 +cstairs,67,0 +cobblestonestair,67,0 +cstonestair,67,0 +stonestair,67,0 +cobblestair,67,0 +csstair,67,0 +sstair,67,0 +cstair,67,0 +lever,69,0 +stonepressureplate,70,0 +stonepressplate,70,0 +stonepplate,70,0 +stoneplate,70,0 +spressureplate,70,0 +spressplate,70,0 +spplate,70,0 +splate,70,0 +smoothstonepressureplate,70,0 +smoothstonepressplate,70,0 +smoothstonepplate,70,0 +smoothstoneplate,70,0 +sstonepressureplate,70,0 +sstonepressplate,70,0 +sstonepplate,70,0 +sstoneplate,70,0 +woodenpressureplate,72,0 +woodenpressplate,72,0 +woodenpplate,72,0 +woodenplate,72,0 +woodpressureplate,72,0 +woodpressplate,72,0 +woodpplate,72,0 +woodplate,72,0 +wpressureplate,72,0 +wpressplate,72,0 +wpplate,72,0 +wplate,72,0 +redstoneore,73,0 +redsore,73,0 +redore,73,0 +rstoneore,73,0 +rsore,73,0 +rore,73,0 +oreredstone,73,0 +orereds,73,0 +orered,73,0 +orerstone,73,0 +orers,73,0 +orer,73,0 +redstonetorch,76,0 +rstonetorch,76,0 +redstorch,76,0 +redtorch,76,0 +rstorch,76,0 +stonebutton,77,0 +smoothstonebutton,77,0 +sstonebutton,77,0 +sbutton,77,0 +button,77,0 +snowcover,78,0 +snowcovering,78,0 +scover,78,0 +ice,79,0 +frozenwater,79,0 +waterfrozen,79,0 +freezewater,79,0 +waterfreeze,79,0 +snowblock,80,0 +blocksnow,80,0 +sblock,80,0 +blocks,80,0 +cactus,81,0 +cactuses,81,0 +cacti,81,0 +clayblock,82,0 +blockclay,82,0 +cblock,82,0 +blockc,82,0 +jukebox,84,0 +jbox,84,0 +woodenfence,85,0 +fence,85,0 +woodfence,85,0 +wfence,85,0 +fencewooden,85,0 +fencewood,85,0 +fencew,85,0 +pumpkin,86,0 +netherrack,87,0 +netherrock,87,0 +netherstone,87,0 +hellrack,87,0 +hellrock,87,0 +hellstone,87,0 +deathrack,87,0 +deathrock,87,0 +deathstone,87,0 +nrack,87,0 +nrock,87,0 +nstone,87,0 +hrack,87,0 +hrock,87,0 +hstone,87,0 +drack,87,0 +drock,87,0 +dstone,87,0 +soulsand,88,0 +slowsand,88,0 +slowmud,88,0 +ssand,88,0 +smud,88,0 +mud,88,0 +glowstone,89,0 +glowingstoneblock,89,0 +lightstoneblock,89,0 +glowstoneblock,89,0 +blockglowingstone,89,0 +blocklightstone,89,0 +blockglowstone,89,0 +glowingstone,89,0 +lightstone,89,0 +glowingblock,89,0 +lightblock,89,0 +glowblock,89,0 +lstone,89,0 +gstone,89,0 +portal,90,0 +jackolantern,91,0 +pumpkinlantern,91,0 +glowingpumpkin,91,0 +lightpumpkin,91,0 +jpumpkin,91,0 +plantren,91,0 +glowpumpkin,91,0 +gpumpkin,91,0 +lpumpkin,91,0 +lockedchest,95,0 +lockchest,95,0 +jokechest,95,0 +whiteglass,95,0 +whitesglass,95,0 +whitestainedglass,95,0 +wglass,95,0 +wsglass,95,0 +wstainedglass,95,0 +sglass,95,0 +stainedglass,95,0 +orangeglass,95,1 +orangesglass,95,1 +orangestainedglass,95,1 +oglass,95,1 +osglass,95,1 +ostainedglass,95,1 +magentaglass,95,2 +magentasglass,95,2 +magentastainedglass,95,2 +mglass,95,2 +msglass,95,2 +mstainedglass,95,2 +lightblueglass,95,3 +lightbluesglass,95,3 +lightbluestainedglass,95,3 +lblueglass,95,3 +lbluesglass,95,3 +lbluestainedglass,95,3 +lightbluglass,95,3 +lightblusglass,95,3 +lightblustainedglass,95,3 +lbluglass,95,3 +lblusglass,95,3 +lblustainedglass,95,3 +lbglass,95,3 +lbsglass,95,3 +lbstainedglass,95,3 +yellowglass,95,4 +yellowsglass,95,4 +yellowstainedglass,95,4 +yglass,95,4 +ysglass,95,4 +ystainedglass,95,4 +lightgreenglass,95,5 +lightgreensglass,95,5 +lightgreenstainedglass,95,5 +lgreenglass,95,5 +lgreensglass,95,5 +lgreenstainedglass,95,5 +lightgreglass,95,5 +lightgresglass,95,5 +lightgrestainedglass,95,5 +lgreglass,95,5 +lgresglass,95,5 +lgrestainedglass,95,5 +limeglass,95,5 +limesglass,95,5 +limestainedglass,95,5 +lglass,95,5 +lsglass,95,5 +lstainedglass,95,5 +pinkglass,95,6 +pinksglass,95,6 +pinkstainedglass,95,6 +piglass,95,6 +pisglass,95,6 +pistainedglass,95,6 +darkgrayglass,95,7 +darkgraysglass,95,7 +darkgraystainedglass,95,7 +dgrayglass,95,7 +dgraysglass,95,7 +dgraystainedglass,95,7 +darkgreyglass,95,7 +darkgreysglass,95,7 +darkgreystainedglass,95,7 +dgreyglass,95,7 +dgreysglass,95,7 +dgreystainedglass,95,7 +darkgraglass,95,7 +darkgrasglass,95,7 +darkgrastainedglass,95,7 +dgraglass,95,7 +dgrasglass,95,7 +dgrastainedglass,95,7 +grayglass,95,7 +graysglass,95,7 +graystainedglass,95,7 +greyglass,95,7 +greysglass,95,7 +greystainedglass,95,7 +graglass,95,7 +grasglass,95,7 +grastainedglass,95,7 +lightgrayglass,95,8 +lightgraysglass,95,8 +lightgraystainedglass,95,8 +lgrayglass,95,8 +lgraysglass,95,8 +lgraystainedglass,95,8 +lightgreyglass,95,8 +lightgreysglass,95,8 +lightgreystainedglass,95,8 +lgreyglass,95,8 +lgreysglass,95,8 +lgreystainedglass,95,8 +lightgraglass,95,8 +lightgrasglass,95,8 +lightgrastainedglass,95,8 +lgraglass,95,8 +lgrasglass,95,8 +lgrastainedglass,95,8 +silverglass,95,8 +silversglass,95,8 +silverstainedglass,95,8 +siglass,95,8 +siasglass,95,8 +siastainedglass,95,8 +cyanglass,95,9 +cyansglass,95,9 +cyanstainedglass,95,9 +cglass,95,9 +csglass,95,9 +cstainedglass,95,9 +purpleglass,95,10 +purplesglass,95,10 +purplestainedglass,95,10 +puglass,95,10 +pusglass,95,10 +pustainedglass,95,10 +blueglass,95,11 +bluesglass,95,11 +bluestainedglass,95,11 +bluglass,95,11 +blusglass,95,11 +blustainedglass,95,11 +brownglass,95,12 +brownsglass,95,12 +brownstainedglass,95,12 +broglass,95,12 +brosglass,95,12 +brostainedglass,95,12 +darkgreenglass,95,13 +darkgreensglass,95,13 +darkgreenstainedglass,95,13 +dgreenglass,95,13 +dgreensglass,95,13 +dgreenstainedglass,95,13 +greenglass,95,13 +greensglass,95,13 +greenstainedglass,95,13 +darkgreglass,95,13 +darkgresglass,95,13 +darkgrestainedglass,95,13 +dgreglass,95,13 +dgresglass,95,13 +dgrestainedglass,95,13 +greglass,95,13 +gresglass,95,13 +grestainedglass,95,13 +redglass,95,14 +redsglass,95,14 +redstainedglass,95,14 +rglass,95,14 +rsglass,95,14 +rstainedglass,95,14 +blackglass,95,15 +blacksglass,95,15 +blackstainedglass,95,15 +blaglass,95,15 +blasglass,95,15 +blastainedglass,95,15 +trapdoor,96,0 +doortrap,96,0 +hatch,96,0 +tdoor,96,0 +doort,96,0 +trapd,96,0 +dtrap,96,0 +silverfish,97,0 +silverfishsmoothstone,97,0 +silverfishsstone,97,0 +sfishsmoothstone,97,0 +sfishsstone,97,0 +fishsmoothstone,97,0 +fishsstone,97,0 +sfsmoothstone,97,0 +sfsstone,97,0 +trapsmoothstone,97,0 +trapsstone,97,0 +monsteregg,97,0 +monstereggsmoothstone,97,0 +monstereggsstone,97,0 +meggsmoothstone,97,0 +meggsstone,97,0 +mesmoothstone,97,0 +messtone,97,0 +silverfishcobblestone,97,1 +silverfishcstone,97,1 +sfishcobblestone,97,1 +sfishcstone,97,1 +fishcobblestone,97,1 +fishcstone,97,1 +sfcobblestone,97,1 +sfcstone,97,1 +trapcobblestone,97,1 +trapcstone,97,1 +monstereggcobblestone,97,1 +monstereggcstone,97,1 +meggcobblestone,97,1 +meggcstone,97,1 +mecobblestone,97,1 +mecstone,97,1 +silverfishstonebrick,97,2 +silverfishsbrick,97,2 +sfishstonebrick,97,2 +sfishsbrick,97,2 +fishstonebrick,97,2 +fishsbrick,97,2 +sfstonebrick,97,2 +sfsbrick,97,2 +trapstonebrick,97,2 +trapsbrick,97,2 +monstereggstonebrick,97,2 +monstereggsbrick,97,2 +meggstonebrick,97,2 +meggsbrick,97,2 +mestonebrick,97,2 +mesbrick,97,2 +silverfishmossystonebrick,97,3 +silverfishmossstonebrick,97,3 +silverfishmstonebrick,97,3 +silverfishmsbrick,97,3 +sfishmossystonebrick,97,3 +sfishmossstonebrick,97,3 +sfishmstonebrick,97,3 +sfishmsbrick,97,3 +fishmossystonebrick,97,3 +fishmossstonebrick,97,3 +fishmstonebrick,97,3 +fishmsbrick,97,3 +sfmossystonebrick,97,3 +sfmossstonebrick,97,3 +sfmstonebrick,97,3 +sfmsbrick,97,3 +trapmossystonebrick,97,3 +trapmossstonebrick,97,3 +trapmstonebrick,97,3 +trapmsbrick,97,3 +monstereggmossystonebrick,97,3 +monstereggmossstonebrick,97,3 +monstereggmstonebrick,97,3 +monstereggmsbrick,97,3 +meggmossystonebrick,97,3 +meggmossstonebrick,97,3 +meggmstonebrick,97,3 +meggmsbrick,97,3 +memossystonebrick,97,3 +memossstonebrick,97,3 +memstonebrick,97,3 +memsbrick,97,3 +silverfishcrackedstonebrick,97,4 +silverfishcrackstonebrick,97,4 +silverfishcrstonebrick,97,4 +silverfishcrsbrick,97,4 +sfishcrackedstonebrick,97,4 +sfishcrackstonebrick,97,4 +sfishcrstonebrick,97,4 +sfishcrsbrick,97,4 +fishcrackedstonebrick,97,4 +fishcrackstonebrick,97,4 +fishcrstonebrick,97,4 +fishcrsbrick,97,4 +sfcrackedstonebrick,97,4 +sfcrackstonebrick,97,4 +sfcrstonebrick,97,4 +sfcrsbrick,97,4 +trapcrackedstonebrick,97,4 +trapcrackstonebrick,97,4 +trapcrstonebrick,97,4 +trapcrsbrick,97,4 +monstereggcrackedstonebrick,97,4 +monstereggcrackstonebrick,97,4 +monstereggcrstonebrick,97,4 +monstereggcrsbrick,97,4 +meggcrackedstonebrick,97,4 +meggcrackstonebrick,97,4 +meggcrstonebrick,97,4 +meggcrsbrick,97,4 +mecrackedstonebrick,97,4 +mecrackstonebrick,97,4 +mecrstonebrick,97,4 +mecrsbrick,97,4 +silverfishcirclestonebrick,97,5 +silverfishcistonebrick,97,5 +silverfishcisbrick,97,5 +sfishcirclestonebrick,97,5 +sfishcistonebrick,97,5 +sfishcisbrick,97,5 +fishcirclestonebrick,97,5 +fishcistonebrick,97,5 +fishcisbrick,97,5 +sfcirclestonebrick,97,5 +sfcistonebrick,97,5 +sfcisbrick,97,5 +trapcirclestonebrick,97,5 +trapcistonebrick,97,5 +trapcisbrick,97,5 +monstereggcirclestonebrick,97,5 +monstereggcistonebrick,97,5 +monstereggcisbrick,97,5 +meggcirclestonebrick,97,5 +meggcistonebrick,97,5 +meggcisbrick,97,5 +mecirclestonebrick,97,5 +mecistonebrick,97,5 +mecisbrick,97,5 +stonebrick,98,0 +stonebricks,98,0 +stonebrickblock,98,0 +stonebb,98,0 +sbrick,98,0 +mossystonebrick,98,1 +mossystonebricks,98,1 +mossystonebrickblock,98,1 +mossystonebb,98,1 +mossstonebrick,98,1 +mossstonebricks,98,1 +mossstonebrickblock,98,1 +mossstonebb,98,1 +mstonebrick,98,1 +mstonebricks,98,1 +mstonebrickblock,98,1 +mstonebb,98,1 +mosssbrick,98,1 +mosssbricks,98,1 +mosssbrickblock,98,1 +mosssbb,98,1 +msbrick,98,1 +msbricks,98,1 +msbrickblock,98,1 +crackedstone,98,2 +crackedstonebrick,98,2 +crackedstonebricks,98,2 +crackedstonebrickblock,98,2 +crackedstonebb,98,2 +crackstonebrick,98,2 +crackstonebricks,98,2 +crackstonebrickblock,98,2 +crackstonebb,98,2 +crstonebrick,98,2 +crstonebricks,98,2 +crstonebrickblock,98,2 +crstonebb,98,2 +cracksbrick,98,2 +cracksbricks,98,2 +cracksbrickblock,98,2 +cracksbb,98,2 +crsbrick,98,2 +crsbricks,98,2 +crsbrickblock,98,2 +circlestone,98,3 +circlestonebrick,98,3 +circlestonebricks,98,3 +circlestonebrickblock,98,3 +circlestonebb,98,3 +cistonebrick,98,3 +cistonebricks,98,3 +cistonebrickblock,98,3 +cistonebb,98,3 +circlesbrick,98,3 +circlesbricks,98,3 +circlesbrickblock,98,3 +circlesbb,98,3 +cisbrick,98,3 +cisbricks,98,3 +cisbrickblock,98,3 +giantredmushroom,99,0 +hugeredmushroom,99,0 +bigredmushroom,99,0 +gredmushroom,99,0 +hredmushroom,99,0 +bredmushroom,99,0 +giantrmushroom,99,0 +hugermushroom,99,0 +bigrmushroom,99,0 +grmushroom,99,0 +hrmushroom,99,0 +brmushroom,99,0 +giantredmush,99,0 +hugeredmush,99,0 +bigredmush,99,0 +gredmush,99,0 +hredmush,99,0 +bredmush,99,0 +giantrmush,99,0 +hugermush,99,0 +bigrmush,99,0 +grmush,99,0 +hrmush,99,0 +brmush,99,0 +giantbrownmushroom,100,0 +hugebrownmushroom,100,0 +bigbrownmushroom,100,0 +gbrownmushroom,100,0 +hbrownmushroom,100,0 +bbrownmushroom,100,0 +giantbmushroom,100,0 +hugebmushroom,100,0 +bigbmushroom,100,0 +gbmushroom,100,0 +hbmushroom,100,0 +bbmushroom,100,0 +giantbrownmush,100,0 +hugebrownmush,100,0 +bigbrownmush,100,0 +gbrownmush,100,0 +hbrownmush,100,0 +bbrownmush,100,0 +giantbmush,100,0 +hugebmush,100,0 +bigbmush,100,0 +gbmush,100,0 +hbmush,100,0 +bbmush,100,0 +ironbars,101,0 +ironbarsb,101,0 +ironbarsblock,101,0 +ironfence,101,0 +metalbars,101,0 +metalbarsb,101,0 +metalbarsblock,101,0 +metalfence,101,0 +jailbars,101,0 +jailbarsb,101,0 +jailbarsblock,101,0 +jailfence,101,0 +mbars,101,0 +mbarsb,101,0 +mbarsblock,101,0 +mfence,101,0 +jbars,101,0 +jbarsb,101,0 +jbarsblock,101,0 +jfence,101,0 +ibars,101,0 +ibarsb,101,0 +ibarsblock,101,0 +ifence,101,0 +glasspane,102,0 +glassp,102,0 +paneglass,102,0 +pglass,102,0 +flatglass,102,0 +fglass,102,0 +skinnyglass,102,0 +glassflat,102,0 +glassf,102,0 +glassskinny,102,0 +glasss,102,0 +melon,103,0 +watermelon,103,0 +greenmelon,103,0 +melongreen,103,0 +melonblock,103,0 +watermelonblock,103,0 +greenmelonblock,103,0 +vines,106,0 +vine,106,0 +greenvines,106,0 +greenvine,106,0 +gardenvines,106,0 +gardenvine,106,0 +vinesgreen,106,0 +vinegreen,106,0 +vinesgarden,106,0 +vinegarden,106,0 +vinesg,106,0 +vineg,106,0 +gvines,106,0 +gvine,106,0 +woodgate,107,0 +woodenfencegate,107,0 +wfencegate,107,0 +woodfencegate,107,0 +woodengate,107,0 +wgate,107,0 +gate,107,0 +gardengate,107,0 +ggate,107,0 +fencegate,107,0 +fgate,107,0 +brickstairs,108,0 +redbrickstairs,108,0 +redbstairs,108,0 +rbrickstairs,108,0 +bstairs,108,0 +redstairs,108,0 +brickstair,108,0 +redbrickstair,108,0 +redbstair,108,0 +rbrickstair,108,0 +bstair,108,0 +redstair,108,0 +stonebrickstairs,109,0 +stonebstairs,109,0 +sbstairs,109,0 +cementbrickstairs,109,0 +cementstairs,109,0 +cementbstairs,109,0 +cbstairs,109,0 +greybrickstairs,109,0 +greybstairs,109,0 +greystairs,109,0 +mycelium,110,0 +purplegrass,110,0 +pinkgrass,110,0 +mycel,110,0 +swampgrass,110,0 +sgrass,110,0 +mushroomgrass,110,0 +mushgrass,110,0 +lilypad,111,0 +waterlily,111,0 +lily,111,0 +swamppad,111,0 +lpad,111,0 +wlily,111,0 +netherbrickblock,112,0 +hellbrickblock,112,0 +deathbrickblock,112,0 +nbrickblock,112,0 +hbrickblock,112,0 +dbrickblock,112,0 +netherbblock,112,0 +hellbblock,112,0 +deathbblock,112,0 +nbblock,112,0 +hbblock,112,0 +dbblock,112,0 +netherbrickfence,113,0 +hellbrickfence,113,0 +nbrickfence,113,0 +hbrickfence,113,0 +netherbfence,113,0 +hellbfence,113,0 +netherfence,113,0 +hellfence,113,0 +nbfence,113,0 +hbfence,113,0 +nfence,113,0 +hfence,113,0 +netherbrickstairs,114,0 +hellbrickstairs,114,0 +nbrickstairs,114,0 +hbrickstairs,114,0 +netherbstairs,114,0 +hellbstairs,114,0 +netherstairs,114,0 +hellstairs,114,0 +nbstairs,114,0 +hbstairs,114,0 +nstairs,114,0 +hstairs,114,0 +netherbrickstair,114,0 +hellbrickstair,114,0 +nbrickstair,114,0 +hbrickstair,114,0 +netherbstair,114,0 +hellbstair,114,0 +netherstair,114,0 +hellstair,114,0 +nbstair,114,0 +hbstair,114,0 +nstair,114,0 +hstair,114,0 +enchantmenttable,116,0 +enchantingtable,116,0 +enchanttable,116,0 +etable,116,0 +magicaltable,116,0 +magictable,116,0 +mtable,116,0 +enchantmentdesk,116,0 +enchantingdesk,116,0 +enchantdesk,116,0 +edesk,116,0 +magicaldesk,116,0 +magicdesk,116,0 +mdesk,116,0 +booktable,116,0 +bookdesk,116,0 +btable,116,0 +bdesk,116,0 +enderportal,119,0 +endergoo,119,0 +endgoo,119,0 +endportal,119,0 +egoo,119,0 +eportal,119,0 +enderportalframe,120,0 +endportalframe,120,0 +endgooframe,120,0 +endergooframe,120,0 +egooframe,120,0 +eportalframe,120,0 +enderframe,120,0 +endframe,120,0 +enderstone,121,0 +endstone,121,0 +endrock,121,0 +enderrock,121,0 +erock,121,0 +estone,121,0 +enderdragonegg,122,0 +endegg,122,0 +dragonegg,122,0 +degg,122,0 +bossegg,122,0 +begg,122,0 +redstonelamp,123,0 +redlamp,123,0 +rslamp,123,0 +woodendoublestep,125,0 +woodendstep,125,0 +wooddoublestep,125,0 +wooddstep,125,0 +wdoublestep,125,0 +wdstep,125,0 +doublewoodenstep,125,0 +dwoodenstep,125,0 +doublewoodstep,125,0 +dwoodstep,125,0 +doublewstep,125,0 +dwstep,125,0 +woodendoubleslab,125,0 +woodendslab,125,0 +wooddoubleslab,125,0 +wooddslab,125,0 +wdoubleslab,125,0 +wdslab,125,0 +doublewoodenslab,125,0 +dwoodenslab,125,0 +doublewoodslab,125,0 +dwoodslab,125,0 +doublewslab,125,0 +dwslab,125,0 +woodendoublehalfblock,125,0 +woodendhalfblock,125,0 +wooddoublehalfblock,125,0 +wooddhalfblock,125,0 +wdoublehalfblock,125,0 +wdhalfblock,125,0 +doublewoodenhalfblock,125,0 +dwoodenhalfblock,125,0 +doublewoodhalfblock,125,0 +dwoodhalfblock,125,0 +doublewhalfblock,125,0 +dwhalfblock,125,0 +oakwoodendoublehalfblock,125,0 +oakwoodendhalfblock,125,0 +oakwooddoublehalfblock,125,0 +oakwooddhalfblock,125,0 +oakwdoublehalfblock,125,0 +oakwdhalfblock,125,0 +oakdoublewoodenhalfblock,125,0 +oakdwoodenhalfblock,125,0 +oakdoublewoodhalfblock,125,0 +oakdwoodhalfblock,125,0 +oakdoublewhalfblock,125,0 +oakdwhalfblock,125,0 +oakdoublehalfblock,125,0 +oakdhalfblock,125,0 +odhalfblock,125,0 +oakwoodendoublestep,125,0 +oakwoodendstep,125,0 +oakwooddoublestep,125,0 +oakwooddstep,125,0 +oakwdoublestep,125,0 +oakwdstep,125,0 +oakdoublewoodenstep,125,0 +oakdwoodenstep,125,0 +oakdoublewoodstep,125,0 +oakdwoodstep,125,0 +oakdoublewstep,125,0 +oakdwstep,125,0 +oakdoublestep,125,0 +oakdstep,125,0 +odstep,125,0 +oakwoodendoubleslab,125,0 +oakwoodendslab,125,0 +oakwooddoubleslab,125,0 +oakwooddslab,125,0 +oakwdoubleslab,125,0 +oakwdslab,125,0 +oakdoublewoodenslab,125,0 +oakdwoodenslab,125,0 +oakdoublewoodslab,125,0 +oakdwoodslab,125,0 +oakdoublewslab,125,0 +oakdwslab,125,0 +oakdoubleslab,125,0 +oakdslab,125,0 +odslab,125,0 +sprucewoodendoublestep,125,1 +sprucewoodendstep,125,1 +sprucewooddoublestep,125,1 +sprucewooddstep,125,1 +sprucewdoublestep,125,1 +sprucewdstep,125,1 +sprucedoublewoodenstep,125,1 +sprucedwoodenstep,125,1 +sprucedoublewoodstep,125,1 +sprucedwoodstep,125,1 +sprucedoublewstep,125,1 +sprucedwstep,125,1 +sprucedoublestep,125,1 +sprucedstep,125,1 +sprucewoodendoubleslab,125,1 +sprucewoodendslab,125,1 +sprucewooddoubleslab,125,1 +sprucewooddslab,125,1 +sprucewdoubleslab,125,1 +sprucewdslab,125,1 +sprucedoublewoodenslab,125,1 +sprucedwoodenslab,125,1 +sprucedoublewoodslab,125,1 +sprucedwoodslab,125,1 +sprucedoublewslab,125,1 +sprucedwslab,125,1 +sprucedoubleslab,125,1 +sprucedslab,125,1 +sprucewoodendoublehalfblock,125,1 +sprucewoodendhalfblock,125,1 +sprucewooddoublehalfblock,125,1 +sprucewooddhalfblock,125,1 +sprucewdoublehalfblock,125,1 +sprucewdhalfblock,125,1 +sprucedoublewoodenhalfblock,125,1 +sprucedwoodenhalfblock,125,1 +sprucedoublewoodhalfblock,125,1 +sprucedwoodhalfblock,125,1 +sprucedoublewhalfblock,125,1 +sprucedwhalfblock,125,1 +sprucedoublehalfblock,125,1 +sprucedhalfblock,125,1 +darkwoodendoublestep,125,1 +darkwoodendstep,125,1 +darkwooddoublestep,125,1 +darkwooddstep,125,1 +darkwdoublestep,125,1 +darkwdstep,125,1 +darkdoublewoodenstep,125,1 +darkdwoodenstep,125,1 +darkdoublewoodstep,125,1 +darkdwoodstep,125,1 +darkdoublewstep,125,1 +darkdwstep,125,1 +darkdoublestep,125,1 +darkdstep,125,1 +ddstep,125,1 +darkwoodendoubleslab,125,1 +darkwoodendslab,125,1 +darkwooddoubleslab,125,1 +darkwooddslab,125,1 +darkwdoubleslab,125,1 +darkwdslab,125,1 +darkdoublewoodenslab,125,1 +darkdwoodenslab,125,1 +darkdoublewoodslab,125,1 +darkdwoodslab,125,1 +darkdoublewslab,125,1 +darkdwslab,125,1 +darkdoubleslab,125,1 +darkdslab,125,1 +ddslab,125,1 +darkwoodendoublehalfblock,125,1 +darkwoodendhalfblock,125,1 +darkwooddoublehalfblock,125,1 +darkwooddhalfblock,125,1 +darkwdoublehalfblock,125,1 +darkwdhalfblock,125,1 +darkdoublewoodenhalfblock,125,1 +darkdwoodenhalfblock,125,1 +darkdoublewoodhalfblock,125,1 +darkdwoodhalfblock,125,1 +darkdoublewhalfblock,125,1 +darkdwhalfblock,125,1 +darkdoublehalfblock,125,1 +darkdhalfblock,125,1 +ddhalfblock,125,1 +birchwoodendoublestep,125,2 +birchwoodendstep,125,2 +birchwooddoublestep,125,2 +birchwooddstep,125,2 +birchwdoublestep,125,2 +birchwdstep,125,2 +birchdoublewoodenstep,125,2 +birchdwoodenstep,125,2 +birchdoublewoodstep,125,2 +birchdwoodstep,125,2 +birchdoublewstep,125,2 +birchdwstep,125,2 +birchdoublestep,125,2 +birchdstep,125,2 +birchwoodendoubleslab,125,2 +birchwoodendslab,125,2 +birchwooddoubleslab,125,2 +birchwooddslab,125,2 +birchwdoubleslab,125,2 +birchwdslab,125,2 +birchdoublewoodenslab,125,2 +birchdwoodenslab,125,2 +birchdoublewoodslab,125,2 +birchdwoodslab,125,2 +birchdoublewslab,125,2 +birchdwslab,125,2 +birchdoubleslab,125,2 +birchdslab,125,2 +birchwoodendoublehalfblock,125,2 +birchwoodendhalfblock,125,2 +birchwooddoublehalfblock,125,2 +birchwooddhalfblock,125,2 +birchwdoublehalfblock,125,2 +birchwdhalfblock,125,2 +birchdoublewoodenhalfblock,125,2 +birchdwoodenhalfblock,125,2 +birchdoublewoodhalfblock,125,2 +birchdwoodhalfblock,125,2 +birchdoublewhalfblock,125,2 +birchdwhalfblock,125,2 +birchdoublehalfblock,125,2 +birchdhalfblock,125,2 +lightwoodendoublehalfblock,125,2 +lightwoodendhalfblock,125,2 +lightwooddoublehalfblock,125,2 +lightwooddhalfblock,125,2 +lightwdoublehalfblock,125,2 +lightwdhalfblock,125,2 +lightdoublewoodenhalfblock,125,2 +lightdwoodenhalfblock,125,2 +lightdoublewoodhalfblock,125,2 +lightdwoodhalfblock,125,2 +lightdoublewhalfblock,125,2 +lightdwhalfblock,125,2 +lightdoublehalfblock,125,2 +lightdhalfblock,125,2 +ldhalfblock,125,2 +lightwoodendoublestep,125,2 +lightwoodendstep,125,2 +lightwooddoublestep,125,2 +lightwooddstep,125,2 +lightwdoublestep,125,2 +lightwdstep,125,2 +lightdoublewoodenstep,125,2 +lightdwoodenstep,125,2 +lightdoublewoodstep,125,2 +lightdwoodstep,125,2 +lightdoublewstep,125,2 +lightdwstep,125,2 +lightdoublestep,125,2 +lightdstep,125,2 +ldstep,125,2 +lightwoodendoubleslab,125,2 +lightwoodendslab,125,2 +lightwooddoubleslab,125,2 +lightwooddslab,125,2 +lightwdoubleslab,125,2 +lightwdslab,125,2 +lightdoublewoodenslab,125,2 +lightdwoodenslab,125,2 +lightdoublewoodslab,125,2 +lightdwoodslab,125,2 +lightdoublewslab,125,2 +lightdwslab,125,2 +lightdoubleslab,125,2 +lightdslab,125,2 +ldslab,125,2 +junglewoodendoublestep,125,3 +junglewoodendstep,125,3 +junglewooddoublestep,125,3 +junglewooddstep,125,3 +junglewdoublestep,125,3 +junglewdstep,125,3 +jungledoublewoodenstep,125,3 +jungledwoodenstep,125,3 +jungledoublewoodstep,125,3 +jungledwoodstep,125,3 +jungledoublewstep,125,3 +jungledwstep,125,3 +jungledoublestep,125,3 +jungledstep,125,3 +jdstep,125,3 +junglewoodendoubleslab,125,3 +junglewoodendslab,125,3 +junglewooddoubleslab,125,3 +junglewooddslab,125,3 +junglewdoubleslab,125,3 +junglewdslab,125,3 +jungledoublewoodenslab,125,3 +jungledwoodenslab,125,3 +jungledoublewoodslab,125,3 +jungledwoodslab,125,3 +jungledoublewslab,125,3 +jungledwslab,125,3 +jungledoubleslab,125,3 +jungledslab,125,3 +jdslab,125,3 +junglewoodendoublehalfblock,125,3 +junglewoodendhalfblock,125,3 +junglewooddoublehalfblock,125,3 +junglewooddhalfblock,125,3 +junglewdoublehalfblock,125,3 +junglewdhalfblock,125,3 +jungledoublewoodenhalfblock,125,3 +jungledwoodenhalfblock,125,3 +jungledoublewoodhalfblock,125,3 +jungledwoodhalfblock,125,3 +jungledoublewhalfblock,125,3 +jungledwhalfblock,125,3 +jungledoublehalfblock,125,3 +jungledhalfblock,125,3 +jdhalfblock,125,3 +forestwoodendoublehalfblock,125,3 +forestwoodendhalfblock,125,3 +forestwooddoublehalfblock,125,3 +forestwooddhalfblock,125,3 +forestwdoublehalfblock,125,3 +forestwdhalfblock,125,3 +forestdoublewoodenhalfblock,125,3 +forestdwoodenhalfblock,125,3 +forestdoublewoodhalfblock,125,3 +forestdwoodhalfblock,125,3 +forestdoublewhalfblock,125,3 +forestdwhalfblock,125,3 +forestdoublehalfblock,125,3 +forestdhalfblock,125,3 +fdhalfblock,125,3 +forestwoodendoublestep,125,3 +forestwoodendstep,125,3 +forestwooddoublestep,125,3 +forestwooddstep,125,3 +forestwdoublestep,125,3 +forestwdstep,125,3 +forestdoublewoodenstep,125,3 +forestdwoodenstep,125,3 +forestdoublewoodstep,125,3 +forestdwoodstep,125,3 +forestdoublewstep,125,3 +forestdwstep,125,3 +forestdoublestep,125,3 +forestdstep,125,3 +fdstep,125,3 +forestwoodendoubleslab,125,3 +forestwoodendslab,125,3 +forestwooddoubleslab,125,3 +forestwooddslab,125,3 +forestwdoubleslab,125,3 +forestwdslab,125,3 +forestdoublewoodenslab,125,3 +forestdwoodenslab,125,3 +forestdoublewoodslab,125,3 +forestdwoodslab,125,3 +forestdoublewslab,125,3 +forestdwslab,125,3 +forestdoubleslab,125,3 +forestdslab,125,3 +fdslab,125,3 +acaciawoodendoublestep,125,4 +acaciawoodendstep,125,4 +acaciawooddoublestep,125,4 +acaciawooddstep,125,4 +acaciawdoublestep,125,4 +acaciawdstep,125,4 +acaciadoublewoodenstep,125,4 +acaciadwoodenstep,125,4 +acaciadoublewoodstep,125,4 +acaciadwoodstep,125,4 +acaciadoublewstep,125,4 +acaciadwstep,125,4 +acaciadoublestep,125,4 +acaciadstep,125,4 +adstep,125,4 +acaciawoodendoubleslab,125,4 +acaciawoodendslab,125,4 +acaciawooddoubleslab,125,4 +acaciawooddslab,125,4 +acaciawdoubleslab,125,4 +acaciawdslab,125,4 +acaciadoublewoodenslab,125,4 +acaciadwoodenslab,125,4 +acaciadoublewoodslab,125,4 +acaciadwoodslab,125,4 +acaciadoublewslab,125,4 +acaciadwslab,125,4 +acaciadoubleslab,125,4 +acaciadslab,125,4 +adslab,125,4 +acaciawoodendoublehalfblock,125,4 +acaciawoodendhalfblock,125,4 +acaciawooddoublehalfblock,125,4 +acaciawooddhalfblock,125,4 +acaciawdoublehalfblock,125,4 +acaciawdhalfblock,125,4 +acaciadoublewoodenhalfblock,125,4 +acaciadwoodenhalfblock,125,4 +acaciadoublewoodhalfblock,125,4 +acaciadwoodhalfblock,125,4 +acaciadoublewhalfblock,125,4 +acaciadwhalfblock,125,4 +acaciadoublehalfblock,125,4 +acaciadhalfblock,125,4 +adhalfblock,125,4 +darkoakwoodendoublehalfblock,125,5 +darkoakwoodendhalfblock,125,5 +darkoakwooddoublehalfblock,125,5 +darkoakwooddhalfblock,125,5 +darkoakwdoublehalfblock,125,5 +darkoakwdhalfblock,125,5 +darkoakdoublewoodenhalfblock,125,5 +darkoakdwoodenhalfblock,125,5 +darkoakdoublewoodhalfblock,125,5 +darkoakdwoodhalfblock,125,5 +darkoakdoublewhalfblock,125,5 +darkoakdwhalfblock,125,5 +darkoakdoublehalfblock,125,5 +darkoakdhalfblock,125,5 +dodhalfblock,125,5 +darkoakwoodendoublestep,125,5 +darkoakwoodendstep,125,5 +darkoakwooddoublestep,125,5 +darkoakwooddstep,125,5 +darkoakwdoublestep,125,5 +darkoakwdstep,125,5 +darkoakdoublewoodenstep,125,5 +darkoakdwoodenstep,125,5 +darkoakdoublewoodstep,125,5 +darkoakdwoodstep,125,5 +darkoakdoublewstep,125,5 +darkoakdwstep,125,5 +darkoakdoublestep,125,5 +darkoakdstep,125,5 +dodstep,125,5 +darkoakwoodendoubleslab,125,5 +darkoakwoodendslab,125,5 +darkoakwooddoubleslab,125,5 +darkoakwooddslab,125,5 +darkoakwdoubleslab,125,5 +darkoakwdslab,125,5 +darkoakdoublewoodenslab,125,5 +darkoakdwoodenslab,125,5 +darkoakdoublewoodslab,125,5 +darkoakdwoodslab,125,5 +darkoakdoublewslab,125,5 +darkoakdwslab,125,5 +darkoakdoubleslab,125,5 +darkoakdslab,125,5 +dodslab,125,5 +woodenstep,126,0 +woodstep,126,0 +wstep,126,0 +woodenslab,126,0 +woodslab,126,0 +wslab,126,0 +woodenhalfblock,126,0 +woodhalfblock,126,0 +whalfblock,126,0 +oakwoodenstep,126,0 +oakwoodstep,126,0 +oakwstep,126,0 +oakstep,126,0 +ostep,126,0 +oakwoodenslab,126,0 +oakwoodslab,126,0 +oakwslab,126,0 +oakslab,126,0 +oslab,126,0 +oakwoodenhalfblock,126,0 +oakwoodhalfblock,126,0 +oakwhalfblock,126,0 +oakhalfblock,126,0 +ohalfblock,126,0 +sprucewoodenstep,126,1 +sprucewoodstep,126,1 +sprucewstep,126,1 +sprucestep,126,1 +sprucewoodenslab,126,1 +sprucewoodslab,126,1 +sprucewslab,126,1 +spruceslab,126,1 +sprucewoodenhalfblock,126,1 +sprucewoodhalfblock,126,1 +sprucewhalfblock,126,1 +sprucehalfblock,126,1 +darkwoodenstep,126,1 +darkwoodstep,126,1 +darkwstep,126,1 +darkstep,126,1 +darkwoodenslab,126,1 +darkwoodslab,126,1 +darkwslab,126,1 +darkslab,126,1 +darkwoodenhalfblock,126,1 +darkwoodhalfblock,126,1 +darkwhalfblock,126,1 +darkhalfblock,126,1 +birchwoodenstep,126,2 +birchwoodstep,126,2 +birchwstep,126,2 +birchstep,126,2 +birchwoodenslab,126,2 +birchwoodslab,126,2 +birchwslab,126,2 +birchslab,126,2 +birchwoodenhalfblock,126,2 +birchwoodhalfblock,126,2 +birchwhalfblock,126,2 +birchhalfblock,126,2 +lightwoodenstep,126,2 +lightwoodstep,126,2 +lightwstep,126,2 +lightstep,126,2 +lstep,126,2 +lightwoodenslab,126,2 +lightwoodslab,126,2 +lightwslab,126,2 +lightslab,126,2 +lslab,126,2 +lightwoodenhalfblock,126,2 +lightwoodhalfblock,126,2 +lightwhalfblock,126,2 +lighthalfblock,126,2 +lhalfblock,126,2 +junglewoodenstep,126,3 +junglewoodstep,126,3 +junglewstep,126,3 +junglestep,126,3 +jstep,126,3 +junglewoodenslab,126,3 +junglewoodslab,126,3 +junglewslab,126,3 +jungleslab,126,3 +jslab,126,3 +junglewoodenhalfblock,126,3 +junglewoodhalfblock,126,3 +junglewhalfblock,126,3 +junglehalfblock,126,3 +jhalfblock,126,3 +forestwoodenstep,126,3 +forestwoodstep,126,3 +forestwstep,126,3 +foreststep,126,3 +fstep,126,3 +forestwoodenslab,126,3 +forestwoodslab,126,3 +forestwslab,126,3 +forestslab,126,3 +fslab,126,3 +forestwoodenhalfblock,126,3 +forestwoodhalfblock,126,3 +forestwhalfblock,126,3 +foresthalfblock,126,3 +fhalfblock,126,3 +acaciawoodenstep,126,4 +acaciawoodstep,126,4 +acaciawstep,126,4 +acaciastep,126,4 +astep,126,4 +acaciawoodenslab,126,4 +acaciawoodslab,126,4 +acaciawslab,126,4 +acaciaslab,126,4 +aslab,126,4 +acaciawoodenhalfblock,126,4 +acaciawoodhalfblock,126,4 +acaciawhalfblock,126,4 +acaciahalfblock,126,4 +ahalfblock,126,4 +darkoakwoodenstep,126,5 +darkoakwoodstep,126,5 +darkoakwstep,126,5 +darkoakstep,126,5 +dostep,126,5 +darkoakwoodenslab,126,5 +darkoakwoodslab,126,5 +darkoakwslab,126,5 +darkoakslab,126,5 +doslab,126,5 +darkoakwoodenhalfblock,126,5 +darkoakwoodhalfblock,126,5 +darkoakwhalfblock,126,5 +darkoakhalfblock,126,5 +dohalfblock,126,5 +cocoaplant,127,0 +cocoplant,127,0 +cplant,127,0 +cocoafruit,127,0 +cocofruit,127,0 +cfruit,127,0 +cocoapod,127,0 +cocopod,127,0 +cpod,127,0 +sandstonestairs,128,0 +sandstairs,128,0 +sandsstairs,128,0 +sstonestairs,128,0 +ssstairs,128,0 +sandstair,128,0 +sandstonestair,128,0 +sandsstair,128,0 +sstonestair,128,0 +ssstair,128,0 +emeraldore,129,0 +eore,129,0 +oreemerald,129,0 +oree,129,0 +enderchest,130,0 +endchest,130,0 +echest,130,0 +chestender,130,0 +chestend,130,0 +cheste,130,0 +endercontainer,130,0 +endcontainer,130,0 +econtainer,130,0 +tripwirehook,131,0 +tripwire,131,0 +trip,131,0 +tripwirelever,131,0 +triphook,131,0 +emeraldblock,133,0 +blockemerald,133,0 +eblock,133,0 +blocke,133,0 +sprucewoodenstairs,134,0 +sprucewoodstairs,134,0 +sprucewstairs,134,0 +sprucestairs,134,0 +darkwoodenstairs,134,0 +darkwoodstairs,134,0 +darkwstairs,134,0 +darkstairs,134,0 +dstairs,134,0 +sprucewoodenstair,134,0 +sprucewoodstair,134,0 +sprucewstair,134,0 +sprucestair,134,0 +darkwoodenstair,134,0 +darkwoodstair,134,0 +darkwstair,134,0 +darkstair,134,0 +dstair,134,0 +birchwoodenstairs,135,0 +birchwoodstairs,135,0 +birchwstairs,135,0 +birchstairs,135,0 +lightwoodenstairs,135,0 +lightwoodstairs,135,0 +lightwstairs,135,0 +lightstairs,135,0 +lstairs,135,0 +birchwoodenstair,135,0 +birchwoodstair,135,0 +birchwstair,135,0 +birchstair,135,0 +lightwoodenstair,135,0 +lightwoodstair,135,0 +lightwstair,135,0 +lightstair,135,0 +lstair,135,0 +junglewoodenstairs,136,0 +junglewoodstairs,136,0 +junglewstairs,136,0 +junglestairs,136,0 +jstairs,136,0 +forestwoodenstairs,136,0 +forestwoodstairs,136,0 +forestwstairs,136,0 +foreststairs,136,0 +fstairs,136,0 +junglewoodenstair,136,0 +junglewoodstair,136,0 +junglewstair,136,0 +junglestair,136,0 +jstair,136,0 +forestwoodenstair,136,0 +forestwoodstair,136,0 +forestwstair,136,0 +foreststair,136,0 +fstair,136,0 +commandblock,137,0 +blockcommand,137,0 +cmdblock,137,0 +blockcmd,137,0 +macroblock,137,0 +blockmacro,137,0 +beacon,138,0 +beaconblock,138,0 +cobblestonewall,139,0 +cstonewall,139,0 +cobblewall,139,0 +cobblestonefence,139,0 +cstonefence,139,0 +cobblefence,139,0 +cswall,139,0 +csfence,139,0 +cwall,139,0 +cfence,139,0 +mosscobblestonewall,139,1 +mosscstonewall,139,1 +mosscobblewall,139,1 +mcobblestonewall,139,1 +mcstonewall,139,1 +mcobblewall,139,1 +mosscobblestonefence,139,1 +mosscstonefence,139,1 +mosscobblefence,139,1 +mcobblestonefence,139,1 +mcstonefence,139,1 +mcobblefence,139,1 +mcswall,139,0 +mcsfence,139,0 +mcwall,139,0 +mcfence,139,0 +plantedcarrot,141,0 +plantcarrot,141,0 +carrots,141,0 +growingcarrot,141,0 +potatoplant,142,0 +potatoes,142,0 +plantedpotato,142,0 +plantpotato,142,0 +growingpotato,142,0 +woodenbutton,143,0 +woodenplankbutton,143,0 +woodplankbutton,143,0 +wplankbutton,143,0 +plankbutton,143,0 +woodbutton,143,0 +wbutton,143,0 +anvil,145,0 +slightlydamagedanvil,145,1 +slightdamageanvil,145,1 +damagedanvil,145,1 +verydamagedanvil,145,2 +trapchest,146,0 +trappedchest,146,0 +chesttrapped,146,0 +chesttrap,146,0 +goldpressureplate,147,0 +weightedgoldpressureplate,147,0 +weightgoldpressureplate,147,0 +wgoldpressureplate,147,0 +weightedgoldpressplate,147,0 +weightgoldpressplate,147,0 +wgoldpressplate,147,0 +goldpressplate,147,0 +weightedgoldpplate,147,0 +weightgoldpplate,147,0 +wgoldpplate,147,0 +goldpplate,147,0 +weightedgoldplate,147,0 +weightgoldplate,147,0 +wgoldplate,147,0 +goldplate,147,0 +weightedgpressureplate,147,0 +weightgpressureplate,147,0 +wgpressureplate,147,0 +gpressureplate,147,0 +weightedgpressplate,147,0 +weightgpressplate,147,0 +wgpressplate,147,0 +gpressplate,147,0 +weightedgpplate,147,0 +weightgpplate,147,0 +wgpplate,147,0 +gpplate,147,0 +weightedgplate,147,0 +weightgplate,147,0 +wgplate,147,0 +gplate,147,0 +ironpressureplate,148,0 +weightedironpressureplate,148,0 +weightironpressureplate,148,0 +wironpressureplate,148,0 +weightedironpressplate,148,0 +weightironpressplate,148,0 +wironpressplate,148,0 +ironpressplate,148,0 +weightedironpplate,148,0 +weightironpplate,148,0 +wironpplate,148,0 +ironpplate,148,0 +weightedironplate,148,0 +weightironplate,148,0 +wironplate,148,0 +ironplate,148,0 +weightedipressureplate,148,0 +weightipressureplate,148,0 +wipressureplate,148,0 +ipressureplate,148,0 +weightedipressplate,148,0 +weightipressplate,148,0 +wipressplate,148,0 +ipressplate,148,0 +weightedipplate,148,0 +weightipplate,148,0 +wipplate,148,0 +ipplate,148,0 +weightediplate,148,0 +weightiplate,148,0 +wiplate,148,0 +iplate,148,0 +daylightsensor,151,0 +daylightsense,151,0 +lightsensor,151,0 +lightsense,151,0 +daysensor,151,0 +daysense,151,0 +timesensor,151,0 +timesense,151,0 +redstoneblock,152,0 +rstoneblock,152,0 +redsblock,152,0 +rsblock,152,0 +blockredstone,152,0 +blockrstone,152,0 +blockreds,152,0 +blockrs,152,0 +netherquartzore,153,0 +hellquartzore,153,0 +deathquartzore,153,0 +nquartzore,153,0 +hquartzore,153,0 +dquartzore,153,0 +quartzore,153,0 +netherqore,153,0 +hellqore,153,0 +deathqore,153,0 +nqore,153,0 +hqore,153,0 +dqore,153,0 +qore,153,0 +hopper,154,0 +chestpuller,154,0 +chestpull,154,0 +cheststorer,154,0 +cheststore,154,0 +itempuller,154,0 +itempull,154,0 +itemstorer,154,0 +itemstore,154,0 +quartzblock,155,0 +netherquartzblock,155,0 +nqblock,155,0 +qblock,155,0 +chiseledquartzblock,155,1 +chiselquartzblock,155,1 +cquartzblock,155,1 +cqblock,155,1 +pillarquartzblock,155,2 +pquartzblock,155,2 +pqblock,155,2 +quartzstairs,156,0 +qstairs,156,0 +quartzstair,156,0 +qstair,156,0 +activatorrails,157,0 +activaterails,157,0 +triggerrails,157,0 +arails,157,0 +trails,157,0 +activatorrail,157,0 +activaterail,157,0 +triggerrail,157,0 +arail,157,0 +trail,157,0 +activatortrack,157,0 +activatetrack,157,0 +triggertrack,157,0 +atrack,157,0 +ttrack,157,0 +dropper,158,0 +drop,158,0 +chestdispenser,158,0 +chestdispense,158,0 +chestdropper,158,0 +chestdrop,158,0 +whiteclay,159,0 +whitesclay,159,0 +whitestainedclay,159,0 +wclay,159,0 +wsclay,159,0 +wstainedclay,159,0 +sclay,159,0 +stainedclay,159,0 +orangeclay,159,1 +orangesclay,159,1 +orangestainedclay,159,1 +oclay,159,1 +osclay,159,1 +ostainedclay,159,1 +magentaclay,159,2 +magentasclay,159,2 +magentastainedclay,159,2 +mclay,159,2 +msclay,159,2 +mstainedclay,159,2 +lightblueclay,159,3 +lightbluesclay,159,3 +lightbluestainedclay,159,3 +lblueclay,159,3 +lbluesclay,159,3 +lbluestainedclay,159,3 +lightbluclay,159,3 +lightblusclay,159,3 +lightblustainedclay,159,3 +lbluclay,159,3 +lblusclay,159,3 +lblustainedclay,159,3 +lbclay,159,3 +lbsclay,159,3 +lbstainedclay,159,3 +yellowclay,159,4 +yellowsclay,159,4 +yellowstainedclay,159,4 +yclay,159,4 +ysclay,159,4 +ystainedclay,159,4 +lightgreenclay,159,5 +lightgreensclay,159,5 +lightgreenstainedclay,159,5 +lgreenclay,159,5 +lgreensclay,159,5 +lgreenstainedclay,159,5 +lightgreclay,159,5 +lightgresclay,159,5 +lightgrestainedclay,159,5 +lgreclay,159,5 +lgresclay,159,5 +lgrestainedclay,159,5 +limeclay,159,5 +limesclay,159,5 +limestainedclay,159,5 +lclay,159,5 +lsclay,159,5 +lstainedclay,159,5 +pinkclay,159,6 +pinksclay,159,6 +pinkstainedclay,159,6 +piclay,159,6 +pisclay,159,6 +pistainedclay,159,6 +darkgrayclay,159,7 +darkgraysclay,159,7 +darkgraystainedclay,159,7 +dgrayclay,159,7 +dgraysclay,159,7 +dgraystainedclay,159,7 +darkgreyclay,159,7 +darkgreeysclay,159,7 +darkgreystainedclay,159,7 +dgreyclay,159,7 +dgreysclay,159,7 +dgreystainedclay,159,7 +darkgraclay,159,7 +darkgrasclay,159,7 +darkgrastainedclay,159,7 +dgraclay,159,7 +dgrasclay,159,7 +dgrastainedclay,159,7 +grayclay,159,7 +graysclay,159,7 +graystainedclay,159,7 +greyclay,159,7 +greysclay,159,7 +greystainedclay,159,7 +graclay,159,7 +grasclay,159,7 +grastainedclay,159,7 +lightgrayclay,159,8 +lightgraysclay,159,8 +lightgraystainedclay,159,8 +lgrayclay,159,8 +lgraysclay,159,8 +lgraystainedclay,159,8 +lightgreyclay,159,8 +lightgreysclay,159,8 +lightgreystainedclay,159,8 +lgreyclay,159,8 +lgreysclay,159,8 +lgreystainedclay,159,8 +lightgraclay,159,8 +lightgrasclay,159,8 +lightgrastainedclay,159,8 +lgraclay,159,8 +lgrasclay,159,8 +lgrastainedclay,159,8 +silverclay,159,8 +silversclay,159,8 +silverstainedclay,159,8 +siclay,159,8 +siasclay,159,8 +siastainedclay,159,8 +cyanclay,159,9 +cyansclay,159,9 +cyanstainedclay,159,9 +cclay,159,9 +csclay,159,9 +cstainedclay,159,9 +purpleclay,159,10 +purplesclay,159,10 +purplestainedclay,159,10 +puclay,159,10 +pusclay,159,10 +pustainedclay,159,10 +blueclay,159,11 +bluesclay,159,11 +bluestainedclay,159,11 +bluclay,159,11 +blusclay,159,11 +blustainedclay,159,11 +brownclay,159,12 +brownsclay,159,12 +brownstainedclay,159,12 +broclay,159,12 +brosclay,159,12 +brostainedclay,159,12 +darkgreenclay,159,13 +darkgreensclay,159,13 +darkgreenstainedclay,159,13 +dgreenclay,159,13 +dgreensclay,159,13 +dgreenstainedclay,159,13 +greenclay,159,13 +greensclay,159,13 +greenstainedclay,159,13 +darkgreclay,159,13 +darkgresclay,159,13 +darkgrestainedclay,159,13 +dgreclay,159,13 +dgresclay,159,13 +dgrestainedclay,159,13 +greclay,159,13 +gresclay,159,13 +grestainedclay,159,13 +redclay,159,14 +redsclay,159,14 +redstainedclay,159,14 +rclay,159,14 +rsclay,159,14 +rstainedclay,159,14 +blackclay,159,15 +blacksclay,159,15 +blackstainedclay,159,15 +blaclay,159,15 +blasclay,159,15 +blastainedclay,159,15 +whiteglasspane,160,0 +whitesglasspane,160,0 +whitestainedglasspane,160,0 +wglasspane,160,0 +wsglasspane,160,0 +wstainedglasspane,160,0 +sglasspane,160,0 +stainedglasspane,160,0 +orangeglasspane,160,1 +orangesglasspane,160,1 +orangestainedglasspane,160,1 +oglasspane,160,1 +osglasspane,160,1 +ostainedglasspane,160,1 +magentaglasspane,160,2 +magentasglasspane,160,2 +magentastainedglasspane,160,2 +mglasspane,160,2 +msglasspane,160,2 +mstainedglasspane,160,2 +lightblueglasspane,160,3 +lightbluesglasspane,160,3 +lightbluestainedglasspane,160,3 +lblueglasspane,160,3 +lbluesglasspane,160,3 +lbluestainedglasspane,160,3 +lightbluglasspane,160,3 +lightblusglasspane,160,3 +lightblustainedglasspane,160,3 +lbluglasspane,160,3 +lblusglasspane,160,3 +lblustainedglasspane,160,3 +lbglasspane,160,3 +lbsglasspane,160,3 +lbstainedglasspane,160,3 +yellowglasspane,160,4 +yellowsglasspane,160,4 +yellowstainedglasspane,160,4 +yglasspane,160,4 +ysglasspane,160,4 +ystainedglasspane,160,4 +lightgreenglasspane,160,5 +lightgreensglasspane,160,5 +lightgreenstainedglasspane,160,5 +lgreenglasspane,160,5 +lgreensglasspane,160,5 +lgreenstainedglasspane,160,5 +lightgreglasspane,160,5 +lightgresglasspane,160,5 +lightgrestainedglasspane,160,5 +lgreglasspane,160,5 +lgresglasspane,160,5 +lgrestainedglasspane,160,5 +limeglasspane,160,5 +limesglasspane,160,5 +limestainedglasspane,160,5 +lglasspane,160,5 +lsglasspane,160,5 +lstainedglasspane,160,5 +pinkglasspane,160,6 +pinksglasspane,160,6 +pinkstainedglasspane,160,6 +piglasspane,160,6 +pisglasspane,160,6 +pistainedglasspane,160,6 +darkgrayglasspane,160,7 +darkgraysglasspane,160,7 +darkgraystainedglasspane,160,7 +dgrayglasspane,160,7 +dgraysglasspane,160,7 +dgraystainedglasspane,160,7 +darkgreyglasspane,160,7 +darkgreysglasspane,160,7 +darkgreystainedglasspane,160,7 +dgreyglasspane,160,7 +dgreysglasspane,160,7 +dgreystainedglasspane,160,7 +darkgraglasspane,160,7 +darkgrasglasspane,160,7 +darkgrastainedglasspane,160,7 +dgraglasspane,160,7 +dgrasglasspane,160,7 +dgrastainedglasspane,160,7 +grayglasspane,160,7 +graysglasspane,160,7 +graystainedglasspane,160,7 +greyglasspane,160,7 +greysglasspane,160,7 +greystainedglasspane,160,7 +graglasspane,160,7 +grasglasspane,160,7 +grastainedglasspane,160,7 +lightgrayglasspane,160,8 +lightgraysglasspane,160,8 +lightgraystainedglasspane,160,8 +lgrayglasspane,160,8 +lgraysglasspane,160,8 +lgraystainedglasspane,160,8 +lightgreyglasspane,160,8 +lightgreysglasspane,160,8 +lightgreystainedglasspane,160,8 +lgreyglasspane,160,8 +lgreysglasspane,160,8 +lgreystainedglasspane,160,8 +lightgraglasspane,160,8 +lightgrasglasspane,160,8 +lightgrastainedglasspane,160,8 +lgraglasspane,160,8 +lgrasglasspane,160,8 +lgrastainedglasspane,160,8 +silverglasspane,160,8 +silversglasspane,160,8 +silverstainedglasspane,160,8 +siglasspane,160,8 +siasglasspane,160,8 +siastainedglasspane,160,8 +cyanglasspane,160,9 +cyansglasspane,160,9 +cyanstainedglasspane,160,9 +cglasspane,160,9 +csglasspane,160,9 +cstainedglasspane,160,9 +purpleglasspane,160,10 +purplesglasspane,160,10 +purplestainedglasspane,160,10 +puglasspane,160,10 +pusglasspane,160,10 +pustainedglasspane,160,10 +blueglasspane,160,11 +bluesglasspane,160,11 +bluestainedglasspane,160,11 +bluglasspane,160,11 +blusglasspane,160,11 +blustainedglasspane,160,11 +brownglasspane,160,12 +brownsglasspane,160,12 +brownstainedglasspane,160,12 +broglasspane,160,12 +brosglasspane,160,12 +brostainedglasspane,160,12 +darkgreenglasspane,160,13 +darkgreensglasspane,160,13 +darkgreenstainedglasspane,160,13 +dgreenglasspane,160,13 +dgreensglasspane,160,13 +dgreenstainedglasspane,160,13 +greenglasspane,160,13 +greensglasspane,160,13 +greenstainedglasspane,160,13 +darkgreglasspane,160,13 +darkgresglasspane,160,13 +darkgrestainedglasspane,160,13 +dgreglasspane,160,13 +dgresglasspane,160,13 +dgrestainedglasspane,160,13 +greglasspane,160,13 +gresglasspane,160,13 +grestainedglasspane,160,13 +redglasspane,160,14 +redsglasspane,160,14 +redstainedglasspane,160,14 +rglasspane,160,14 +rsglasspane,160,14 +rstainedglasspane,160,14 +blackglasspane,160,15 +blacksglasspane,160,15 +blackstainedglasspane,160,15 +blaglasspane,160,15 +blasglasspane,160,15 +blastainedglasspane,160,15 +acacialeaves,161,0 +acaciatreeleaves,161,0 +acacialogleaves,161,0 +acaciatrunkleaves,161,0 +acaciawoodleaves,161,0 +aleaves,161,0 +atreeleaves,161,0 +alogleaves,161,0 +atrunkleaves,161,0 +awoodleaves,161,0 +acacialeave,161,0 +acaciatreeleave,161,0 +acacialogleave,161,0 +acaciatrunkleave,161,0 +acaciawoodleave,161,0 +aleave,161,0 +atreeleave,161,0 +alogleave,161,0 +atrunkleave,161,0 +awoodleave,161,0 +acaciatreeleaf,161,0 +acacialogleaf,161,0 +acaciatrunkleaf,161,0 +acaciawoodleaf,161,0 +aleaf,161,0 +atreeleaf,161,0 +alogleaf,161,0 +atrunkleaf,161,0 +awoodleaf,161,0 +darkoakleaves,161,1 +darkoaktreeleaves,161,1 +darkoaklogleaves,161,1 +darkoaktrunkleaves,161,1 +darkoakwoodleaves,161,1 +doakleaves,161,1 +doaktreeleaves,161,1 +doaklogleaves,161,1 +doaktrunkleaves,161,1 +doakwoodleaves,161,1 +doleaves,161,1 +dotreeleaves,161,1 +dologleaves,161,1 +dotrunkleaves,161,1 +dowoodleaves,161,1 +darkoakleave,161,1 +darkoaktreeleave,161,1 +darkoaklogleave,161,1 +darkoaktrunkleave,161,1 +darkoakwoodleave,161,1 +doakleave,161,1 +doaktreeleave,161,1 +doaklogleave,161,1 +doaktrunkleave,161,1 +doakwoodleave,161,1 +doleave,161,1 +dotreeleave,161,1 +dologleave,161,1 +dotrunkleave,161,1 +dowoodleave,161,1 +darkoaktreeleaf,161,1 +darkoaklogleaf,161,1 +darkoaktrunkleaf,161,1 +darkoakwoodleaf,161,1 +doakleaf,161,1 +doaktreeleaf,161,1 +doaklogleaf,161,1 +doaktrunkleaf,161,1 +doakwoodleaf,161,1 +doleaf,161,1 +dotreeleaf,161,1 +dologleaf,161,1 +dotrunkleaf,161,1 +dowoodleaf,161,1 +acacia,162,0 +acaciatree,162,0 +acacialog,162,0 +acaciatrunk,162,0 +acaciawood,162,0 +atree,162,0 +alog,162,0 +atrunk,162,0 +awood,162,0 +darkoak,162,1 +darkoaktree,162,1 +darkoaklog,162,1 +darkoaktrunk,162,1 +darkoakwood,162,1 +doak,162,1 +doaktree,162,1 +doaklog,162,1 +doaktrunk,162,1 +doakwood,162,1 +dotree,162,1 +dolog,162,1 +dotrunk,162,1 +dowood,162,1 +acaciawoodenstairs,163,0 +acaciawoodstairs,163,0 +acaciawstairs,163,0 +acaciastairs,163,0 +awoodenstairs,163,0 +awoodstairs,163,0 +awstairs,163,0 +astairs,163,0 +acaciawoodenstair,163,0 +acaciawoodstair,163,0 +acaciawstair,163,0 +acaciastair,163,0 +awoodenstair,163,0 +awoodstair,163,0 +awstair,163,0 +astair,163,0 +darkoakwoodenstairs,164,0 +darkoakwoodstairs,164,0 +darkoakwstairs,164,0 +darkoakstairs,164,0 +doakwoodenstairs,164,0 +doakwoodstairs,164,0 +doakwstairs,164,0 +doakstairs,164,0 +dowoodenstairs,164,0 +dowoodstairs,164,0 +dowstairs,164,0 +dostairs,164,0 +darkoakwoodenstair,164,0 +darkoakwoodstair,164,0 +darkoakwstair,164,0 +darkoakstair,164,0 +doakwoodenstair,164,0 +doakwoodstair,164,0 +doakwstair,164,0 +doakstair,164,0 +dowoodenstair,164,0 +dowoodstair,164,0 +dowstair,164,0 +dostair,164,0 +hay,170,0 +hayblock,170,0 +haybale,170,0 +baleofhay,170,0 +hayofbale,170,0 +whitecarpet,171,0 +whitefloor,171,0 +wcarpet,171,0 +wfloor,171,0 +carpet,171,0 +floor,171,0 +orangecarpet,171,1 +orangefloor,171,1 +ocarpet,171,1 +ofloor,171,1 +magentacarpet,171,2 +magentafloor,171,2 +mcarpet,171,2 +mfloor,171,2 +lightbluecarpet,171,3 +lightbluefloor,171,3 +lbluecarpet,171,3 +lbluefloor,171,3 +lbcarpet,171,3 +lbfloor,171,3 +lightblucarpet,171,3 +lightblufloor,171,3 +lblucarpet,171,3 +lblufloor,171,3 +yellowcarpet,171,4 +yellowfloor,171,4 +ycarpet,171,4 +yfloor,171,4 +lightgreencarpet,171,5 +lightgreenfloor,171,5 +lgreencarpet,171,5 +lgreenfloor,171,5 +lightgrecarpet,171,5 +lightgrefloor,171,5 +lgrecarpet,171,5 +lgrefloor,171,5 +limecarpet,171,5 +limefloor,171,5 +lcarpet,171,5 +lfloor,171,5 +pinkcarpet,171,6 +pinkfloor,171,6 +picarpet,171,6 +pifloor,171,6 +darkgraycarpet,171,7 +darkgrayfloor,171,7 +dgraycarpet,171,7 +dgrayfloor,171,7 +darkgreycarpet,171,7 +darkgreyfloor,171,7 +dgreycarpet,171,7 +dgreyfloor,171,7 +darkgracarpet,171,7 +darkgrafloor,171,7 +dgracarpet,171,7 +dgrafloor,171,7 +graycarpet,171,7 +grayfloor,171,7 +greycarpet,171,7 +greyfloor,171,7 +gracarpet,171,7 +grafloor,171,7 +lightgraycarpet,171,8 +lightgrayfloor,171,8 +lgraycarpet,171,8 +lgrayfloor,171,8 +lightgreycarpet,171,8 +lightgreyfloor,171,8 +lgreycarpet,171,8 +lgreyfloor,171,8 +lightgracarpet,171,8 +lightgrafloor,171,8 +lgracarpet,171,8 +lgrafloor,171,8 +silvercarpet,171,8 +silverfloor,171,8 +sicarpet,171,8 +siafloor,171,8 +cyancarpet,171,9 +cyanfloor,171,9 +ccarpet,171,9 +cfloor,171,9 +purplecarpet,171,10 +purplefloor,171,10 +pucarpet,171,10 +pufloor,171,10 +bluecarpet,171,11 +bluefloor,171,11 +blucarpet,171,11 +blufloor,171,11 +browncarpet,171,12 +brownfloor,171,12 +brocarpet,171,12 +brofloor,171,12 +darkgreencarpet,171,13 +darkgreenfloor,171,13 +dgreencarpet,171,13 +dgreenfloor,171,13 +greencarpet,171,13 +greenfloor,171,13 +darkgrecarpet,171,13 +darkgrefloor,171,13 +dgrecarpet,171,13 +dgrefloor,171,13 +grecarpet,171,13 +grefloor,171,13 +redcarpet,171,14 +redfloor,171,14 +rcarpet,171,14 +rfloor,171,14 +blackcarpet,171,15 +blackfloor,171,15 +blacarpet,171,15 +blafloor,171,15 +hardenedclay,172,0 +hardclay,172,0 +hclay,172,0 +coalblock,173,0 +blockcoal,173,0 +coblock,173,0 +blockco,173,0 +coalb,173,0 +bcoal,173,0 +packedice,174,0 +packice,174,0 +solidice,174,0 +sunflower,175,0 +yellowsunflower,175,0 +lilac,175,1 +magentalilac,175,1 +syringa,175,1 +longtallgrass,175,2 +extratallgrass,175,2 +doubletallgrass,175,2 +largetallgrass,175,2 +longtgrass,175,2 +extratgrass,175,2 +doubletgrass,175,2 +largetgrass,175,2 +ltgrass,175,2 +etgrass,175,2 +dtgrass,175,2 +bigfern,175,3 +largefern,175,3 +doublefern,175,3 +bfern,175,3 +lfern,175,3 +dfern,175,3 +rosebush,175,4 +redrosebush,175,4 +peony,175,5 +pinkpeony,175,5 +paeonia,175,5 +ironshovel,256,0 +ironspade,256,0 +ishovel,256,0 +ispade,256,0 +steelshovel,256,0 +steelspade,256,0 +ironpickaxe,257,0 +ironpick,257,0 +steelpickaxe,257,0 +steelpick,257,0 +ipickaxe,257,0 +ipick,257,0 +ironaxe,258,0 +iaxe,258,0 +steelaxe,258,0 +flintandsteel,259,0 +flintandiron,259,0 +flintandtinder,259,0 +flintnsteel,259,0 +flintniron,259,0 +flintntinder,259,0 +flintsteel,259,0 +flintiron,259,0 +flinttinder,259,0 +lighter,259,0 +apple,260,0 +normalapple,260,0 +redapple,260,0 +bow,261,0 +arrow,262,0 +coal,263,0 +charcoal,263,1 +ccoal,263,1 +diamond,264,0 +crystal,264,0 +ironingot,265,0 +ironbar,265,0 +ironi,265,0 +steelingot,265,0 +steelbar,265,0 +steeli,265,0 +iingot,265,0 +ibar,265,0 +ingotiron,265,0 +bariron,265,0 +iiron,265,0 +ingotsteel,265,0 +barsteel,265,0 +isteel,265,0 +ingoti,265,0 +bari,265,0 +goldingot,266,0 +goldbar,266,0 +goldi,266,0 +gingot,266,0 +gbar,266,0 +ingotgold,266,0 +bargold,266,0 +igold,266,0 +ingotg,266,0 +barg,266,0 +ironsword,267,0 +steelsword,267,0 +isword,267,0 +woodensword,268,0 +woodsword,268,0 +wsword,268,0 +woodenshovel,269,0 +woodenspade,269,0 +woodshovel,269,0 +woodspade,269,0 +wshovel,269,0 +wspade,269,0 +woodenpickaxe,270,0 +woodenpick,270,0 +woodpickaxe,270,0 +woodpick,270,0 +wpickaxe,270,0 +wpick,270,0 +woodenaxe,271,0 +woodaxe,271,0 +waxe,271,0 +stonesword,272,0 +cobblestonesword,272,0 +cstonesword,272,0 +cssword,272,0 +ssword,272,0 +stoneshovel,273,0 +cobblestoneshovel,273,0 +cobblestonespade,273,0 +cstoneshovel,273,0 +cstonespade,273,0 +stonespade,273,0 +csshovel,273,0 +csspade,273,0 +sshovel,273,0 +sspade,273,0 +stonepickaxe,274,0 +cobblestonepickaxe,274,0 +cobblestonepick,274,0 +cstonepickaxe,274,0 +cstonepick,274,0 +stonepick,274,0 +cspickaxe,274,0 +cspick,274,0 +spickaxe,274,0 +spick,274,0 +stoneaxe,275,0 +cobblestoneaxe,275,0 +cstoneaxe,275,0 +csaxe,275,0 +saxe,275,0 +diamondsword,276,0 +crystalsword,276,0 +dsword,276,0 +diamondshovel,277,0 +diamondspade,277,0 +crystalshovel,277,0 +crystalspade,277,0 +dshovel,277,0 +dspade,277,0 +diamondpickaxe,278,0 +diamondpick,278,0 +crystalpickaxe,278,0 +crystalpick,278,0 +dpickaxe,278,0 +dpick,278,0 +diamondaxe,279,0 +crystalaxe,279,0 +daxe,279,0 +stick,280,0 +twig,280,0 +branch,280,0 +bowl,281,0 +woodenbowl,281,0 +woodbowl,281,0 +mushroomsoup,282,0 +mrsoup,282,0 +soup,282,0 +goldsword,283,0 +gsword,283,0 +goldshovel,284,0 +goldspade,284,0 +gshovel,284,0 +gspade,284,0 +goldpickaxe,285,0 +goldpick,285,0 +gpickaxe,285,0 +gpick,285,0 +goldaxe,286,0 +gaxe,286,0 +string,287,0 +thread,287,0 +feather,288,0 +gunpowder,289,0 +sulfur,289,0 +woodenhoe,290,0 +woodhoe,290,0 +whoe,290,0 +stonehoe,291,0 +cobblestonehoe,291,0 +cstonehoe,291,0 +cshoe,291,0 +shoe,291,0 +ironhoe,292,0 +steelhoe,292,0 +ihoe,292,0 +diamondhoe,293,0 +crystalhoe,293,0 +dhoe,293,0 +goldhoe,294,0 +ghoe,294,0 +seeds,295,0 +seed,295,0 +wheat,296,0 +crops,296,0 +crop,296,0 +bread,297,0 +leatherhelmet,298,0 +leatherhelm,298,0 +leatherhat,298,0 +leathercoif,298,0 +lhelmet,298,0 +lhelm,298,0 +lhat,298,0 +lcoif,298,0 +leatherchestplate,299,0 +leatherplatebody,299,0 +leatherplate,299,0 +leathershirt,299,0 +leathertunic,299,0 +lchestplate,299,0 +lplatebody,299,0 +lplate,299,0 +lshirt,299,0 +ltunic,299,0 +leatherleggings,300,0 +leatherlegs,300,0 +leatherpants,300,0 +lleggings,300,0 +llegs,300,0 +lpants,300,0 +leatherboots,301,0 +leathershoes,301,0 +lboots,301,0 +lshoes,301,0 +chainmailhelmet,302,0 +chainmailhelm,302,0 +chainmailhat,302,0 +chainmailcoif,302,0 +chainmhelmet,302,0 +chainmhelm,302,0 +chainmhat,302,0 +chainmcoif,302,0 +cmailhelmet,302,0 +cmailhelm,302,0 +cmailhat,302,0 +cmailcoif,302,0 +chainhelmet,302,0 +chainhelm,302,0 +chainhat,302,0 +chaincoif,302,0 +cmhelmet,302,0 +cmhelm,302,0 +cmhat,302,0 +cmcoif,302,0 +chainmailchestplate,303,0 +chainmailplatebody,303,0 +chainmailplate,303,0 +chainmailshirt,303,0 +chainmailtunic,303,0 +chainmchestplate,303,0 +chainmplatebody,303,0 +chainmplate,303,0 +chainmshirt,303,0 +chainmtunic,303,0 +cmailchestplate,303,0 +cmailplatebody,303,0 +cmailplate,303,0 +cmailshirt,303,0 +cmailtunic,303,0 +chainchestplate,303,0 +chainplatebody,303,0 +chainplate,303,0 +chainshirt,303,0 +chaintunic,303,0 +cmchestplate,303,0 +cmplatebody,303,0 +cmplate,303,0 +cmshirt,303,0 +cmtunic,303,0 +chainmailleggings,304,0 +chainmaillegs,304,0 +chainmailpants,304,0 +chainmleggings,304,0 +chainmlegs,304,0 +chainmpants,304,0 +cmailleggings,304,0 +cmaillegs,304,0 +cmailpants,304,0 +chainleggings,304,0 +chainlegs,304,0 +chainpants,304,0 +cmleggings,304,0 +cmlegs,304,0 +cmpants,304,0 +chainmailboots,305,0 +chainmailshoes,305,0 +chainmboots,305,0 +chainmshoes,305,0 +cmailboots,305,0 +cmailshoes,305,0 +chainboots,305,0 +chainshoes,305,0 +cmboots,305,0 +cmshoes,305,0 +ironhelmet,306,0 +ironhelm,306,0 +ironhat,306,0 +ironcoif,306,0 +ihelmet,306,0 +ihelm,306,0 +ihat,306,0 +icoif,306,0 +steelhelmet,306,0 +steelhelm,306,0 +steelhat,306,0 +steelcoif,306,0 +shelmet,306,0 +shelm,306,0 +shat,306,0 +scoif,306,0 +ironchestplate,307,0 +ironplatebody,307,0 +ironshirt,307,0 +irontunic,307,0 +ichestplate,307,0 +iplatebody,307,0 +ishirt,307,0 +itunic,307,0 +steelchestplate,307,0 +steelplatebody,307,0 +steelplate,307,0 +steelshirt,307,0 +steeltunic,307,0 +schestplate,307,0 +splatebody,307,0 +sshirt,307,0 +stunic,307,0 +ironleggings,308,0 +ironlegs,308,0 +ironpants,308,0 +ileggings,308,0 +ilegs,308,0 +ipants,308,0 +steelleggings,308,0 +steellegs,308,0 +steelpants,308,0 +sleggings,308,0 +slegs,308,0 +spants,308,0 +ironboots,309,0 +ironshoes,309,0 +iboots,309,0 +ishoes,309,0 +steelboots,309,0 +steelshoes,309,0 +sboots,309,0 +sshoes,309,0 +diamondhelmet,310,0 +diamondhelm,310,0 +diamondhat,310,0 +diamondcoif,310,0 +dhelmet,310,0 +dhelm,310,0 +dhat,310,0 +dcoif,310,0 +crystalhelmet,310,0 +crystalhelm,310,0 +crystalhat,310,0 +crystalcoif,310,0 +chelmet,310,0 +chelm,310,0 +chat,310,0 +ccoif,310,0 +diamondchestplate,311,0 +diamondplatebody,311,0 +diamondplate,311,0 +diamondshirt,311,0 +diamondtunic,311,0 +dchestplate,311,0 +dplatebody,311,0 +dplate,311,0 +dshirt,311,0 +dtunic,311,0 +crystalchestplate,311,0 +crystalplatebody,311,0 +crystalplate,311,0 +crystalshirt,311,0 +crystaltunic,311,0 +cchestplate,311,0 +cplatebody,311,0 +cplate,311,0 +cshirt,311,0 +ctunic,311,0 +diamondleggings,312,0 +diamondlegs,312,0 +diamondpants,312,0 +dleggings,312,0 +dlegs,312,0 +dpants,312,0 +crystalleggings,312,0 +crystallegs,312,0 +crystalpants,312,0 +cleggings,312,0 +clegs,312,0 +cpants,312,0 +diamondboots,313,0 +diamondshoes,313,0 +dboots,313,0 +dshoes,313,0 +crystalboots,313,0 +crystalshoes,313,0 +cboots,313,0 +cshoes,313,0 +goldhelmet,314,0 +goldhelm,314,0 +goldhat,314,0 +goldcoif,314,0 +ghelmet,314,0 +ghelm,314,0 +ghat,314,0 +gcoif,314,0 +goldchestplate,315,0 +goldplatebody,315,0 +goldshirt,315,0 +goldtunic,315,0 +gchestplate,315,0 +gplatebody,315,0 +gplateplate,315,0 +gshirt,315,0 +gtunic,315,0 +goldleggings,316,0 +goldlegs,316,0 +goldpants,316,0 +gleggings,316,0 +glegs,316,0 +gpants,316,0 +goldboots,317,0 +goldshoes,317,0 +gboots,317,0 +gshoes,317,0 +flint,318,0 +pork,319,0 +porkchop,319,0 +rawpork,319,0 +rpork,319,0 +rawporkchop,319,0 +rporkchop,319,0 +cookedpork,320,0 +grilledpork,320,0 +grillpork,320,0 +gpork,320,0 +cookpork,320,0 +cpork,320,0 +grilledporkchop,320,0 +grillporkchop,320,0 +gporkchop,320,0 +cookedporkchop,320,0 +cookporkchop,320,0 +cporkchop,320,0 +bacon,320,0 +painting,321,0 +picture,321,0 +goldenapple,322,0 +goldapple,322,0 +gapple,322,0 +enchantedgoldenapple,322,1 +enchantedgoldapple,322,1 +enchantedgapple,322,1 +supergoldenapple,322,1 +supergoldapple,322,1 +supergapple,322,1 +magicalgoldenapple,322,1 +magicalgoldapple,322,1 +magicalgapple,322,1 +magicgoldenapple,322,1 +magicgoldapple,322,1 +magicgapple,322,1 +egoldenapple,322,1 +egoldapple,322,1 +egapple,322,1 +sgoldenapple,322,1 +sgoldapple,322,1 +sgapple,322,1 +mgoldenapple,322,1 +mgoldapple,322,1 +mgapple,322,1 +sign,323,0 +woodendoor,324,0 +wooddoor,324,0 +wdoor,324,0 +door,324,0 +bucket,325,0 +bukkit,325,0 +waterbucket,326,0 +waterbukkit,326,0 +wbucket,326,0 +wbukkit,326,0 +magmabucket,327,0 +magmabukkit,327,0 +lavabucket,327,0 +lavabukkit,327,0 +lbucket,327,0 +lbukkit,327,0 +minecart,328,0 +mcart,328,0 +cart,328,0 +saddle,329,0 +irondoor,330,0 +idoor,330,0 +steeldoor,330,0 +sdoor,330,0 +dooriron,330,0 +doori,330,0 +doorsteel,330,0 +doors,330,0 +redstonedust,331,0 +redstone,331,0 +rstonedust,331,0 +rstone,331,0 +redsdust,331,0 +reddust,331,0 +rsdust,331,0 +rdust,331,0 +snow,332,0 +snowball,332,0 +snball,332,0 +sball,332,0 +boat,333,0 +leather,334,0 +cowhide,334,0 +hide,334,0 +milkbucket,335,0 +milkbukkit,335,0 +mbucket,335,0 +mbukkit,335,0 +claybrick,336,0 +brick,336,0 +redbrick,336,0 +rbrick,336,0 +clayball,337,0 +cball,337,0 +clay,337,0 +reeds,338,0 +reed,338,0 +sugarcane,338,0 +scane,338,0 +bamboo,338,0 +paper,339,0 +papyrus,339,0 +book,340,0 +slimeball,341,0 +slball,341,0 +chestminecart,342,0 +storageminecart,342,0 +storagemcart,342,0 +chestmcart,342,0 +storagecart,342,0 +chestcart,342,0 +sminecart,342,0 +cminecart,342,0 +smcart,342,0 +cmcart,342,0 +scart,342,0 +ccart,342,0 +furnaceminecart,343,0 +engineminecart,343,0 +poweredminecart,343,0 +powerminecart,343,0 +enginemcart,343,0 +poweredmcart,343,0 +powermcart,343,0 +furnacemcart,343,0 +enginecart,343,0 +poweredcart,343,0 +powercart,343,0 +furnacecart,343,0 +eminecart,343,0 +pminecart,343,0 +fminecart,343,0 +emcart,343,0 +pmcart,343,0 +fmcart,343,0 +ecart,343,0 +pcart,343,0 +fcart,343,0 +egg,344,0 +compass,345,0 +fishingrod,346,0 +fishrod,346,0 +frod,346,0 +rod,346,0 +watch,347,0 +goldwatch,347,0 +goldclock,347,0 +gwatch,347,0 +gclock,347,0 +clock,347,0 +glowstonedust,348,0 +glowingstonedust,348,0 +lightstonedust,348,0 +lbdust,348,0 +gbdust,348,0 +lsdust,348,0 +gsdust,348,0 +rawfish,349,0 +rafish,349,0 +fish,349,0 +rawsalmonfish,349,1 +rasalmonfish,349,1 +salmonfish,349,1 +rawsalmon,349,1 +rasalmon,349,1 +salmon,349,1 +sfish,349,1 +fishs,349,1 +rawclownfish,349,2 +raclownfish,349,2 +clownfish,349,2 +rawnemo,349,2 +ranemo,349,2 +nemo,349,2 +nemofish,349,2 +fishnemo,349,2 +clfish,349,2 +fishcl,349,2 +nfish,349,2 +fishn,349,2 +rawpufferfish,349,3 +rapufferfish,349,3 +pufferfish,349,3 +pufffish,349,3 +fishpuff,349,3 +pfish,349,3 +fishp,349,3 +cookedfish,350,0 +cookfish,350,0 +cfish,350,0 +grilledfish,350,0 +grillfish,350,0 +gfish,350,0 +roastedfish,350,0 +roastfish,350,0 +rofish,350,0 +cookedsalmonfish,350,1 +cooksalmonfish,350,1 +csalmonfish,350,1 +grilledsalmonfish,350,1 +grillsalmonfish,350,1 +gsalmonfish,350,1 +roastedsalmonfish,350,1 +roastsalmonfish,350,1 +rosalmonfish,350,1 +cookedsalmon,350,1 +cooksalmon,350,1 +csalmon,350,1 +grilledsalmon,350,1 +grillsalmon,350,1 +gsalmon,350,1 +roastedsalmon,350,1 +roastsalmon,350,1 +rosalmon,350,1 +dye,351,0 +inksack,351,0 +inksac,351,0 +isack,351,0 +isac,351,0 +sack,351,0 +sac,351,0 +blackinksack,351,0 +blackinksac,351,0 +blackisack,351,0 +blackisac,351,0 +blacksack,351,0 +blacksac,351,0 +inksackblack,351,0 +inksacblack,351,0 +isackblack,351,0 +isacblack,351,0 +sackblack,351,0 +sacblack,351,0 +blackinksackcolour,351,0 +blackinksaccolour,351,0 +blackisackcolour,351,0 +blackisaccolour,351,0 +blacksackcolour,351,0 +blacksaccolour,351,0 +inksackblackcolour,351,0 +inksacblackcolour,351,0 +isackblackcolour,351,0 +isacclackcolour,351,0 +sackblackcolour,351,0 +sacblackcolour,351,0 +blackinksackcolor,351,0 +blackinksaccolor,351,0 +blackisackcolor,351,0 +blackisaccolor,351,0 +blacksackcolor,351,0 +blacksaccolor,351,0 +inksackblackcolor,351,0 +inksacblackcolor,351,0 +isackblackcolor,351,0 +isacblackcolor,351,0 +sackblackcolor,351,0 +sacblackcolor,351,0 +blackinksackdye,351,0 +blackinksacdye,351,0 +blackisackdye,351,0 +blackisacdye,351,0 +blacksackdye,351,0 +blacksacdye,351,0 +inksackblackdye,351,0 +inksacblackdye,351,0 +isackblackdye,351,0 +isacclackdye,351,0 +sackblackdye,351,0 +sacblackdye,351,0 +blackcolor,351,0 +blackdye,351,0 +rosered,351,1 +roseredcolor,351,1 +roseredcolour,351,1 +rosereddye,351,1 +redrosecolor,351,1 +redrosecolour,351,1 +redrosedye,351,1 +redr,351,1 +redrcolor,351,1 +redrcolour,351,1 +redrdye,351,1 +redcolor,351,1 +redcolour,351,1 +reddye,351,1 +cactusgreen,351,2 +greencactus,351,2 +cactusgreencolour,351,2 +greencactuscolour,351,2 +cactusgreencolor,351,2 +greencactuscolor,351,2 +cactusgreendye,351,2 +greencactusdye,351,2 +greencolour,351,2 +greencolor,351,2 +greendye,351,2 +cocoabeans,351,3 +cocoabean,351,3 +cocobeans,351,3 +cocobean,351,3 +cbeans,351,3 +cbean,351,3 +beans,351,3 +bean,351,3 +browncocoabeans,351,3 +browncocoabean,351,3 +browncocobeans,351,3 +browncocobean,351,3 +browncbeans,351,3 +browncbean,351,3 +brownbeans,351,3 +brownbean,351,3 +brownb,351,3 +cocoabeanscolour,351,3 +cocoabeancolour,351,3 +cocobeanscolour,351,3 +cocobeancolour,351,3 +cbeanscolour,351,3 +cbeancolour,351,3 +beanscolour,351,3 +beancolour,351,3 +browncocoabeanscolour,351,3 +browncocoabeancolour,351,3 +browncocobeanscolour,351,3 +browncocobeancolour,351,3 +browncbeanscolour,351,3 +browncbeancolour,351,3 +brownbeanscolour,351,3 +brownbeancolour,351,3 +brownbcolour,351,3 +cocoabeanscolor,351,3 +cocoabeancolor,351,3 +cocobeanscolor,351,3 +cocobeancolor,351,3 +cbeanscolor,351,3 +cbeancolor,351,3 +beanscolor,351,3 +beancolor,351,3 +browncocoabeanscolor,351,3 +browncocoabeancolor,351,3 +browncocobeanscolor,351,3 +browncocobeancolor,351,3 +browncbeanscolor,351,3 +browncbeancolor,351,3 +brownbeanscolor,351,3 +brownbeancolor,351,3 +brownbcolor,351,3 +cocoabeansdye,351,3 +cocoabeandye,351,3 +cocobeansdye,351,3 +cocobeandye,351,3 +cbeansdye,351,3 +cbeandye,351,3 +beansdye,351,3 +beandye,351,3 +browncocoabeansdye,351,3 +browncocoabeandye,351,3 +browncocobeansdye,351,3 +browncocobeandye,351,3 +browncbeansdye,351,3 +browncbeandye,351,3 +brownbeansdye,351,3 +brownbeandye,351,3 +brownbdye,351,3 +browncolour,351,3 +browncolor,351,3 +browndye,351,3 +lapislazuli,351,4 +bluelapislazuli,351,4 +bluelapisl,351,4 +bluelapis,351,4 +bluel,351,4 +lapislazuliblue,351,4 +lapislblue,351,4 +lapisblue,351,4 +lapisl,351,4 +lapis,351,4 +bluelapislazulicolour,351,4 +bluelapislcolour,351,4 +bluelapiscolour,351,4 +lapislazulibluecolour,351,4 +lapislbluecolour,351,4 +lapisbluecolour,351,4 +lapislazulicolour,351,4 +lapislcolour,351,4 +lapiscolour,351,4 +bluelapislazulicolor,351,4 +bluelapislcolor,351,4 +bluelapiscolor,351,4 +lapislazulibluecolor,351,4 +lapislbluecolor,351,4 +lapisbluecolor,351,4 +lapislazulicolor,351,4 +lapislcolor,351,4 +lapiscolor,351,4 +bluelapislazulidye,351,4 +bluelapisldye,351,4 +bluelapisdye,351,4 +lapislazulibluedye,351,4 +lapislbluedye,351,4 +lapisbluedye,351,4 +lapislazulidye,351,4 +lapisldye,351,4 +lapisdye,351,4 +bluecolour,351,4 +bluecolor,351,4 +bluedye,351,4 +purpledye,351,5 +purplecolour,351,5 +purplecolor,351,5 +cyandye,351,6 +cyancolour,351,6 +cyancolor,351,6 +lightgraydye,351,7 +lightgraycolour,351,7 +lightgraycolor,351,7 +lgraycolour,351,7 +lgraycolor,351,7 +lgraydye,351,7 +lightgreydye,351,7 +lightgreycolour,351,7 +lightgreycolor,351,7 +lgreycolour,351,7 +lgreycolor,351,7 +lgreydye,351,7 +silvercolour,351,7 +silvercolor,351,7 +silverdye,351,7 +darkgraydye,351,8 +darkgraycolour,351,8 +darkgraycolor,351,8 +dgraycolour,351,8 +dgraycolor,351,8 +dgraydye,351,8 +graycolour,351,8 +graycolor,351,8 +graydye,351,8 +darkgreydye,351,8 +darkgreycolour,351,8 +darkgreycolor,351,8 +dgreycolour,351,8 +dgreycolor,351,8 +dgreydye,351,8 +greycolour,351,8 +greycolor,351,8 +greydye,351,8 +pinkdye,351,9 +pinkcolour,351,9 +pinkcolor,351,9 +limedye,351,10 +limecolour,351,10 +limecolor,351,10 +dandelionyellow,351,11 +dandelionyellowcolour,351,11 +dandelionyellowcolor,351,11 +dandelionyellowdye,351,11 +yellowdandelioncolour,351,11 +yellowdandelioncolor,351,11 +yellowdandeliondye,351,11 +yellowd,351,11 +yellowdcolour,351,11 +yellowdcolor,351,11 +yellowddye,351,11 +dyellow,351,11 +dyellowcolour,351,11 +dyellowcolor,351,11 +dyellowdye,351,11 +yellowcolour,351,11 +yellowcolor,351,11 +yellowdye,351,11 +lightbluecolour,351,12 +lightbluecolor,351,12 +lightbluedye,351,12 +lbluecolour,351,12 +lbluecolor,351,12 +lbluedye,351,12 +magentacolour,351,13 +magentacolor,351,13 +magentadye,351,13 +orangecolour,351,14 +orangecolor,351,14 +orangedye,351,14 +bonemeal,351,15 +whitebonemeal,351,15 +whitebonemealcolour,351,15 +whitebonemealcolor,351,15 +whitebonemealdye,351,15 +bonemealwhite,351,15 +bonemealwhitecolour,351,15 +bonemealwhitecolor,351,15 +bonemealwhitedye,351,15 +whitebonem,351,15 +whitebonemcolour,351,15 +whitebonemcolor,351,15 +whitebonemdye,351,15 +bonemwhite,351,15 +bonemwhitecolour,351,15 +bonemwhitecolor,351,15 +bonemwhitedye,351,15 +bonemealcolour,351,15 +bonemealcolor,351,15 +bonemealdye,351,15 +bonem,351,15 +bonemcolour,351,15 +bonemcolor,351,15 +bonemdye,351,15 +whitecolour,351,15 +whitecolor,351,15 +whitedye,351,15 +bone,352,0 +sugar,353,0 +whitedust,353,0 +cake,354,0 +bed,355,0 +redstonerepeater,356,0 +redstonerepeat,356,0 +redstonedelayer,356,0 +redstonedelay,356,0 +redstonedioder,356,0 +redstonediode,356,0 +rstonerepeater,356,0 +rstonerepeat,356,0 +rstonedelayer,356,0 +rstonedelay,356,0 +rstonedioder,356,0 +rstonediode,356,0 +redsrepeater,356,0 +redsrepeat,356,0 +redsdelayer,356,0 +redsdelay,356,0 +redsdioder,356,0 +redsdiode,356,0 +rsrepeater,356,0 +rsrepeat,356,0 +rsdelayer,356,0 +rsdelay,356,0 +rsdioder,356,0 +rsdiode,356,0 +repeater,356,0 +repeat,356,0 +delayer,356,0 +delay,356,0 +dioder,356,0 +diode,356,0 +cookie,357,0 +chart,358,0 +map0,358,0 +map1,358,1 +map2,358,2 +map3,358,3 +map4,358,4 +map5,358,5 +map6,358,6 +map7,358,7 +map8,358,8 +map9,358,9 +map10,358,10 +map11,358,11 +map12,358,12 +map13,358,13 +map14,358,14 +map15,358,15 +shears,359,0 +shear,359,0 +sheers,359,0 +sheer,359,0 +woolcutters,359,0 +woolcutter,359,0 +cutterswool,359,0 +cutterwool,359,0 +melonslice,360,0 +mslice,360,0 +slicemelon,360,0 +watermelonslice,360,0 +greenmelonslice,360,0 +melongreenslice,360,0 +pumpkinseeds,361,0 +pseeds,361,0 +seedsp,361,0 +seedspumpkin,361,0 +pumpseeds,361,0 +seedspump,361,0 +melonseeds,362,0 +mseeds,362,0 +watermelonseeds,362,0 +greenmelonseeds,362,0 +gmelonseeds,362,0 +seedsmelon,362,0 +seedswatermelon,362,0 +rawbeef,363,0 +rawsteak,363,0 +uncookedbeef,363,0 +uncookedsteak,363,0 +cowmeat,363,0 +plainbeef,363,0 +beef,364,0 +steak,364,0 +cookedbeef,364,0 +grilledbeef,364,0 +cookedsteak,364,0 +grilledsteak,364,0 +cookedcowmeat,364,0 +rawchicken,365,0 +uncookedchicken,365,0 +plainchicken,365,0 +chickenplain,365,0 +chickenuncooked,365,0 +chickenraw,365,0 +cookedchicken,366,0 +grilledchicken,366,0 +toastedchicken,366,0 +gchicken,366,0 +bbqchicken,366,0 +friedchicken,366,0 +cchicken,366,0 +rottenflesh,367,0 +zombieflesh,367,0 +rottenmeat,367,0 +zombiemeat,367,0 +badflesh,367,0 +poisonflesh,367,0 +zombieremains,367,0 +enderpearl,368,0 +endpearl,368,0 +pearl,368,0 +epearl,368,0 +bluepearl,368,0 +endergem,368,0 +blazerod,369,0 +goldenrod,369,0 +goldrod,369,0 +blazestick,369,0 +goldstick,369,0 +brod,369,0 +grod,369,0 +bstick,369,0 +gstick,369,0 +ghasttear,370,0 +ghastdrop,370,0 +ghosttear,370,0 +ghostdrop,370,0 +gtear,370,0 +gdrop,370,0 +tear,370,0 +goldnugget,371,0 +gnugget,371,0 +goldpebble,371,0 +gpebble,371,0 +goldball,371,0 +gball,371,0 +netherstalk,372,0 +deathstalk,372,0 +hellstalk,372,0 +nstalk,372,0 +dstalk,372,0 +hstalk,372,0 +netherwarts,372,0 +netherwart,372,0 +netherplant,372,0 +nethercrop,372,0 +hellwarts,372,0 +hellwart,372,0 +hellplant,372,0 +hellcrop,372,0 +deathwarts,372,0 +deathwart,372,0 +deathplant,372,0 +deathcrop,372,0 +nwarts,372,0 +nwart,372,0 +ncrop,372,0 +nplant,372,0 +hwarts,372,0 +hwart,372,0 +hplant,372,0 +hcrop,372,0 +dwarts,372,0 +dwart,372,0 +dplant,372,0 +dcrop,372,0 +potion,373,0 +mixture,373,0 +potions,373,0 +waterbottle,373,0 +fullbottle,373,0 +watervase,373,0 +fullvase,373,0 +clearpotion,373,6 +clearpot,373,6 +clearextendedpotion,373,7 +clearexpotion,373,7 +clear2potion,373,7 +clearextendedpot,373,7 +clearexpot,373,7 +clear2pot,373,7 +diffusepotion,373,11 +diffusepot,373,11 +artlesspotion,373,13 +artlesspot,373,13 +thinpotion,373,14 +thinpot,373,14 +thinextendedpotion,373,15 +thinexpotion,373,15 +thin2potion,373,15 +thinextendedpot,373,15 +thinexpot,373,15 +thin2pot,373,15 +awkwardpotion,373,16 +awkwardpot,373,16 +bunglingpotion,373,22 +bunglingpot,373,22 +bunglingextendedpotion,373,23 +bunglingexpotion,373,23 +bungling2potion,373,23 +bunglingextendedpot,373,23 +bunglingexpot,373,23 +bungling2pot,373,23 +smoothpotion,373,27 +smoothpot,373,27 +suavepotion,373,29 +suavepot,373,29 +debonairpotion,373,30 +debonairpot,373,30 +debonairextendedpotion,373,31 +debonairexpotion,373,31 +debonair2potion,373,31 +debonairextendedpot,373,31 +debonairexpot,373,31 +debonair2pot,373,31 +thickpotion,373,32 +thickpot,373,32 +charmingpotion,373,38 +charmingpot,373,38 +charmingextendedpotion,373,39 +charmingexpotion,373,39 +charming2potion,373,39 +charmingextendedpot,373,39 +charmingexpot,373,39 +charming2pot,373,39 +refinedpotion,373,43 +refinedpot,373,43 +cordialpotion,373,45 +cordialpot,373,45 +sparklingpotion,373,46 +sparklingpot,373,46 +sparklingextendedpotion,373,47 +sparklingexpotion,373,47 +sparkling2potion,373,47 +sparklingextendedpot,373,47 +sparklingexpot,373,47 +sparkling2pot,373,47 +potentpotion,373,48 +potentpot,373,48 +rankpotion,373,54 +rankpot,373,54 +rankextendedpotion,373,55 +rankexpotion,373,55 +rank2potion,373,55 +rankextendedpot,373,55 +rankexpot,373,55 +rank2pot,373,55 +acridpotion,373,59 +acridpot,373,59 +grosspotion,373,61 +grosspot,373,61 +stinkypotion,373,62 +stinkypot,373,62 +stinkyextendedpotion,373,63 +stinkyexpotion,373,63 +stinky2potion,373,63 +stinkyextendedpot,373,63 +stinkyexpot,373,63 +stinky2pot,373,63 +mundaneextendedpotion,373,64 +mundaneexpotion,373,64 +mundane2potion,373,64 +mundaneextendedpot,373,64 +mundaneexpot,373,64 +mundane2pot,373,64 +mundanepotion,373,8192 +mundanepot,373,8192 +regenerationpotion,373,8193 +regeneratepotion,373,8193 +regenpotion,373,8193 +regenerationpot,373,8193 +regeneratepot,373,8193 +regenpot,373,8193 +rpot,373,8193 +swiftnesspotion,373,8194 +swiftpotion,373,8194 +speedpotion,373,8194 +swiftnesspot,373,8194 +swiftpot,373,8194 +speedpot,373,8194 +swpot,373,8194 +fireresistancepotion,373,8195 +fireresistpotion,373,8195 +firerespotion,373,8195 +fireresistancepot,373,8195 +fireresistpot,373,8195 +firerespot,373,8195 +fpot,373,8195 +poisonpotion,373,8196 +acidpotion,373,8196 +poisonpot,373,8196 +acidpot,373,8196 +ppot,373,8196 +healingpotion,373,8197 +healpotion,373,8197 +lifepotion,373,8197 +healingpot,373,8197 +healpot,373,8197 +lifepot,373,8197 +hpot,373,8197 +nightvisionpotion,373,8198 +nvisionpotion,373,8198 +nightvpotion,373,8198 +darkvisionpotion,373,8198 +dvisionpotion,373,8198 +darkvpotion,373,8198 +nightvisionpot,373,8198 +nvisionpot,373,8198 +nightvpot,373,8198 +darkvisionpot,373,8198 +dvisionpot,373,8198 +darkvpot,373,8198 +npot,373,8198 +weaknesspotion,373,8200 +weakpotion,373,8200 +weaknesspot,373,8200 +weakpot,373,8200 +wpot,373,8200 +strengthpotion,373,8201 +strongpotion,373,8201 +strpotion,373,8201 +strengthpot,373,8201 +strongpot,373,8201 +strpot,373,8201 +stpot,373,8201 +slownesspotion,373,8202 +slowpotion,373,8202 +slownesspot,373,8202 +slowpot,373,8202 +slpot,373,8202 +harmingpotion,373,8204 +damagepotion,373,8204 +dmgpotion,373,8204 +harmingpot,373,8204 +damagepot,373,8204 +dmgpot,373,8204 +dpot,373,8204 +waterbreathingpotion,373,8205 +waterbreathpotion,373,8205 +breathingpotion,373,8205 +breathpotion,373,8205 +waterbreathingpot,373,8205 +waterbreathpot,373,8205 +breathingpot,373,8205 +breathpot,373,8205 +wbpot,373,8205 +invisibilitypotion,373,8206 +invisiblepotion,373,8206 +invpotion,373,8206 +invisibilitypot,373,8206 +invisiblepot,373,8206 +invpot,373,8206 +ipot,373,8206 +regenerationleveliipotion,373,8225 +regenerateleveliipotion,373,8225 +regenleveliipotion,373,8225 +regenerationlevel2potion,373,8225 +regeneratelevel2potion,373,8225 +regenlevel2potion,373,8225 +regenerationiipotion,373,8225 +regenerateiipotion,373,8225 +regeniipotion,373,8225 +regenerationleveliipot,373,8225 +regenerateleveliipot,373,8225 +regenleveliipot,373,8225 +regenerationlevel2pot,373,8225 +regeneratelevel2pot,373,8225 +regenlevel2pot,373,8225 +regenerationiipot,373,8225 +regenerateiipot,373,8225 +regeniipot,373,8225 +r2pot,373,8225 +swiftnessleveliipotion,373,8226 +swiftleveliipotion,373,8226 +speedleveliipotion,373,8226 +swiftnesslevel2potion,373,8226 +swiftlevel2potion,373,8226 +speedlevel2potion,373,8226 +swiftnessiipotion,373,8226 +swiftiipotion,373,8226 +speediipotion,373,8226 +swiftnessleveliipot,373,8226 +swiftleveliipot,373,8226 +speedleveliipot,373,8226 +swiftnesslevel2pot,373,8226 +swiftlevel2pot,373,8226 +speedlevel2pot,373,8226 +swiftnessiipot,373,8226 +swiftiipot,373,8226 +speediipot,373,8226 +sw2pot,373,8226 +poisonleveliipotion,373,8228 +acidleveliipotion,373,8228 +poisonlevel2potion,373,8228 +acidlevel2potion,373,8228 +poisoniipotion,373,8228 +acidiipotion,373,8228 +poisonleveliipot,373,8228 +acidleveliipot,373,8228 +poisonlevel2pot,373,8228 +acidlevel2pot,373,8228 +poisoniipot,373,8228 +acidiipot,373,8228 +p2pot,373,8228 +healingleveliipotion,373,8229 +healleveliipotion,373,8229 +healinglevel2potion,373,8229 +heallevel2potion,373,8229 +healingiipotion,373,8229 +healiipotion,373,8229 +healingleveliipot,373,8229 +healleveliipot,373,8229 +healinglevel2pot,373,8229 +heallevel2pot,373,8229 +healingiipot,373,8229 +healiipot,373,8229 +h2pot,373,8229 +strengthleveliipotion,373,8233 +strongleveliipotion,373,8233 +strleveliipotion,373,8233 +strengthlevel2potion,373,8233 +stronglevel2potion,373,8233 +strlevel2potion,373,8233 +strengthiipotion,373,8233 +strongiipotion,373,8233 +striipotion,373,8233 +strengthleveliipot,373,8233 +strongleveliipot,373,8233 +strleveliipot,373,8233 +strengthlevel2pot,373,8233 +stronglevel2pot,373,8233 +strlevel2pot,373,8233 +strengthiipot,373,8233 +strongiipot,373,8233 +striipot,373,8233 +st2pot,373,8233 +harmingleveliipotion,373,8236 +damageleveliipotion,373,8236 +dmgleveliipotion,373,8236 +harminglevel2potion,373,8236 +damagelevel2potion,373,8236 +dmglevel2potion,373,8236 +harmingiipotion,373,8236 +damageiipotion,373,8236 +dmgiipotion,373,8236 +harmingleveliipot,373,8236 +damageleveliipot,373,8236 +dmgleveliipot,373,8236 +harminglevel2pot,373,8236 +damagelevel2pot,373,8236 +dmglevel2pot,373,8236 +harmingiipot,373,8236 +damageiipot,373,8236 +dmgiipot,373,8236 +d2pot,373,8236 +regenerationextendedpotion,373,8257 +regenerateextendedpotion,373,8257 +regenextendepotion,373,8257 +regenerationexpotion,373,8257 +regenerateexpotion,373,8257 +regenexpotion,373,8257 +regenerationextendedpot,373,8257 +regenerateextendedpot,373,8257 +regenextendepot,373,8257 +regenerationexpot,373,8257 +regenerateexpot,373,8257 +regenexpot,373,8257 +repot,373,8257 +swiftnessextendedpotion,373,8258 +swiftextendedpotion,373,8258 +speedextendedpotion,373,8258 +swiftnessexpotion,373,8258 +swiftexpotion,373,8258 +speedexpotion,373,8258 +swiftnessextendedpot,373,8258 +swiftextendedpot,373,8258 +speedextendedpot,373,8258 +swiftnessexpot,373,8258 +swiftexpot,373,8258 +speedexpot,373,8258 +swepot,373,8258 +fireresistanceextendedpotion,373,8259 +fireresistextendedpotion,373,8259 +fireresextendedpotion,373,8259 +fireresistanceexpotion,373,8259 +fireresistexpotion,373,8259 +fireresexpotion,373,8259 +fireresistanceextendedpot,373,8259 +fireresistextendedpot,373,8259 +fireresextendedpot,373,8259 +fireresistanceexpot,373,8259 +fireresistexpot,373,8259 +fireresexpot,373,8259 +fepot,373,8259 +poisonextendedpotion,373,8260 +acidextendedpotion,373,8260 +poisonexpotion,373,8260 +acidexpotion,373,8260 +poisonextendedpot,373,8260 +acidextendedpot,373,8260 +poisonexpot,373,8260 +acidexpot,373,8260 +pepot,373,8260 +nightvisionextendedpotion,373,8262 +nvisionextendedpotion,373,8262 +nightvextendedpotion,373,8262 +darkvisionextendedpotion,373,8262 +dvisionextendedpotion,373,8262 +darkvextendedpotion,373,8262 +nightvisionexpotion,373,8262 +nvisionexpotion,373,8262 +nightvexpotion,373,8262 +darkvisionexpotion,373,8262 +dvisionexpotion,373,8262 +darkvexpotion,373,8262 +nightvisionextendedpot,373,8262 +nvisionextendedpot,373,8262 +nightvextendedpot,373,8262 +darkvisionextendedpot,373,8262 +dvisionextendedpot,373,8262 +darkvextendedpot,373,8262 +nightvisionexpot,373,8262 +nvisionexpot,373,8262 +nightvexpot,373,8262 +darkvisionexpot,373,8262 +dvisionexpot,373,8262 +darkvexpot,373,8262 +nepot,373,8262 +weaknessextendedpotion,373,8264 +weakextendedpotion,373,8264 +weaknessexpotion,373,8264 +weakexpotion,373,8264 +weaknessextendedpot,373,8264 +weakextendedpot,373,8264 +weaknessexpot,373,8264 +weakexpot,373,8264 +wepot,373,8264 +strengthextendedpotion,373,8265 +strongextendedpotion,373,8265 +strextendedpotion,373,8265 +strengthexpotion,373,8265 +strongexpotion,373,8265 +strexpotion,373,8265 +strengthextendedpot,373,8265 +strongextendedpot,373,8265 +strextendedpot,373,8265 +strengthexpot,373,8265 +strongexpot,373,8265 +strexpot,373,8265 +stepot,373,8265 +slownessextendedpotion,373,8266 +slowextenedpotion,373,8266 +slownessexpotion,373,8266 +slowexpotion,373,8266 +slownessextendedpot,373,8266 +slowextenedpot,373,8266 +slownessexpot,373,8266 +slowexpot,373,8266 +slepot,373,8266 +waterbreathingextendedpotion,373,8269 +waterbreathextendedpotion,373,8269 +breathingextendedpotion,373,8269 +breathextendedpotion,373,8269 +waterbreathingextendedpot,373,8269 +waterbreathextendedpot,373,8269 +breathingextendedpot,373,8269 +breathextendedpot,373,8269 +waterbreathingexpotion,373,8269 +waterbreathexpotion,373,8269 +breathingexpotion,373,8269 +breathexpotion,373,8269 +waterbreathingexpot,373,8269 +waterbreathexpot,373,8269 +breathingexpot,373,8269 +breathexpot,373,8269 +wbepot,373,8269 +invisibilityextendedpotion,373,8270 +invisibleextendedpotion,373,8270 +invextendedpotion,373,8270 +invisibilityexpotion,373,8270 +invisibleexpotion,373,8270 +invexpotion,373,8270 +invisibilityextendedpot,373,8270 +invisibleextendedpot,373,8270 +invextendedpot,373,8270 +invisibilityexpot,373,8270 +invisibleexpot,373,8270 +invexpot,373,8270 +iepot,373,8270 +regenerationdualbitpotion,373,8289 +regeneratedualbitpotion,373,8289 +regendualbitpotion,373,8289 +regenerationdbpotion,373,8289 +regeneratedbpotion,373,8289 +regendbpotion,373,8289 +regenerationdualbitpot,373,8289 +regeneratedualbitpot,373,8289 +regendualbitpot,373,8289 +regenerationdbpot,373,8289 +regeneratedbpot,373,8289 +regendbpot,373,8289 +rdbpot,373,8289 +swiftnessdualbitpotion,373,8290 +swiftdualbitpotion,373,8290 +speeddualbitpotion,373,8290 +swiftnessdualbitpot,373,8290 +swiftdualbitpot,373,8290 +speeddualbitpot,373,8290 +swiftnessdbpotion,373,8290 +swiftdbpotion,373,8290 +speeddbpotion,373,8290 +swiftnessdbpot,373,8290 +swiftdbpot,373,8290 +speeddbpot,373,8290 +swdbpot,373,8290 +poisondualbitpotion,373,8292 +aciddualbitpotion,373,8292 +poisondualbitpot,373,8292 +aciddualbitpot,373,8292 +poisondbpotion,373,8292 +aciddbpotion,373,8292 +poisondbpot,373,8292 +aciddbpot,373,8292 +pdbpot,373,8292 +strengthdualbitpotion,373,8297 +strongdualbitpotion,373,8297 +strdualbitpotion,373,8297 +strengthdualbitpot,373,8297 +strongdualbitpot,373,8297 +strdualbitpot,373,8297 +strengthdbpotion,373,8297 +strongdbpotion,373,8297 +strdbpotion,373,8297 +strengthdbpot,373,8297 +strongdbpot,373,8297 +strdbpot,373,8297 +stdbpot,373,8297 +splashmundanepotion,373,16384 +splmundanepotion,373,16384 +splashregenerationpotion,373,16385 +splashregeneratepotion,373,16385 +splashregenpotion,373,16385 +splashregenerationpot,373,16385 +splashregeneratepot,373,16385 +splashregenpot,373,16385 +regenerationsplashpotion,373,16385 +regeneratesplashpotion,373,16385 +regensplashpotion,373,16385 +splregenerationpotion,373,16385 +splregeneratepotion,373,16385 +splregenpotion,373,16385 +splregenerationpot,373,16385 +splregeneratepot,373,16385 +splregenpot,373,16385 +sprpot,373,16385 +splashswiftnesspotion,373,16386 +splashswiftpotion,373,16386 +splashspeedpotion,373,16386 +splashswiftnesspot,373,16386 +splashswiftpot,373,16386 +splashspeedpot,373,16386 +splswiftnesspotion,373,16386 +splswiftpotion,373,16386 +splspeedpotion,373,16386 +splswiftnesspot,373,16386 +splswiftpot,373,16386 +splspeedpot,373,16386 +spswpot,373,16386 +splashfireresistancepotion,373,16387 +splashfireresistpotion,373,16387 +splashfirerespotion,373,16387 +splashfireresistancepot,373,16387 +splashfireresistpot,373,16387 +splashfirerespot,373,16387 +splfireresistancepotion,373,16387 +splfireresistpotion,373,16387 +splfirerespotion,373,16387 +splfireresistancepot,373,16387 +splfireresistpot,373,16387 +splfirerespot,373,16387 +spfpot,373,16387 +splashpoisonpotion,373,16388 +splashacidpotion,373,16388 +splashpoisonpot,373,16388 +splashacidpot,373,16388 +splpoisonpotion,373,16388 +splacidpotion,373,16388 +splpoisonpot,373,16388 +splacidpot,373,16388 +spppot,373,16388 +splashhealingpotion,373,16389 +splashhealpotion,373,16389 +splashlifepotion,373,16389 +splashhealingpot,373,16389 +splashhealpot,373,16389 +splashlifepot,373,16389 +splhealingpotion,373,16389 +splhealpotion,373,16389 +spllifepotion,373,16389 +splhealingpot,373,16389 +splhealpot,373,16389 +spllifepot,373,16389 +sphpot,373,16389 +splashclearpotion,373,16390 +splashclearpot,373,16390 +splclearpotion,373,16390 +splclearpot,373,16390 +splashnightvisionpotion,373,16390 +splashnvisionpotion,373,16390 +splashnightvpotion,373,16390 +splashdarkvisionpotion,373,16390 +splashdvisionpotion,373,16390 +splashdarkvpotion,373,16390 +splashnightvisionpot,373,16390 +splashnvisionpot,373,16390 +splashnightvpot,373,16390 +splashdarkvisionpot,373,16390 +splashdvisionpot,373,16390 +splashdarkvpot,373,16390 +splnightvisionpotion,373,16390 +splnvisionpotion,373,16390 +splnightvpotion,373,16390 +spldarkvisionpotion,373,16390 +spldvisionpotion,373,16390 +spldarkvpotion,373,16390 +splnightvisionpot,373,16390 +splnvisionpot,373,16390 +splnightvpot,373,16390 +spldarkvisionpot,373,16390 +spldvisionpot,373,16390 +spldarkvpot,373,16390 +spnpot,373,16390 +splashclearextendedpotion,373,16391 +splashclearexpotion,373,16391 +splashclear2potion,373,16391 +splashclearextendedpot,373,16391 +splashclearexpot,373,16391 +splashclear2pot,373,16391 +splclearextendedpotion,373,16391 +splclearexpotion,373,16391 +splclear2potion,373,16391 +splclearextendedpot,373,16391 +splclearexpot,373,16391 +splclear2pot,373,16391 +splashweaknesspotion,373,16392 +splashweakpotion,373,16392 +splashweaknesspot,373,16392 +splashweakpot,373,16392 +splweaknesspotion,373,16392 +splweakpotion,373,16392 +splweaknesspot,373,16392 +splweakpot,373,16392 +spwpot,373,16392 +splashstrengthpotion,373,16393 +splashstrongpotion,373,16393 +splashstrpotion,373,16393 +splashstrengthpot,373,16393 +splashstrongpot,373,16393 +splashstrpot,373,16393 +splstrengthpotion,373,16393 +splstrongpotion,373,16393 +splstrpotion,373,16393 +splstrengthpot,373,16393 +splstrongpot,373,16393 +splstrpot,373,16393 +spstpot,373,16393 +splashslownesspotion,373,16394 +splashslowpotion,373,16394 +splashslownesspot,373,16394 +splashslowpot,373,16394 +splslownesspotion,373,16394 +splslowpotion,373,16394 +splslownesspot,373,16394 +splslowpot,373,16394 +spslpot,373,16394 +splashdiffusepotion,373,16395 +splashdiffusepot,373,16395 +spldiffusepotion,373,16395 +spldiffusepot,373,16395 +splashharmingpotion,373,16396 +splashdamagepotion,373,16396 +splashdmgpotion,373,16396 +splashharmingpot,373,16396 +splashdamagepot,373,16396 +splashdmgpot,373,16396 +splharmingpotion,373,16396 +spldamagepotion,373,16396 +spldmgpotion,373,16396 +splharmingpot,373,16396 +spldamagepot,373,16396 +spldmgpot,373,16396 +spdpot,373,16396 +splashartlesspotion,373,16397 +splashartlesspot,373,16397 +splartlesspotion,373,16397 +splartlesspot,373,16397 +splashwaterbreathingpotion,373,16397 +splashwaterbreathpotion,373,16397 +splashbreathingpotion,373,16397 +splashbreathpotion,373,16397 +splashwaterbreathingpot,373,16397 +splashwaterbreathpot,373,16397 +splashbreathingpot,373,16397 +splashbreathpot,373,16397 +splwaterbreathingpotion,373,16397 +splwaterbreathpotion,373,16397 +splbreathingpotion,373,16397 +splbreathpotion,373,16397 +splwaterbreathingpot,373,16397 +splwaterbreathpot,373,16397 +splbreathingpot,373,16397 +splbreathpot,373,16397 +spwbpot,373,16397 +splashthinpotion,373,16398 +splashthinpot,373,16398 +splthinpotion,373,16398 +splthinpot,373,16398 +splashinvisibilitypotion,373,16398 +splashinvisiblepotion,373,16398 +splashinvpotion,373,16398 +splashinvisibilitypot,373,16398 +splashinvisiblepot,373,16398 +splashinvpot,373,16398 +splinvisibilitypotion,373,16398 +splinvisiblepotion,373,16398 +splinvpotion,373,16398 +splinvisibilitypot,373,16398 +splinvisiblepot,373,16398 +splinvpot,373,16398 +spipot,373,16398 +splashthinextendedpotion,373,16399 +splashthinexpotion,373,16399 +splashthin2potion,373,16399 +splashthinextendedpot,373,16399 +splashthinexpot,373,16399 +splashthin2pot,373,16399 +splthinextendedpotion,373,16399 +splthinexpotion,373,16399 +splthin2potion,373,16399 +splthinextendedpot,373,16399 +splthinexpot,373,16399 +splthin2pot,373,16399 +splashawkwardpotion,373,16400 +splashawkwardpot,373,16400 +splawkwardpotion,373,16400 +splawkwardpot,373,16400 +splashbunglingpotion,373,16406 +splashbunglingpot,373,16406 +splbunglingpotion,373,16406 +splbunglingpot,373,16406 +splashbunglingextendedpotion,373,16407 +splashbunglingexpotion,373,16407 +splashbungling2potion,373,16407 +splashbunglingextendedpot,373,16407 +splashbunglingexpot,373,16407 +splashbungling2pot,373,16407 +splbunglingextendedpotion,373,16407 +splbunglingexpotion,373,16407 +splbungling2potion,373,16407 +splbunglingextendedpot,373,16407 +splbunglingexpot,373,16407 +splbungling2pot,373,16407 +splashsmoothpotion,373,16411 +splashsmoothpot,373,16411 +splsmoothpotion,373,16411 +splsmoothpot,373,16411 +splashsuavepotion,373,16413 +splashsuavepot,373,16413 +splsuavepotion,373,16413 +splsuavepot,373,16413 +splashdebonairpotion,373,16414 +splashdebonairpot,373,16414 +spldebonairpotion,373,16414 +spldebonairpot,373,16414 +splashdebonairextendedpotion,373,16415 +splashdebonairexpotion,373,16415 +splashdebonair2potion,373,16415 +splashdebonairextendedpot,373,16415 +splashdebonairexpot,373,16415 +splashdebonair2pot,373,16415 +spldebonairextendedpotion,373,16415 +spldebonairexpotion,373,16415 +spldebonair2potion,373,16415 +spldebonairextendedpot,373,16415 +spldebonairexpot,373,16415 +spldebonair2pot,373,16415 +splashthickpotion,373,16416 +splashthickpot,373,16416 +splthickpotion,373,16416 +splthickpot,373,16416 +splashregenerationleveliipotion,373,16417 +splashregenerateleveliipotion,373,16417 +splashregenleveliipotion,373,16417 +splashregenerationlevel2potion,373,16417 +splashregeneratelevel2potion,373,16417 +splashregenlevel2potion,373,16417 +splashregenerationiipotion,373,16417 +splashregenerateiipotion,373,16417 +splashregeniipotion,373,16417 +splashregenerationleveliipot,373,16417 +splashregenerateleveliipot,373,16417 +splashregenleveliipot,373,16417 +splashregenerationlevel2pot,373,16417 +splashregeneratelevel2pot,373,16417 +splashregenlevel2pot,373,16417 +splashregenerationiipot,373,16417 +splashregenerateiipot,373,16417 +splashregeniipot,373,16417 +splregenerationleveliipotion,373,16417 +splregenerateleveliipotion,373,16417 +splregenleveliipotion,373,16417 +splregenerationlevel2potion,373,16417 +splregeneratelevel2potion,373,16417 +splregenlevel2potion,373,16417 +splregenerationiipotion,373,16417 +splregenerateiipotion,373,16417 +splregeniipotion,373,16417 +splregenerationleveliipot,373,16417 +splregenerateleveliipot,373,16417 +splregenleveliipot,373,16417 +splregenerationlevel2pot,373,16417 +splregeneratelevel2pot,373,16417 +splregenlevel2pot,373,16417 +splregenerationiipot,373,16417 +splregenerateiipot,373,16417 +splregeniipot,373,16417 +spr2pot,373,16417 +splashswiftnessleveliipotion,373,16418 +splashswiftleveliipotion,373,16418 +splashspeedleveliipotion,373,16418 +splashswiftnesslevel2potion,373,16418 +splashswiftlevel2potion,373,16418 +splashspeedlevel2potion,373,16418 +splashswiftnessiipotion,373,16418 +splashswiftiipotion,373,16418 +splashspeediipotion,373,16418 +splashswiftnessleveliipot,373,16418 +splashswiftleveliipot,373,16418 +splashspeedleveliipot,373,16418 +splashswiftnesslevel2pot,373,16418 +splashswiftlevel2pot,373,16418 +splashspeedlevel2pot,373,16418 +splashswiftnessiipot,373,16418 +splashswiftiipot,373,16418 +splashspeediipot,373,16418 +splswiftnessleveliipotion,373,16418 +splswiftleveliipotion,373,16418 +splspeedleveliipotion,373,16418 +splswiftnesslevel2potion,373,16418 +splswiftlevel2potion,373,16418 +splspeedlevel2potion,373,16418 +splswiftnessiipotion,373,16418 +splswiftiipotion,373,16418 +splspeediipotion,373,16418 +splswiftnessleveliipot,373,16418 +splswiftleveliipot,373,16418 +splspeedleveliipot,373,16418 +splswiftnesslevel2pot,373,16418 +splswiftlevel2pot,373,16418 +splspeedlevel2pot,373,16418 +splswiftnessiipot,373,16418 +splswiftiipot,373,16418 +splspeediipot,373,16418 +spsw2pot,373,16418 +splashpoisonleveliipotion,373,16420 +splashacidleveliipotion,373,16420 +splashpoisonlevel2potion,373,16420 +splashacidlevel2potion,373,16420 +splashpoisoniipotion,373,16420 +splashacidiipotion,373,16420 +splashpoisonleveliipot,373,16420 +splashacidleveliipot,373,16420 +splashpoisonlevel2pot,373,16420 +splashacidlevel2pot,373,16420 +splashpoisoniipot,373,16420 +splashacidiipot,373,16420 +splpoisonleveliipotion,373,16420 +splacidleveliipotion,373,16420 +splpoisonlevel2potion,373,16420 +splcidlevel2potion,373,16420 +splpoisoniipotion,373,16420 +splacidiipotion,373,16420 +splpoisonleveliipot,373,16420 +splacidleveliipot,373,16420 +splpoisonlevel2pot,373,16420 +splacidlevel2pot,373,16420 +splpoisoniipot,373,16420 +splacidiipot,373,16420 +spp2pot,373,16420 +splashhealingleveliipotion,373,16421 +splashhealleveliipotion,373,16421 +splashhealinglevel2potion,373,16421 +splashheallevel2potion,373,16421 +splashhealingiipotion,373,16421 +splashhealiipotion,373,16421 +splashhealingleveliipot,373,16421 +splashhealleveliipot,373,16421 +splashhealinglevel2pot,373,16421 +splashheallevel2pot,373,16421 +splashhealingiipot,373,16421 +splashhealiipot,373,16421 +splhealingleveliipotion,373,16421 +splhealleveliipotion,373,16421 +splhealinglevel2potion,373,16421 +splheallevel2potion,373,16421 +splhealingiipotion,373,16421 +splhealiipotion,373,16421 +splhealingleveliipot,373,16421 +splhealleveliipot,373,16421 +splhealinglevel2pot,373,16421 +splheallevel2pot,373,16421 +splhealingiipot,373,16421 +splhealiipot,373,16421 +sph2pot,373,16421 +splashcharmingpotion,373,16422 +splashcharmingpot,373,16422 +splcharmingpotion,373,16422 +splcharmingpot,373,16422 +splashcharmingextendedpotion,373,16423 +splashcharmingexpotion,373,16423 +splashcharming2potion,373,16423 +splashcharmingextendedpot,373,16423 +splashcharmingexpot,373,16423 +splashcharming2pot,373,16423 +splcharmingextendedpotion,373,16423 +splcharmingexpotion,373,16423 +splcharming2potion,373,16423 +splcharmingextendedpot,373,16423 +splcharmingexpot,373,16423 +splcharming2pot,373,16423 +splashstrengthleveliipotion,373,16425 +splashstrongleveliipotion,373,16425 +splashstrleveliipotion,373,16425 +splashstrengthlevel2potion,373,16425 +splashstronglevel2potion,373,16425 +splashstrlevel2potion,373,16425 +splashstrengthiipotion,373,16425 +splashstrongiipotion,373,16425 +splashstriipotion,373,16425 +splashstrengthleveliipot,373,16425 +splashstrongleveliipot,373,16425 +splashstrleveliipot,373,16425 +splashstrengthlevel2pot,373,16425 +splashstronglevel2pot,373,16425 +splashstrlevel2pot,373,16425 +splashstrengthiipot,373,16425 +splashstrongiipot,373,16425 +splashstriipot,373,16425 +splstrengthleveliipotion,373,16425 +splstrongleveliipotion,373,16425 +splstrleveliipotion,373,16425 +splstrengthlevel2potion,373,16425 +splstronglevel2potion,373,16425 +splstrlevel2potion,373,16425 +splstrengthiipotion,373,16425 +splstrongiipotion,373,16425 +splstriipotion,373,16425 +splstrengthleveliipot,373,16425 +splstrongleveliipot,373,16425 +splstrleveliipot,373,16425 +splstrengthlevel2pot,373,16425 +splstronglevel2pot,373,16425 +splstrlevel2pot,373,16425 +splstrengthiipot,373,16425 +splstrongiipot,373,16425 +splstriipot,373,16425 +spst2pot,373,16425 +splashrefinedpotion,373,16427 +splashrefinedpot,373,16427 +splrefinedpotion,373,16427 +splrefinedpot,373,16427 +splashharmingleveliipotion,373,16428 +splashdamageleveliipotion,373,16428 +splashdmgleveliipotion,373,16428 +splashharminglevel2potion,373,16428 +splashdamagelevel2potion,373,16428 +splashdmglevel2potion,373,16428 +splashharmingiipotion,373,16428 +splashdamageiipotion,373,16428 +splashdmgiipotion,373,16428 +splashharmingleveliipot,373,16428 +splashdamageleveliipot,373,16428 +splashdmgleveliipot,373,16428 +splashharminglevel2pot,373,16428 +splashdamagelevel2pot,373,16428 +splashdmglevel2pot,373,16428 +splashharmingiipot,373,16428 +splashdamageiipot,373,16428 +splashdmgiipot,373,16428 +splharmingleveliipotion,373,16428 +spldamageleveliipotion,373,16428 +spldmgleveliipotion,373,16428 +splharminglevel2potion,373,16428 +spldamagelevel2potion,373,16428 +spldmglevel2potion,373,16428 +splharmingiipotion,373,16428 +spldamageiipotion,373,16428 +spldmgiipotion,373,16428 +splharmingleveliipot,373,16428 +spldamageleveliipot,373,16428 +spldmgleveliipot,373,16428 +splharminglevel2pot,373,16428 +spldamagelevel2pot,373,16428 +spldmglevel2pot,373,16428 +splharmingiipot,373,16428 +spldamageiipot,373,16428 +spldmgiipot,373,16428 +spd2pot,373,16428 +splashcordialpotion,373,16429 +splashcordialpot,373,16429 +splcordialpotion,373,16429 +splcordialpot,373,16429 +splashsparklingpotion,373,16430 +splashsparklingpot,373,16430 +splsparklingpotion,373,16430 +splsparklingpot,373,16430 +splashsparklingextendedpotion,373,16431 +splashsparklingexpotion,373,16431 +splashsparkling2potion,373,16431 +splashsparklingextendedpot,373,16431 +splashsparklingexpot,373,16431 +splashsparkling2pot,373,16431 +splsparklingextendedpotion,373,16431 +splsparklingexpotion,373,16431 +splsparkling2potion,373,16431 +splsparklingextendedpot,373,16431 +splsparklingexpot,373,16431 +splsparkling2pot,373,16431 +splashpotentpotion,373,16432 +splashpotentpot,373,16432 +splpotentpotion,373,16432 +splpotentpot,373,16432 +splashrankpotion,373,16438 +splashrankpot,373,16438 +splrankpotion,373,16438 +splrankpot,373,16438 +splashrankextendedpotion,373,16439 +splashrankexpotion,373,16439 +splashrank2potion,373,16439 +splashrankextendedpot,373,16439 +splashrankexpot,373,16439 +splashrank2pot,373,16439 +splrankextendedpotion,373,16439 +splrankexpotion,373,16439 +splrank2potion,373,16439 +splrankextendedpot,373,16439 +splrankexpot,373,16439 +splrank2pot,373,16439 +splashacridpotion,373,16443 +splashacridpot,373,16443 +splacridpotion,373,16443 +splacridpot,373,16443 +splashgrosspotion,373,16445 +splashgrosspot,373,16445 +splgrosspotion,373,16445 +splgrosspot,373,16445 +splashstinkypotion,373,16446 +splashstinkypot,373,16446 +splstinkypotion,373,16446 +splstinkypot,373,16446 +splashstinkyextendedpotion,373,16447 +splashstinkyexpotion,373,16447 +splashstinky2potion,373,16447 +splashstinkyextendedpot,373,16447 +splashstinkyexpot,373,16447 +splashstinky2pot,373,16447 +splstinkyextendedpotion,373,16447 +splstinkyexpotion,373,16447 +splstinky2potion,373,16447 +splstinkyextendedpot,373,16447 +splstinkyexpot,373,16447 +splstinky2pot,373,16447 +splashmundaneextendedpotion,373,16448 +splashmundaneexpotion,373,16448 +splashmundane2potion,373,16448 +splashmundaneextendedpot,373,16448 +splashmundaneexpot,373,16448 +splashmundane2pot,373,16448 +splmundaneextendedpotion,373,16448 +splmundaneexpotion,373,16448 +splmundane2potion,373,16448 +splmundaneextendedpot,373,16448 +splmundaneexpot,373,16448 +splmundane2pot,373,16448 +splashregenerationextendedpotion,373,16449 +splashregenerateextendedpotion,373,16449 +splashregenextendepotion,373,16449 +splashregenerationexpotion,373,16449 +splashregenerateexpotion,373,16449 +splashregenexpotion,373,16449 +splashregenerationextendedpot,373,16449 +splashregenerateextendedpot,373,16449 +splashregenextendepot,373,16449 +splashregenerationexpot,373,16449 +splashregenerateexpot,373,16449 +splashregenexpot,373,16449 +splregenerationextendedpotion,373,16449 +splregenerateextendedpotion,373,16449 +splregenextendepotion,373,16449 +splregenerationexpotion,373,16449 +splregenerateexpotion,373,16449 +splregenexpotion,373,16449 +splregenerationextendedpot,373,16449 +splregenerateextendedpot,373,16449 +splregenextendepot,373,16449 +splregenerationexpot,373,16449 +splregenerateexpot,373,16449 +splregenexpot,373,16449 +sprepot,373,16449 +splashswiftnessextendedpotion,373,16450 +splashswiftextendedpotion,373,16450 +splashspeedextendedpotion,373,16450 +splashswiftnessexpotion,373,16450 +splashswiftexpotion,373,16450 +splashspeedexpotion,373,16450 +splashswiftnessextendedpot,373,16450 +splashswiftextendedpot,373,16450 +splashspeedextendedpot,373,16450 +splashswiftnessexpot,373,16450 +splashswiftexpot,373,16450 +splashspeedexpot,373,16450 +splswiftnessextendedpotion,373,16450 +splswiftextendedpotion,373,16450 +splspeedextendedpotion,373,16450 +splswiftnessexpotion,373,16450 +splswiftexpotion,373,16450 +splspeedexpotion,373,16450 +splswiftnessextendedpot,373,16450 +splswiftextendedpot,373,16450 +splspeedextendedpot,373,16450 +splswiftnessexpot,373,16450 +splswiftexpot,373,16450 +splspeedexpot,373,16450 +spswepot,373,16450 +splashfireresistanceextendedpotion,373,16451 +splashfireresistextendedpotion,373,16451 +splashfireresextendedpotion,373,16451 +splashfireresistanceexpotion,373,16451 +splashfireresistexpotion,373,16451 +splashfireresexpotion,373,16451 +splashfireresistanceextendedpot,373,16451 +splashfireresistextendedpot,373,16451 +splashfireresextendedpot,373,16451 +splashfireresistanceexpot,373,16451 +splashfireresistexpot,373,16451 +splashfireresexpot,373,16451 +splfireresistanceextendedpotion,373,16451 +splfireresistextendedpotion,373,16451 +splfireresextendedpotion,373,16451 +splfireresistanceexpotion,373,16451 +splfireresistexpotion,373,16451 +splfireresexpotion,373,16451 +splfireresistanceextendedpot,373,16451 +splfireresistextendedpot,373,16451 +splfireresextendedpot,373,16451 +splfireresistanceexpot,373,16451 +splfireresistexpot,373,16451 +splfireresexpot,373,16451 +spfepot,373,16451 +splashpoisonextendedpotion,373,16452 +splashacidextendedpotion,373,16452 +splashpoisonexpotion,373,16452 +splashacidexpotion,373,16452 +splashpoisonextendedpot,373,16452 +splashacidextendedpot,373,16452 +splashpoisonexpot,373,16452 +splashacidexpot,373,16452 +splpoisonextendedpotion,373,16452 +splacidextendedpotion,373,16452 +splpoisonexpotion,373,16452 +splacidexpotion,373,16452 +splpoisonextendedpot,373,16452 +splacidextendedpot,373,16452 +splpoisonexpot,373,16452 +splacidexpot,373,16452 +sppepot,373,16452 +splashnightvisionextendedpotion,373,16454 +splashnvisionextendedpotion,373,16454 +splashnightvextendedpotion,373,16454 +splashdarkvisionextendedpotion,373,16454 +splashdvisionextendedpotion,373,16454 +splashdarkvextendedpotion,373,16454 +splashnightvisionextendedpot,373,16454 +splashnvisionextendedpot,373,16454 +splashnightvextendedpot,373,16454 +splashdarkvisionextendedpot,373,16454 +splashdvisionextendedpot,373,16454 +splashdarkvextendedpot,373,16454 +splashnightvisionexpotion,373,16454 +splashnvisionexpotion,373,16454 +splashnightvexpotion,373,16454 +splashdarkvisionexpotion,373,16454 +splashdvisionexpotion,373,16454 +splashdarkvexpotion,373,16454 +splashnightvisionexpot,373,16454 +splashnvisionexpot,373,16454 +splashnightvexpot,373,16454 +splashdarkvisionexpot,373,16454 +splashdvisionexpot,373,16454 +splashdarkvexpot,373,16454 +splnightvisionextendedpotion,373,16454 +splnvisionextendedpotion,373,16454 +splnightvextendedpotion,373,16454 +spldarkvisionextendedpotion,373,16454 +spldvisionextendedpotion,373,16454 +spldarkvextendedpotion,373,16454 +splnightvisionextendedpot,373,16454 +splnvisionextendedpot,373,16454 +splnightvextendedpot,373,16454 +spldarkvisionextendedpot,373,16454 +spldvisionextendedpot,373,16454 +spldarkvextendedpot,373,16454 +splnightvisionexpotion,373,16454 +splnvisionexpotion,373,16454 +splnightvexpotion,373,16454 +spldarkvisionexpotion,373,16454 +spldvisionexpotion,373,16454 +spldarkvexpotion,373,16454 +splnightvisionexpot,373,16454 +splnvisionexpot,373,16454 +splnightvexpot,373,16454 +spldarkvisionexpot,373,16454 +spldvisionexpot,373,16454 +spldarkvexpot,373,16454 +spnepot,373,16454 +splashweaknessextendedpotion,373,16456 +splashweakextendedpotion,373,16456 +splashweaknessexpotion,373,16456 +splashweakexpotion,373,16456 +splashweaknessextendedpot,373,16456 +splashweakextendedpot,373,16456 +splashweaknessexpot,373,16456 +splashweakexpot,373,16456 +splweaknessextendedpotion,373,16456 +sphweakextendedpotion,373,16456 +splweaknessexpotion,373,16456 +splweakexpotion,373,16456 +splweaknessextendedpot,373,16456 +splweakextendedpot,373,16456 +splweaknessexpot,373,16456 +splweakexpot,373,16456 +spwepot,373,16456 +splashstrengthextendedpotion,373,16457 +splashstrongextendedpotion,373,16457 +splashstrextendedpotion,373,16457 +splashstrengthexpotion,373,16457 +splashstrongexpotion,373,16457 +splashstrexpotion,373,16457 +splashstrengthextendedpot,373,16457 +splashstrongextendedpot,373,16457 +splashstrextendedpot,373,16457 +splashstrengthexpot,373,16457 +splashstrongexpot,373,16457 +splashstrexpot,373,16457 +splstrengthextendedpotion,373,16457 +splstrongextendedpotion,373,16457 +splstrextendedpotion,373,16457 +splstrengthexpotion,373,16457 +splstrongexpotion,373,16457 +splstrexpotion,373,16457 +splstrengthextendedpot,373,16457 +splstrongextendedpot,373,16457 +splstrextendedpot,373,16457 +splstrengthexpot,373,16457 +splstrongexpot,373,16457 +splstrexpot,373,16457 +spstepot,373,16457 +splashslownessextendedpotion,373,16458 +splashslowextenedpotion,373,16458 +splashslownessexpotion,373,16458 +splashslowexpotion,373,16458 +splashslownessextendedpot,373,16458 +splashslowextenedpot,373,16458 +splashslownessexpot,373,16458 +splashslowexpot,373,16458 +splslownessextendedpotion,373,16458 +splslowextenedpotion,373,16458 +splslownessexpotion,373,16458 +splslowexpotion,373,16458 +splslownessextendedpot,373,16458 +splslowextenedpot,373,16458 +splslownessexpot,373,16458 +splslowexpot,373,16458 +spslepot,373,16458 +splashwaterbreathingextendedpotion,373,16461 +splashwaterbreathextendedpotion,373,16461 +splashbreathingextendedpotion,373,16461 +splashbreathextendedpotion,373,16461 +splashwaterbreathingextendedpot,373,16461 +splashwaterbreathextendedpot,373,16461 +splashbreathingextendedpot,373,16461 +splashbreathextendedpot,373,16461 +splwaterbreathingextendedpotion,373,16461 +splwaterbreathextendedpotion,373,16461 +splbreathingextendedpotion,373,16461 +splbreathextendedpotion,373,16461 +splwaterbreathingextendedpot,373,16461 +splwaterbreathextendedpot,373,16461 +splbreathingextendedpot,373,16461 +splbreathextendedpot,373,16461 +splashwaterbreathingexpotion,373,16461 +splashwaterbreathexpotion,373,16461 +splashbreathingexpotion,373,16461 +splashbreathexpotion,373,16461 +splashwaterbreathingexpot,373,16461 +splashwaterbreathexpot,373,16461 +splashbreathingexpot,373,16461 +splashbreathexpot,373,16461 +splwaterbreathingexpotion,373,16461 +splwaterbreathexpotion,373,16461 +splbreathingexpotion,373,16461 +splbreathexpotion,373,16461 +splwaterbreathingexpot,373,16461 +splwaterbreathexpot,373,16461 +splbreathingexpot,373,16461 +splbreathexpot,373,16461 +spwbepot,373,16461 +splashinvisibilityextendedpotion,373,16462 +splashinvisibleextendedpotion,373,16462 +splashinvextendedpotion,373,16462 +splashinvisibilityextendedpot,373,16462 +splashinvisibleextendedpot,373,16462 +splashinvextendedpot,373,16462 +splashinvisibilityexpotion,373,16462 +splashinvisibleexpotion,373,16462 +splashinvexpotion,373,16462 +splashinvisibilityexpot,373,16462 +splashinvisibleexpot,373,16462 +splashinvexpot,373,16462 +splinvisibilityextendedpotion,373,16462 +splinvisibleextendedpotion,373,16462 +splinvextendedpotion,373,16462 +splinvisibilityextendedpot,373,16462 +splinvisibleextendedpot,373,16462 +splinvextendedpot,373,16462 +splinvisibilityexpotion,373,16462 +splinvisibleexpotion,373,16462 +splinvexpotion,373,16462 +splinvisibilityexpot,373,16462 +splinvisibleexpot,373,16462 +splinvexpot,373,16462 +spiepot,373,16462 +splashregenerationdualbitpotion,373,16481 +splashregeneratedualbitpotion,373,16481 +splashregendualbitpotion,373,16481 +splashregenerationdualbitpot,373,16481 +splashregeneratedualbitpot,373,16481 +splashregendualbitpot,373,16481 +splregenerationdualbitpotion,373,16481 +splregeneratedualbitpotion,373,16481 +splregendualbitpotion,373,16481 +splregenerationdualbitpot,373,16481 +splregeneratedualbitpot,373,16481 +splregendualbitpot,373,16481 +splashregenerationdbpotion,373,16481 +splashregeneratedbpotion,373,16481 +splashregendbpotion,373,16481 +splashregenerationdbpot,373,16481 +splashregeneratedbpot,373,16481 +splashregendbpot,373,16481 +splregenerationdbpotion,373,16481 +splregeneratedbpotion,373,16481 +splregendbpotion,373,16481 +splregenerationdbpot,373,16481 +splregeneratedbpot,373,16481 +splregendbpot,373,16481 +sprdbpot,373,16481 +splashswiftnessdualbitpotion,373,16482 +splashswiftdualbitpotion,373,16482 +splashspeeddualbitpotion,373,16482 +splashswiftnessdualbitpot,373,16482 +splashswiftdualbitpot,373,16482 +splashspeeddualbitpot,373,16482 +splswiftnessdualbitpotion,373,16482 +splswiftdualbitpotion,373,16482 +splspeeddualbitpotion,373,16482 +splswiftnessdualbitpot,373,16482 +splswiftdualbitpot,373,16482 +splspeeddualbitpot,373,16482 +splashswiftnessdbpotion,373,16482 +splashswiftdbpotion,373,16482 +splashspeeddbpotion,373,16482 +splashswiftnessdbpot,373,16482 +splashswiftdbpot,373,16482 +splashspeeddbpot,373,16482 +splswiftnessdbpotion,373,16482 +splswiftdbpotion,373,16482 +splspeeddbpotion,373,16482 +splswiftnessdbpot,373,16482 +splswiftdbpot,373,16482 +splspeeddbpot,373,16482 +spswdbpot,373,16482 +splashpoisondualbitpotion,373,16484 +splashaciddualbitpotion,373,16484 +splashpoisondualbitpot,373,16484 +splashaciddualbitpot,373,16484 +splpoisondualbitpotion,373,16484 +splaciddualbitpotion,373,16484 +splpoisondualbitpot,373,16484 +splaciddualbitpot,373,16484 +splashpoisondbpotion,373,16484 +splashaciddbpotion,373,16484 +splashpoisondbpot,373,16484 +splashaciddbpot,373,16484 +splpoisondbpotion,373,16484 +splaciddbpotion,373,16484 +splpoisondbpot,373,16484 +splaciddbpot,373,16484 +sppdbpot,373,16484 +splashstrengthdualbitpotion,373,16489 +splashstrongdualbitpotion,373,16489 +splashstrdualbitpotion,373,16489 +splashstrengthdualbitpot,373,16489 +splashstrongdualbitpot,373,16489 +splashstrdualbitpot,373,16489 +splstrengthdualbitpotion,373,16489 +splstrongdualbitpotion,373,16489 +splstrdualbitpotion,373,16489 +splstrengthdualbitpot,373,16489 +splstrongdualbitpot,373,16489 +splstrdualbitpot,373,16489 +splashstrengthdbpotion,373,16489 +splashstrongdbpotion,373,16489 +splashstrdbpotion,373,16489 +splashstrengthdbpot,373,16489 +splashstrongdbpot,373,16489 +splashstrdbpot,373,16489 +splstrengthdbpotion,373,16489 +splstrongdbpotion,373,16489 +splstrdbpotion,373,16489 +splstrengthdbpot,373,16489 +splstrongdbpot,373,16489 +splstrdbpot,373,16489 +spstdbpot,373,16489 +glassbottle,374,0 +bottle,374,0 +gbottle,374,0 +gvase,374,0 +vase,374,0 +glassvase,374,0 +emptyglassbottle,374,0 +emptybottle,374,0 +emptygbottle,374,0 +emptygvase,374,0 +emptyvase,374,0 +emptyglassvase,374,0 +eglassbottle,374,0 +ebottle,374,0 +egbottle,374,0 +egvase,374,0 +evase,374,0 +eglassvase,374,0 +spidereye,375,0 +eyeofspider,375,0 +seye,375,0 +fermentedspidereye,376,0 +craftedspidereye,376,0 +fspidereye,376,0 +cspidereye,376,0 +fermentedeyeofspider,376,0 +craftedeyeofspider,376,0 +feyeofspider,376,0 +ceyeofspider,376,0 +fermentedseye,376,0 +craftedseye,376,0 +fseye,376,0 +cseye,376,0 +blazepowder,377,0 +blazedust,377,0 +goldpowder,377,0 +golddust,377,0 +gdust,377,0 +gpowder,377,0 +bpowder,377,0 +bdust,377,0 +magmacream,378,0 +goldcream,378,0 +blazecream,378,0 +mcream,378,0 +gcream,378,0 +bcream,378,0 +combinedcream,378,0 +ccream,378,0 +bstand,379,0 +pstand,379,0 +brewingstand,379,0 +potionstand,379,0 +cauldron,380,0 +steelcauldron,380,0 +ironcauldron,380,0 +icauldron,380,0 +scauldron,380,0 +potioncauldron,380,0 +pcauldron,380,0 +eyeofender,381,0 +endereye,381,0 +endeye,381,0 +evilendereye,381,0 +evileyeofender,381,0 +evilenderpearl,381,0 +eeye,381,0 +eofender,381,0 +glisteringmelon,382,0 +speckledmelon,382,0 +goldmelon,382,0 +sparklymelon,382,0 +shiningmelon,382,0 +gmelon,382,0 +smelon,382,0 +creeperegg,383,50 +eggcreeper,383,50 +skeletonegg,383,51 +eggskeleton,383,51 +spideregg,383,52 +eggspider,383,52 +giantegg,383,53 +egggiant,383,53 +zombieegg,383,54 +eggzombie,383,54 +slimeegg,383,55 +eggslime,383,55 +ghastegg,383,56 +eggghast,383,56 +zombiepigmanegg,383,57 +zpigmanegg,383,57 +pigmanegg,383,57 +zombiepmanegg,383,57 +zpmanegg,383,57 +zombiepigmegg,383,57 +zpigmegg,383,57 +zombiepigegg,383,57 +zpigegg,383,57 +zombiepmegg,383,57 +zombiepegg,383,57 +eggzombiepigman,383,57 +eggzpigman,383,57 +eggpigman,383,57 +eggzombiepman,383,57 +eggzpman,383,57 +eggzombiepigm,383,57 +eggzpigm,383,57 +eggzombiepig,383,57 +eggzpig,383,57 +eggzombiepm,383,57 +eggzombiep,383,57 +endermanegg,383,58 +eggenderman,383,58 +eggcavespider,383,59 +cavespideregg,383,59 +silverfishegg,383,60 +eggsilverfish,383,60 +blazeegg,383,61 +eggblaze,383,61 +lavaslimeegg,383,62 +lavacubeegg,383,62 +magmacubeegg,383,62 +magmaslimeegg,383,62 +egglavaslime,383,62 +egglavacube,383,62 +eggmagmacube,383,62 +eggmagmaslime,383,62 +bategg,383,65 +eggbat,383,65 +witchegg,383,66 +eggwitch,383,66 +pigegg,383,90 +eggpig,383,90 +sheepegg,383,91 +eggsheep,383,91 +cowegg,383,92 +eggcow,383,92 +chickenegg,383,93 +eggchicken,383,93 +squidegg,383,94 +eggsquid,383,94 +wolfegg,383,95 +eggwolf,383,95 +mooshroomegg,383,96 +mushroomcowegg,383,96 +eggmooshroom,383,96 +eggmushroomcow,383,96 +snowgolemegg,383,97 +sgolemegg,383,97 +eggsnowgolem,383,97 +eggsgolem,383,97 +ocelotegg,383,98 +eggocelot,383,98 +irongolemegg,383,99 +igolemegg,383,99 +eggirongolem,383,99 +eggigolem,383,99 +egghorse,383,100 +horseegg,383,100 +villageregg,383,120 +eggvillager,383,120 +bottleofenchanting,384,0 +enchantingbottle,384,0 +expbottle,384,0 +xpbottle,384,0 +bottleexp,384,0 +bottlexp,384,0 +enchantbottle,384,0 +bottleenchanting,384,0 +bottleenchant,384,0 +bottleoenchanting,384,0 +firecharge,385,0 +fireball,385,0 +grenade,385,0 +bookandquill,386,0 +booknquill,386,0 +bookandfeather,386,0 +booknfeather,386,0 +writeablebook,386,0 +writtenbook,387,0 +readablebook,387,0 +sealedbook,387,0 +diary,387,0 +ownedbook,387,0 +emerald,388,0 +itemframe,389,0 +pictureframe,389,0 +iframe,389,0 +pframe,389,0 +flowerpot,390,0 +pot,390,0 +carrot,391,0 +potato,392,0 +rawpotato,392,0 +bakedpotato,393,0 +roastedpotato,393,0 +cookedpotato,393,0 +bakepotato,393,0 +roastpotato,393,0 +cookpotato,393,0 +bpotato,393,0 +rpotato,393,0 +cpotato,393,0 +poisonouspotato,394,0 +poisonpotato,394,0 +ppotato,394,0 +emptymap,395,0 +map,395,0 +goldencarrot,396,0 +goldcarrot,396,0 +gcarrot,396,0 +head,397,0 +skull,397,0 +skeletonhead,397,0 +headskeleton,397,0 +skeletonskull,397,0 +skullskeleton,397,0 +witherhead,397,1 +witherskeletonhead,397,1 +wskeletionhead,397,1 +headwither,397,1 +headwitherskeleton,397,1 +headwskeletion,397,1 +witherskull,397,1 +witherskeletonskull,397,1 +wskeletionskull,397,1 +skullwither,397,1 +skullwitherskeleton,397,1 +skullwskeletion,397,1 +zombiehead,397,2 +headzombie,397,2 +zombieskull,397,2 +skullzombie,397,2 +playerhead,397,3 +humanhead,397,3 +stevehead,397,3 +headplayer,397,3 +headhuman,397,3 +headsteve,397,3 +playerskull,397,3 +humanskull,397,3 +steveskull,397,3 +skullplayer,397,3 +skullhuman,397,3 +skullsteve,397,3 +creeperhead,397,4 +headcreeper,397,4 +creeperskull,397,4 +skullcreeper,397,4 +carrotonastick,398,0 +carrotonstick,398,0 +netherstar,399,0 +hellstar,399,0 +nstar,399,0 +hstar,399,0 +star,399,0 +pumpkinpie,400,0 +pumpkincake,400,0 +ppie,400,0 +pcake,400,0 +pie,400,0 +fireworkrocket,401,0 +fireworkmissle,401,0 +firework,401,0 +fworkrocket,401,0 +fworkmissle,401,0 +fwork,401,0 +fwrocket,401,0 +fwmissle,401,0 +fireworkstar,402,0 +fworkstar,402,0 +fwstar,402,0 +fireworkball,402,0 +fworkball,402,0 +fwball,402,0 +fireworkpowder,402,0 +fworkpowder,402,0 +fwpowder,402,0 +fireworkcharge,402,0 +fworkcharge,402,0 +fwcharge,402,0 +enchantedbook,403,0 +enchantmentbook,403,0 +enchantingbook,403,0 +enchantbook,403,0 +magicalbook,403,0 +magicbook,403,0 +ebook,403,0 +mbook,403,0 +redstonecomparator,404,0 +redstonecomparer,404,0 +redstonecompare,404,0 +rstonecomparator,404,0 +rstonecomparer,404,0 +rstonecompare,404,0 +redscomparator,404,0 +redscomparer,404,0 +redscompare,404,0 +rscomparator,404,0 +rscomparer,404,0 +rscompare,404,0 +comparator,404,0 +comparer,404,0 +compare,404,0 +netherbrick,405,0 +nbrick,405,0 +hellbrick,405,0 +deathbrick,405,0 +dbrick,405,0 +hbrick,405,0 +netherquartz,406,0 +deathquartz,406,0 +hellquartz,406,0 +nquartz,406,0 +dquartz,406,0 +hquartz,406,0 +quartz,406,0 +tntminecart,407,0 +dynamiteminecart,407,0 +dynamitemcart,407,0 +dynamitecart,407,0 +bombminecart,407,0 +bombmcart,407,0 +bombcart,407,0 +tntmcart,407,0 +tntcart,407,0 +dminecart,407,0 +dmcart,407,0 +dcart,407,0 +bminecart,407,0 +bmcart,407,0 +bcart,407,0 +tminecart,407,0 +tmcart,407,0 +tcart,407,0 +hopperminecart,408,0 +hoppermcart,408,0 +hoppercart,408,0 +hopminecart,408,0 +hopmcart,408,0 +hopcart,408,0 +hminecart,408,0 +hmcart,408,0 +hcart,408,0 +ironhorsearmor,417,0 +ironharmor,417,0 +ironarmor,417,0 +ihorsearmor,417,0 +iharmor,417,0 +iarmor,417,0 +steelhorsearmor,417,0 +steelharmor,417,0 +steelarmor,417,0 +shorsearmor,417,0 +sharmor,417,0 +sarmor,417,0 +goldenhorsearmor,418,0 +goldenharmor,418,0 +goldenarmor,418,0 +goldhorsearmor,418,0 +goldharmor,418,0 +goldarmor,418,0 +ghorsearmor,418,0 +gharmor,418,0 +garmor,418,0 +diamondhorsearmor,419,0 +diamondharmor,419,0 +diamondarmor,419,0 +dhorsearmor,419,0 +dharmor,419,0 +darmor,419,0 +crystalhorsearmor,419,0 +crystalharmor,419,0 +crystalarmor,419,0 +chorsearmor,419,0 +charmor,419,0 +carmor,419,0 +lead,420,0 +leash,420,0 +rope,420,0 +nametag,421,0 +tag,421,0 +commandblockminecart,422,0 +cmdblockminecart,422,0 +cblockminecart,422,0 +commandminecart,422,0 +cmdminecart,422,0 +cbminecart,422,0 +commandblockcart,422,0 +cmdblockcart,422,0 +cblockcart,422,0 +commandcart,422,0 +cmdcart,422,0 +cbcart,422,0 +13disc,2256,0 +goldmusicrecord,2256,0 +goldmusicdisk,2256,0 +goldmusicdisc,2256,0 +goldmusiccd,2256,0 +13musicrecord,2256,0 +13musicdisk,2256,0 +13musicdisc,2256,0 +13musiccd,2256,0 +gomusicrecord,2256,0 +gomusicdisk,2256,0 +gomusicdisc,2256,0 +gomusiccd,2256,0 +goldmrecord,2256,0 +goldmdisk,2256,0 +goldmdisc,2256,0 +goldmcd,2256,0 +13mrecord,2256,0 +13mdisk,2256,0 +13mdisc,2256,0 +13mcd,2256,0 +gomrecord,2256,0 +gomdisk,2256,0 +gomdisc,2256,0 +gomcd,2256,0 +goldrecord,2256,0 +golddisk,2256,0 +golddisc,2256,0 +goldcd,2256,0 +13record,2256,0 +13disk,2256,0 +13cd,2256,0 +gorecord,2256,0 +godisk,2256,0 +godisc,2256,0 +gocd,2256,0 +record1,2256,0 +disk1,2256,0 +disc1,2256,0 +cd1,2256,0 +1record,2256,0 +1disk,2256,0 +1disc,2256,0 +1cd,2256,0 +catdisc,2257,0 +greenmusicrecord,2257,0 +greenmusicdisk,2257,0 +greenmusicdisc,2257,0 +greenmusiccd,2257,0 +catmusicrecord,2257,0 +catmusicdisk,2257,0 +catmusicdisc,2257,0 +catmusiccd,2257,0 +grmusicrecord,2257,0 +grmusicdisk,2257,0 +grmusicdisc,2257,0 +grmusiccd,2257,0 +greenmrecord,2257,0 +greenmdisk,2257,0 +greenmdisc,2257,0 +greenmcd,2257,0 +catmrecord,2257,0 +catmdisk,2257,0 +catmdisc,2257,0 +catmcd,2257,0 +grmrecord,2257,0 +grmdisk,2257,0 +grmdisc,2257,0 +grmcd,2257,0 +greenrecord,2257,0 +greendisk,2257,0 +greendisc,2257,0 +greencd,2257,0 +catrecord,2257,0 +catdisk,2257,0 +catcd,2257,0 +grrecord,2257,0 +grdisk,2257,0 +grdisc,2257,0 +grcd,2257,0 +record2,2257,0 +disk2,2257,0 +disc2,2257,0 +cd2,2257,0 +2record,2257,0 +2disk,2257,0 +2disc,2257,0 +2cd,2257,0 +blocksdisc,2258,0 +orangemusicrecord,2258,0 +orangemusicdisk,2258,0 +orangemusicdisc,2258,0 +orangemusiccd,2258,0 +blocksmusicrecord,2258,0 +blocksmusicdisk,2258,0 +blocksmusicdisc,2258,0 +blocksmusiccd,2258,0 +ormusicrecord,2258,0 +ormusicdisk,2258,0 +ormusicdisc,2258,0 +ormusiccd,2258,0 +orangemrecord,2258,0 +orangemdisk,2258,0 +orangemdisc,2258,0 +orangemcd,2258,0 +blocksmrecord,2258,0 +blocksmdisk,2258,0 +blocksmdisc,2258,0 +blocksmcd,2258,0 +ormrecord,2258,0 +ormdisk,2258,0 +ormdisc,2258,0 +ormcd,2258,0 +orangerecord,2258,0 +orangedisk,2258,0 +orangedisc,2258,0 +orangecd,2258,0 +blocksrecord,2258,0 +blocksdisk,2258,0 +blockscd,2258,0 +orrecord,2258,0 +ordisk,2258,0 +ordisc,2258,0 +orcd,2258,0 +record3,2258,0 +disk3,2258,0 +disc3,2258,0 +cd3,2258,0 +3record,2258,0 +3disk,2258,0 +3disc,2258,0 +3cd,2258,0 +chirpdisc,2259,0 +redmusicrecord,2259,0 +redmusicdisk,2259,0 +redmusicdisc,2259,0 +redmusiccd,2259,0 +chirpmusicrecord,2259,0 +chirpmusicdisk,2259,0 +chirpmusicdisc,2259,0 +chirpmusiccd,2259,0 +remusicrecord,2259,0 +remusicdisk,2259,0 +remusicdisc,2259,0 +remusiccd,2259,0 +redmrecord,2259,0 +redmdisk,2259,0 +redmdisc,2259,0 +redmcd,2259,0 +chirpmrecord,2259,0 +chirpmdisk,2259,0 +chirpmdisc,2259,0 +chirpmcd,2259,0 +remrecord,2259,0 +remdisk,2259,0 +remdisc,2259,0 +remcd,2259,0 +redrecord,2259,0 +reddisk,2259,0 +reddisc,2259,0 +redcd,2259,0 +chirprecord,2259,0 +chirpdisk,2259,0 +chirpcd,2259,0 +rerecord,2259,0 +redisk,2259,0 +redisc,2259,0 +recd,2259,0 +record4,2259,0 +disk4,2259,0 +disc4,2259,0 +cd4,2259,0 +4record,2259,0 +4disk,2259,0 +4disc,2259,0 +4cd,2259,0 +fardisc,2260,0 +lightgreenmusicrecord,2260,0 +lightgreenmusicdisk,2260,0 +lightgreenmusicdisc,2260,0 +lightgreenmusiccd,2260,0 +lgreenmusicrecord,2260,0 +lgreenmusicdisk,2260,0 +lgreenmusicdisc,2260,0 +lgreenmusiccd,2260,0 +lightgrmusicrecord,2260,0 +lightgrmusicdisk,2260,0 +lightgrmusicdisc,2260,0 +lightgrmusiccd,2260,0 +farmusicrecord,2260,0 +farmusicdisk,2260,0 +farmusicdisc,2260,0 +farmusiccd,2260,0 +lgrmusicrecord,2260,0 +lgrmusicdisk,2260,0 +lgrmusicdisc,2260,0 +lgrmusiccd,2260,0 +lightgreenmrecord,2260,0 +lightgreenmdisk,2260,0 +lightgreenmdisc,2260,0 +lightgreenmcd,2260,0 +lgreenmrecord,2260,0 +lgreenmdisk,2260,0 +lgreenmdisc,2260,0 +lgreenmcd,2260,0 +lightgrmrecord,2260,0 +lightgrmdisk,2260,0 +lightgrmdisc,2260,0 +lightgrmcd,2260,0 +farmrecord,2260,0 +farmdisk,2260,0 +farmdisc,2260,0 +farmcd,2260,0 +lgrmrecord,2260,0 +lgrmdisk,2260,0 +lgrmdisc,2260,0 +lgrmcd,2260,0 +lightgreenrecord,2260,0 +lightgreendisk,2260,0 +lightgreendisc,2260,0 +lightgreencd,2260,0 +lgreenrecord,2260,0 +lgreendisk,2260,0 +lgreendisc,2260,0 +lgreencd,2260,0 +lightgrrecord,2260,0 +lightgrdisk,2260,0 +lightgrdisc,2260,0 +lightgrcd,2260,0 +farrecord,2260,0 +fardisk,2260,0 +farcd,2260,0 +lgrrecord,2260,0 +lgrdisk,2260,0 +lgrdisc,2260,0 +lgrcd,2260,0 +record5,2260,0 +disk5,2260,0 +disc5,2260,0 +cd5,2260,0 +5record,2260,0 +5disk,2260,0 +5disc,2260,0 +5cd,2260,0 +malldisc,2261,0 +purplemusicrecord,2261,0 +purplemusicdisk,2261,0 +purplemusicdisc,2261,0 +purplemusiccd,2261,0 +mallmusicrecord,2261,0 +mallmusicdisk,2261,0 +mallmusicdisc,2261,0 +mallmusiccd,2261,0 +pumusicrecord,2261,0 +pumusicdisk,2261,0 +pumusicdisc,2261,0 +pumusiccd,2261,0 +purplemrecord,2261,0 +purplemdisk,2261,0 +purplemdisc,2261,0 +purplemcd,2261,0 +mallmrecord,2261,0 +mallmdisk,2261,0 +mallmdisc,2261,0 +mallmcd,2261,0 +pumrecord,2261,0 +pumdisk,2261,0 +pumdisc,2261,0 +pumcd,2261,0 +purplerecord,2261,0 +purpledisk,2261,0 +purpledisc,2261,0 +purplecd,2261,0 +mallrecord,2261,0 +malldisk,2261,0 +mallcd,2261,0 +purecord,2261,0 +pudisk,2261,0 +pudisc,2261,0 +pucd,2261,0 +record6,2261,0 +disk6,2261,0 +disc6,2261,0 +cd6,2261,0 +6record,2261,0 +6disk,2261,0 +6disc,2261,0 +6cd,2261,0 +mellohidisc,2262,0 +pinkmusicrecord,2262,0 +pinkmusicdisk,2262,0 +pinkmusicdisc,2262,0 +pinkmusiccd,2262,0 +mellohimusicrecord,2262,0 +mellohimusicdisk,2262,0 +mellohimusicdisc,2262,0 +mellohimusiccd,2262,0 +pimusicrecord,2262,0 +pimusicdisk,2262,0 +pimusicdisc,2262,0 +pimusiccd,2262,0 +pinkmrecord,2262,0 +pinkmdisk,2262,0 +pinkmdisc,2262,0 +pinkmcd,2262,0 +mellohimrecord,2262,0 +mellohimdisk,2262,0 +mellohimdisc,2262,0 +mellohimcd,2262,0 +pimrecord,2262,0 +pimdisk,2262,0 +pimdisc,2262,0 +pimcd,2262,0 +pinkrecord,2262,0 +pinkdisk,2262,0 +pinkdisc,2262,0 +pinkcd,2262,0 +mellohirecord,2262,0 +mellohidisk,2262,0 +mellohicd,2262,0 +pirecord,2262,0 +pidisk,2262,0 +pidisc,2262,0 +picd,2262,0 +record7,2262,0 +disk7,2262,0 +disc7,2262,0 +cd7,2262,0 +7record,2262,0 +7disk,2262,0 +7disc,2262,0 +7cd,2262,0 +staldisc,2263,0 +blackmusicrecord,2263,0 +blackmusicdisk,2263,0 +blackmusicdisc,2263,0 +blackmusiccd,2263,0 +stalmusicrecord,2263,0 +stalmusicdisk,2263,0 +stalmusicdisc,2263,0 +stalmusiccd,2263,0 +blmusicrecord,2263,0 +blmusicdisk,2263,0 +blmusicdisc,2263,0 +blmusiccd,2263,0 +blackmrecord,2263,0 +blackmdisk,2263,0 +blackmdisc,2263,0 +blackmcd,2263,0 +stalmrecord,2263,0 +stalmdisk,2263,0 +stalmdisc,2263,0 +stalmcd,2263,0 +blmrecord,2263,0 +blmdisk,2263,0 +blmdisc,2263,0 +blmcd,2263,0 +blackrecord,2263,0 +blackdisk,2263,0 +blackdisc,2263,0 +blackcd,2263,0 +stalrecord,2263,0 +staldisk,2263,0 +stalcd,2263,0 +blrecord,2263,0 +bldisk,2263,0 +bldisc,2263,0 +blcd,2263,0 +record8,2263,0 +disk8,2263,0 +disc8,2263,0 +cd8,2263,0 +8record,2263,0 +8disk,2263,0 +8disc,2263,0 +8cd,2263,0 +straddisc,2264,0 +whitemusicrecord,2264,0 +whitemusicdisk,2264,0 +whitemusicdisc,2264,0 +whitemusiccd,2264,0 +stradmusicrecord,2264,0 +stradmusicdisk,2264,0 +stradmusicdisc,2264,0 +stradmusiccd,2264,0 +whmusicrecord,2264,0 +whmusicdisk,2264,0 +whmusicdisc,2264,0 +whmusiccd,2264,0 +whitemrecord,2264,0 +whitemdisk,2264,0 +whitemdisc,2264,0 +whitemcd,2264,0 +stradmrecord,2264,0 +stradmdisk,2264,0 +stradmdisc,2264,0 +stradmcd,2264,0 +whmrecord,2264,0 +whmdisk,2264,0 +whmdisc,2264,0 +whmcd,2264,0 +whiterecord,2264,0 +whitedisk,2264,0 +whitedisc,2264,0 +whitecd,2264,0 +stradrecord,2264,0 +straddisk,2264,0 +stradcd,2264,0 +whrecord,2264,0 +whdisk,2264,0 +whdisc,2264,0 +whcd,2264,0 +record9,2264,0 +disk9,2264,0 +disc9,2264,0 +cd9,2264,0 +9record,2264,0 +9disk,2264,0 +9disc,2264,0 +9cd,2264,0 +warddisc,2265,0 +darkgreenmusicrecord,2265,0 +darkgreenmusicdisk,2265,0 +darkgreenmusicdisc,2265,0 +darkgreenmusiccd,2265,0 +dgreenmusicrecord,2265,0 +dgreenmusicdisk,2265,0 +dgreenmusicdisc,2265,0 +dgreenmusiccd,2265,0 +darkgrmusicrecord,2265,0 +darkgrmusicdisk,2265,0 +darkgrmusicdisc,2265,0 +darkgrmusiccd,2265,0 +wardmusicrecord,2265,0 +wardmusicdisk,2265,0 +wardmusicdisc,2265,0 +wardmusiccd,2265,0 +dgrmusicrecord,2265,0 +dgrmusicdisk,2265,0 +dgrmusicdisc,2265,0 +dgrmusiccd,2265,0 +darkgreenmrecord,2265,0 +darkgreenmdisk,2265,0 +darkgreenmdisc,2265,0 +darkgreenmcd,2265,0 +dgreenmrecord,2265,0 +dgreenmdisk,2265,0 +dgreenmdisc,2265,0 +dgreenmcd,2265,0 +darkgrmrecord,2265,0 +darkgrmdisk,2265,0 +darkgrmdisc,2265,0 +darkgrmcd,2265,0 +wardmrecord,2265,0 +wardmdisk,2265,0 +wardmdisc,2265,0 +wardmcd,2265,0 +dgrmrecord,2265,0 +dgrmdisk,2265,0 +dgrmdisc,2265,0 +dgrmcd,2265,0 +darkgreenrecord,2265,0 +darkgreendisk,2265,0 +darkgreendisc,2265,0 +darkgreencd,2265,0 +dgreenrecord,2265,0 +dgreendisk,2265,0 +dgreendisc,2265,0 +dgreencd,2265,0 +darkgrrecord,2265,0 +darkgrdisk,2265,0 +darkgrdisc,2265,0 +darkgrcd,2265,0 +wardrecord,2265,0 +warddisk,2265,0 +wardcd,2265,0 +dgrrecord,2265,0 +dgrdisk,2265,0 +dgrdisc,2265,0 +dgrcd,2265,0 +record10,2265,0 +disk10,2265,0 +disc10,2265,0 +cd10,2265,0 +10record,2265,0 +10disk,2265,0 +10disc,2265,0 +10cd,2265,0 +11disc,2266,0 +crackedmusicrecord,2266,0 +crackedmusicdisk,2266,0 +crackedmusicdisc,2266,0 +crackedmusiccd,2266,0 +crackmusicrecord,2266,0 +crackmusicdisk,2266,0 +crackmusicdisc,2266,0 +crackmusiccd,2266,0 +11musicrecord,2266,0 +11musicdisk,2266,0 +11musicdisc,2266,0 +11musiccd,2266,0 +cmusicrecord,2266,0 +cmusicdisk,2266,0 +cmusicdisc,2266,0 +cmusiccd,2266,0 +crackedmrecord,2266,0 +crackedmdisk,2266,0 +crackedmdisc,2266,0 +crackedmcd,2266,0 +crackmrecord,2266,0 +crackmdisk,2266,0 +crackmdisc,2266,0 +crackmcd,2266,0 +11mrecord,2266,0 +11mdisk,2266,0 +11mdisc,2266,0 +11mcd,2266,0 +cmrecord,2266,0 +cmdisk,2266,0 +cmdisc,2266,0 +cmcd,2266,0 +crackedrecord,2266,0 +crackeddisk,2266,0 +crackeddisc,2266,0 +crackedcd,2266,0 +crackrecord,2266,0 +crackdisk,2266,0 +crackdisc,2266,0 +crackcd,2266,0 +crecord,2266,0 +cdisk,2266,0 +cdisc,2266,0 +ccd,2266,0 +record11,2266,0 +disk11,2266,0 +disc11,2266,0 +cd11,2266,0 +11record,2266,0 +11disk,2266,0 +11cd,2266,0 +waitdisc,2267,0 +waitmusicrecord,2267,0 +waitmusicdisk,2267,0 +waitmusicdisc,2267,0 +waitmusiccd,2267,0 +bluemusicrecord,2267,0 +bluemusicdisk,2267,0 +bluemusicdisc,2267,0 +bluemusiccd,2267,0 +12musicrecord,2267,0 +12musicdisk,2267,0 +12musicdisc,2267,0 +12musiccd,2267,0 +cyanmusicrecord,2267,0 +cyanmusicdisk,2267,0 +cyanmusicdisc,2267,0 +cyanmusiccd,2267,0 +waitmrecord,2267,0 +waitmdisk,2267,0 +waitmdisc,2267,0 +waitmcd,2267,0 +bluemrecord,2267,0 +bluemdisk,2267,0 +bluemdisc,2267,0 +bluemcd,2267,0 +12mrecord,2267,0 +12mdisk,2267,0 +12mdisc,2267,0 +12mcd,2267,0 +cyanmrecord,2267,0 +cyanmdisk,2267,0 +cyanmdisc,2267,0 +cyanmcd,2267,0 +waitrecord,2267,0 +waitdisk,2267,0 +waitcd,2267,0 +bluerecord,2267,0 +bluedisk,2267,0 +bluedisc,2267,0 +bluecd,2267,0 +cyanrecord,2267,0 +cyandisk,2267,0 +cyandisc,2267,0 +cyancd,2267,0 +record12,2267,0 +disk12,2267,0 +disc12,2267,0 +cd12,2267,0 +12record,2267,0 +12disk,2267,0 +12disc,2267,0 +12cd,2267,0 +#4cac18c7e97b9f4cd96d5561a40d7799 \ No newline at end of file diff --git a/plugin.yml b/plugin.yml new file mode 100644 index 0000000..fe07aad --- /dev/null +++ b/plugin.yml @@ -0,0 +1,191 @@ +name: Core +version: SNAPSHOT-1.0 +author: Cura Development | NV6 +main: club.curahq.core.Core +softdepend: +- ProtocolLib +- Vault +commands: + prefix: + reply: + aliases: + - r + broadcast: + aliases: + - bc + message: + aliases: + - tell + - m + - msg + togglemessage: + aliases: + - togglepm + teleport: + aliases: + - tp + vanish: + aliases: + - v + stats: null + top: null + ignore: null + reset: null + copyinv: null + slowstop: null + focus: null + fsay: null + fight: null + lff: null + tl: null + whois: null + drop: null + messagespy: null + staffmode: + aliases: + - mod + - h + - staff + feed: + aliases: + - eat + spawndragon: + description: Spawns an Ender-Dragon + servertime: + description: Checks the date and time of server. + note: null + heal: null + skull: null + sudo: null + enchant: null + kit: null + playtime: + aliases: + - pt + endportal: null + setspawn: null + world: null + kill: null + clear: + aliases: + - ci + ping: null + togglesidebar: + aliases: + - tsb + - togglescoreboard + - togglesb + - tscoreboard + more: null + warp: null + staffchat: + aliases: + - sc + gamemode: + aliases: + - gm + coords: null + teleportall: + aliases: + - tpall + teleporthere: + aliases: + - tphere + - s + god: null + set: null + lag: null + invsee: null + rename: null + clearchat: + aliases: + - cc + fly: null + panic: null + focus: null + fix: + aliases: + - repair + give: null + item: + aliases: + - i + random: + description: Teleports or gets a random player. + tpcoords: null + sotw: + description: Starts a 30 minute SOTW timer. + refund: + description: Refunds an inventory. + crowbar: + description: Management of crowbar tools. + freeze: + aliases: + - ss + medic: null + + gmc: + description: Management of crowbar tools. + gms: + description: Management of crowbar tools. + staffrevive: null + conquest: + description: Command used to handle Conquest events. + economy: + aliases: + - bal + - balance + - money + - eco + description: Command used to modify the economy. + eotw: + description: Sets if the server is in End of the World mode. + event: + aliases: + - e + - game + - events + description: Command used to manage minigame events. + faction: + aliases: + - f + - fac + description: Faction related commands. + gopple: + description: Command to check remaining OP apple cooldown time. + aliases: + - goppletimer + - goppletime + koth: + description: Make or delete KotH arenas. + lives: + description: Management of lives or deathbans. + key: + description: Management of lives or deathbans. + logout: + aliases: + - disconnect + description: Command to safely logout without an NPC spawning. + ores: + description: Obtain keys to unlock awesome loot. + pay: + description: Allow players to pay money. + pvptimer: + aliases: + - pvp + description: to enable or disable pvp timer protection. + setborder: + aliases: + - setbordersize + description: Sets the border size of an Environment. + teamspeak: + aliases: + - ts + description: Show's player the ip for the teamspeak. + spawn: + description: Teleport to the server spawn. + help: null + list: null + spawner: null + timer: + description: Command to manage timers. \ No newline at end of file diff --git a/prefixes.yml b/prefixes.yml new file mode 100644 index 0000000..84ad634 --- /dev/null +++ b/prefixes.yml @@ -0,0 +1,8 @@ +menu_size: 45 +prefixes_amount: 1 +inventory_name: '&eSelect your Prefix' +prefixes: + 1: + name: 'yolo' + display_name: '&8[&6&l#YOLO&8]' + \ No newline at end of file diff --git a/src/club/curahq/core/Core.java b/src/club/curahq/core/Core.java new file mode 100644 index 0000000..cf5c903 --- /dev/null +++ b/src/club/curahq/core/Core.java @@ -0,0 +1,661 @@ +package club.curahq.core; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.MalformedURLException; +import java.net.URL; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.PluginCommand; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.serialization.ConfigurationSerialization; +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitRunnable; + +import com.sk89q.worldedit.bukkit.WorldEditPlugin; + +import club.curahq.core.balance.EconomyCommand; +import club.curahq.core.balance.EconomyManager; +import club.curahq.core.balance.FlatFileEconomyManager; +import club.curahq.core.balance.PayCommand; +import club.curahq.core.balance.ShopSignListener; +import club.curahq.core.classes.PvpClassManager; +import club.curahq.core.classes.archer.ArcherClass; +import club.curahq.core.classes.bard.BardRestorer; +import club.curahq.core.classes.type.RogueClass; +import club.curahq.core.combatlog.CombatLogListener; +import club.curahq.core.combatlog.CustomEntityRegistration; +import club.curahq.core.commands.chat.ClearChatCommand; +import club.curahq.core.commands.chat.MessageCommand; +import club.curahq.core.commands.chat.ReplyCommand; +import club.curahq.core.commands.chat.ToggleMessageCommand; +import club.curahq.core.commands.essentials.CoordsCommand; +import club.curahq.core.commands.essentials.DonatorReviveCommand; +import club.curahq.core.commands.essentials.EnchantCommand; +import club.curahq.core.commands.essentials.EndPortalCommand; +import club.curahq.core.commands.essentials.FightCommand; +import club.curahq.core.commands.essentials.GoppleCommand; +import club.curahq.core.commands.essentials.HelpCommand; +import club.curahq.core.commands.essentials.LFFCommand; +import club.curahq.core.commands.essentials.ListCommand; +import club.curahq.core.commands.essentials.LogoutCommand; +import club.curahq.core.commands.essentials.OreStatsCommand; +import club.curahq.core.commands.essentials.PanicCommand; +import club.curahq.core.commands.essentials.PingCommand; +import club.curahq.core.commands.essentials.PlayTimeCommand; +import club.curahq.core.commands.essentials.PvpTimerCommand; +import club.curahq.core.commands.essentials.RandomCommand; +import club.curahq.core.commands.essentials.ResetCommand; +import club.curahq.core.commands.essentials.SkullCommand; +import club.curahq.core.commands.essentials.StatsCommand; +import club.curahq.core.commands.essentials.SudoCommand; +import club.curahq.core.commands.essentials.TLCommand; +import club.curahq.core.commands.essentials.TeamspeakCommand; +import club.curahq.core.commands.essentials.ToggleSidebarCommand; +import club.curahq.core.commands.note.NoteCommand; +import club.curahq.core.commands.staff.BroadCastCommand; +import club.curahq.core.commands.staff.ClearCommand; +import club.curahq.core.commands.staff.CrowbarCommand; +import club.curahq.core.commands.staff.FeedCommand; +import club.curahq.core.commands.staff.FixCommand; +import club.curahq.core.commands.staff.FlyCommand; +import club.curahq.core.commands.staff.FreezeCommand; +import club.curahq.core.commands.staff.GameModeCommand; +import club.curahq.core.commands.staff.GiveCommand; +import club.curahq.core.commands.staff.GodCommand; +import club.curahq.core.commands.staff.HealCommand; +import club.curahq.core.commands.staff.InvSeeCommand; +import club.curahq.core.commands.staff.KillCommand; +import club.curahq.core.commands.staff.LagCommand; +import club.curahq.core.commands.staff.MiscCommands; +import club.curahq.core.commands.staff.MoreCommand; +import club.curahq.core.commands.staff.RefundCommand; +import club.curahq.core.commands.staff.RenameCommand; +import club.curahq.core.commands.staff.SetBorderCommand; +import club.curahq.core.commands.staff.SetCommand; +import club.curahq.core.commands.staff.SpawnCommand; +import club.curahq.core.commands.staff.SpawnerCommand; +import club.curahq.core.commands.staff.StaffModeCommand; +import club.curahq.core.commands.staff.VanishCommand; +import club.curahq.core.commands.staff.WhoisCommand; +import club.curahq.core.commands.teleport.TeleportAllCommand; +import club.curahq.core.commands.teleport.TeleportCommand; +import club.curahq.core.commands.teleport.TeleportHereCommand; +import club.curahq.core.commands.teleport.TopCommand; +import club.curahq.core.commands.teleport.WorldCommand; +import club.curahq.core.deathban.Deathban; +import club.curahq.core.deathban.DeathbanListener; +import club.curahq.core.deathban.DeathbanManager; +import club.curahq.core.deathban.FlatFileDeathbanManager; +import club.curahq.core.deathban.lives.LivesExecutor; +import club.curahq.core.deathban.lives.LivesListener; +import club.curahq.core.deathban.lives.StaffReviveCommand; +import club.curahq.core.faction.FactionExecutor; +import club.curahq.core.faction.FactionManager; +import club.curahq.core.faction.FactionMember; +import club.curahq.core.faction.FlatFileFactionManager; +import club.curahq.core.faction.claim.Claim; +import club.curahq.core.faction.claim.ClaimHandler; +import club.curahq.core.faction.claim.ClaimWandListener; +import club.curahq.core.faction.claim.Subclaim; +import club.curahq.core.faction.type.ClaimableFaction; +import club.curahq.core.faction.type.EndPortalFaction; +import club.curahq.core.faction.type.Faction; +import club.curahq.core.faction.type.PlayerFaction; +import club.curahq.core.faction.type.RoadFaction; +import club.curahq.core.faction.type.SpawnFaction; +import club.curahq.core.game.CaptureZone; +import club.curahq.core.game.EventExecutor; +import club.curahq.core.game.conquest.ConquestExecutor; +import club.curahq.core.game.eotw.EOTWHandler; +import club.curahq.core.game.eotw.EotwCommand; +import club.curahq.core.game.eotw.EotwListener; +import club.curahq.core.game.faction.CapturableFaction; +import club.curahq.core.game.faction.ConquestFaction; +import club.curahq.core.game.faction.KothFaction; +import club.curahq.core.game.koth.KothExecutor; +import club.curahq.core.kitmap.SelectorListener; +import club.curahq.core.listener.AutoSmeltOreListener; +import club.curahq.core.listener.BookDeenchantListener; +import club.curahq.core.listener.BorderListener; +import club.curahq.core.listener.BottledExpListener; +import club.curahq.core.listener.ChatListener; +import club.curahq.core.listener.CombatBuildListener; +import club.curahq.core.listener.CrowbarListener; +import club.curahq.core.listener.DeathListener; +import club.curahq.core.listener.DeathMessageListener; +import club.curahq.core.listener.ElevatorListener; +import club.curahq.core.listener.EnderPearlFix; +import club.curahq.core.listener.ExpMultiplierListener; +import club.curahq.core.listener.FoundDiamondsListener; +import club.curahq.core.listener.FurnaceSmeltSpeederListener; +import club.curahq.core.listener.GodListener; +import club.curahq.core.listener.ItemStatTrackingListener; +import club.curahq.core.listener.LoginEvent; +import club.curahq.core.listener.PearlGlitch; +import club.curahq.core.listener.PlayTimeManager; +import club.curahq.core.listener.PotionListener; +import club.curahq.core.listener.SignSubclaimListener; +import club.curahq.core.listener.UnRepairableListener; +import club.curahq.core.listener.WorldListener; +import club.curahq.core.listener.core.CoreListener; +import club.curahq.core.listener.factions.FactionListener; +import club.curahq.core.listener.factions.FactionsCoreListener; +import club.curahq.core.listener.fixes.BeaconStrengthFixListener; +import club.curahq.core.listener.fixes.BlockHitFixListener; +import club.curahq.core.listener.fixes.BlockJumpGlitchFixListener; +import club.curahq.core.listener.fixes.BoatGlitchFixListener; +import club.curahq.core.listener.fixes.DupeGlitchFix; +import club.curahq.core.listener.fixes.EnchantLimitListener; +import club.curahq.core.listener.fixes.EnderChestRemovalListener; +import club.curahq.core.listener.fixes.HungerFixListener; +import club.curahq.core.listener.fixes.InfinityArrowFixListener; +import club.curahq.core.listener.fixes.KnockbackListener; +import club.curahq.core.listener.fixes.NaturalMobSpawnFixListener; +import club.curahq.core.listener.fixes.PearlGlitchListener; +import club.curahq.core.listener.fixes.PortalListener; +import club.curahq.core.listener.fixes.VoidGlitchFixListener; +import club.curahq.core.listener.fixes.WeatherFixListener; +import club.curahq.core.listener.staff.NoteListener; +import club.curahq.core.listener.staff.SkullListener; +import club.curahq.core.listener.staff.StaffModeListener; +import club.curahq.core.listener.staff.VanishListener; +import club.curahq.core.prefix.PrefixCommand; +import club.curahq.core.prefix.PrefixMenu; +import club.curahq.core.scoreboard.ScoreboardHandler; +import club.curahq.core.signs.EventSignListener; +import club.curahq.core.signs.KitSignListener; +import club.curahq.core.sotw.SotwCommand; +import club.curahq.core.sotw.SotwListener; +import club.curahq.core.sotw.SotwTimer; +import club.curahq.core.tablist.TablistManager; +import club.curahq.core.tablist.tablist.TablistAdapter; +import club.curahq.core.timer.TimerExecutor; +import club.curahq.core.timer.TimerManager; +import club.curahq.core.user.ConsoleUser; +import club.curahq.core.user.FactionUser; +import club.curahq.core.user.UserManager; +import club.curahq.core.util.SignHandler; +import club.curahq.core.util.config.PlayerData; +import club.curahq.core.util.config.PotionLimiterData; +import club.curahq.core.util.config.WorldData; +import club.curahq.core.util.core.BasePlugins; +import club.curahq.core.util.core.ConfigUtil; +import club.curahq.core.util.core.Cooldowns; +import club.curahq.core.util.core.DateTimeFormats; +import club.curahq.core.util.core.Message; +import club.curahq.core.util.core.ServerHandler; +import club.curahq.core.util.itemdb.ItemDb; +import club.curahq.core.util.itemdb.SimpleItemDb; +import club.curahq.core.visualise.ProtocolLibHook; +import club.curahq.core.visualise.VisualiseHandler; +import club.curahq.core.visualise.WallBorderListener; +import lombok.Getter; +import lombok.Setter; +import me.apache.commons.lang3.time.DurationFormatUtils; +import net.md_5.bungee.api.ChatColor; +import net.minecraft.server.v1_7_R4.MinecraftServer; +import net.minecraft.util.com.google.common.base.Joiner; +import ru.tehkode.permissions.bukkit.PermissionsEx; + +@Getter +@Setter +public class Core extends JavaPlugin implements CommandExecutor { + + public void onEnable() { + + plugin = this; + BasePlugins.getPlugin().init(this); + config = getConfig(); + config.options().copyDefaults(true); + new TablistManager(this, new TablistAdapter(this), TimeUnit.SECONDS.toMillis((long) 0.5)); + + MinecraftServer.getServer().setMotd("§6§lCuraHQ §7 §fThe HCFactions Network" + + "\n" + + "§8» §6§lHCFactions §fin Development"); + Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "--------------------------------------------------------------------------"); + // ====================================== // + // Config // + // ====================================== // + log("&7Registering config files..."); + saveConfig(); + conf = new File(getDataFolder(), "config.yml"); + registerConfiguration(); + + WorldData.getInstance().setup(this); + PlayerData.getInstance().setup(this); + PotionLimiterData.getInstance().setup(this); + log("&aSuccess!"); + + // ====================================== // + // Hooks // + // ====================================== // + log("&7Registering hooks..."); + ProtocolLibHook.hook(this); + Plugin wep = Bukkit.getPluginManager().getPlugin("WorldEdit"); + this.worldEdit = (((wep instanceof WorldEditPlugin)) && (wep.isEnabled()) ? (WorldEditPlugin) wep : null); + log("&aSucces!"); + + CustomEntityRegistration.registerCustomEntities(); + + // ====================================== // + // Commands // + // ====================================== // + + log("&7Registering config commands..."); + registerCommands(); + log("&aSuccess!"); + + // ====================================== // + // Manager // + // ====================================== // + + log("&7Registering managers..."); + registerManagers(); + log("&aSuccess!"); + + // ====================================== // + // Listeners // + // ====================================== // + + log("&7Registering listeners..."); + registerListeners(); + log("&aSuccess!"); + + // ====================================== // + // Classes // + // ====================================== // + + log("&7Registering timers..."); + Cooldowns.createCooldown("Assassin_item_cooldown"); + Cooldowns.createCooldown("Archer_item_cooldown"); + Cooldowns.createCooldown("revive_cooldown"); + Cooldowns.createCooldown("report_cooldown"); + Cooldowns.createCooldown("helpop_cooldown"); + Cooldowns.createCooldown("rogue_cooldown"); + Cooldowns.createCooldown("lff_cooldown"); + log("&aSuccess!"); + Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "--------------------------------------------------------------------------"); + + new BukkitRunnable() + + { + public void run() { + Core.this.saveData(); + } + }.runTaskTimerAsynchronously(plugin, TimeUnit.SECONDS.toMillis(20L), TimeUnit.SECONDS.toMillis(20L)); + this.setupBroadcast(); + } + + private void saveData() { + this.deathbanManager.saveDeathbanData(); + this.economyManager.saveEconomyData(); + this.factionManager.saveFactionData(); + this.playTimeManager.savePlaytimeData(); + this.userManager.saveUserData(); + this.signHandler.cancelTasks(null); + + + PlayerData.getInstance().saveConfig(); + } + + public void onDisable() { + this.pvpClassManager.onDisable(); + CustomEntityRegistration.unregisterCustomEntities(); + CombatLogListener.removeCombatLoggers(); + this.scoreboardHandler.clearBoards(); + this.deathbanManager.saveDeathbanData(); + this.economyManager.saveEconomyData(); + this.factionManager.saveFactionData(); + this.playTimeManager.savePlaytimeData(); + this.userManager.saveUserData(); + StaffModeCommand.onDisableMod(); + saveData(); + plugin = null; + } + + @SuppressWarnings("deprecation") + public void setupBroadcast() { + Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> { + List players = new ArrayList<>(); + for (Player player : Bukkit.getOnlinePlayers()) { + String primary = PermissionsEx.getPermissionManager().getUser(player).getGroups()[0].getName(); + if (primary != null && primary.equalsIgnoreCase(ConfigUtil.TOP_RANK)) { + players.add(player.getName()); + } + } + String message = ConfigUtil.GOLD + "Online " + ConfigUtil.TOP_RANK + " Donators " + ChatColor.DARK_GRAY + " » " + ConfigUtil.GRAY + Joiner.on(ConfigUtil.GRAY + ", ").join(players); + if (!players.isEmpty()) { + Bukkit.getScheduler().runTask(Core.this, () -> { + Bukkit.broadcastMessage(message); + Bukkit.broadcastMessage(ConfigUtil.YELLOW + "You can buy this rank at " + ConfigUtil.WHITE + ConfigUtil.STORE); + + }); + } + }, (20 * 60 * 5) + 45, 20 * 60 * 5); + } + + private void log(String string) { + Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD + "HCF » " + ChatColor.DARK_GRAY + " " + string.replace("&", "§")); + } + + private void registerConfiguration() { + ConfigurationSerialization.registerClass(CaptureZone.class); + ConfigurationSerialization.registerClass(Deathban.class); + ConfigurationSerialization.registerClass(Claim.class); + ConfigurationSerialization.registerClass(ConsoleUser.class); + ConfigurationSerialization.registerClass(Subclaim.class); + ConfigurationSerialization.registerClass(Deathban.class); + ConfigurationSerialization.registerClass(FactionUser.class); + ConfigurationSerialization.registerClass(ClaimableFaction.class); + ConfigurationSerialization.registerClass(ConquestFaction.class); + ConfigurationSerialization.registerClass(CapturableFaction.class); + ConfigurationSerialization.registerClass(KothFaction.class); + ConfigurationSerialization.registerClass(EndPortalFaction.class); + ConfigurationSerialization.registerClass(Faction.class); + ConfigurationSerialization.registerClass(FactionMember.class); + ConfigurationSerialization.registerClass(PlayerFaction.class); + ConfigurationSerialization.registerClass(RoadFaction.class); + ConfigurationSerialization.registerClass(SpawnFaction.class); + ConfigurationSerialization.registerClass(RoadFaction.NorthRoadFaction.class); + ConfigurationSerialization.registerClass(RoadFaction.EastRoadFaction.class); + ConfigurationSerialization.registerClass(RoadFaction.SouthRoadFaction.class); + ConfigurationSerialization.registerClass(RoadFaction.WestRoadFaction.class); + } + + private void registerListeners() { + PluginManager manager = getServer().getPluginManager(); + manager.registerEvents(new KnockbackListener(), this); + manager.registerEvents(new NoteListener(), this); + manager.registerEvents(new OreStatsCommand(), this); + manager.registerEvents(new GodListener(), this); + manager.registerEvents(new VanishListener(), this); + manager.registerEvents(new ArcherClass(this), this); + manager.registerEvents(new RogueClass(this), this); + manager.registerEvents(new PotionListener(), this); + manager.registerEvents(new LoginEvent(), this); + manager.registerEvents(new DupeGlitchFix(), this); + manager.registerEvents(new PortalListener(this), this); + manager.registerEvents(new WeatherFixListener(), this); + manager.registerEvents(new NaturalMobSpawnFixListener(), this); + manager.registerEvents(new AutoSmeltOreListener(), this); + manager.registerEvents(new BlockHitFixListener(), this); + manager.registerEvents(new BlockJumpGlitchFixListener(), this); + manager.registerEvents(new BoatGlitchFixListener(), this); + manager.registerEvents(new BookDeenchantListener(), this); + manager.registerEvents(new BorderListener(), this); + manager.registerEvents(new ChatListener(this), this); + manager.registerEvents(new ClaimWandListener(this), this); + manager.registerEvents(new BottledExpListener(), this); + manager.registerEvents(new CombatLogListener(this), this); + manager.registerEvents(new CoreListener(this), this); + manager.registerEvents(new CrowbarListener(this), this); + manager.registerEvents(new DeathListener(this), this); + manager.registerEvents(new ElevatorListener(), this); + manager.registerEvents(new DeathMessageListener(this), this); + manager.registerEvents(new RefundCommand(this), this); + manager.registerEvents(new DeathbanListener(this), this); + manager.registerEvents(new EnchantLimitListener(), this); + manager.registerEvents(new EnderChestRemovalListener(), this); + manager.registerEvents(new FlatFileFactionManager(this), this); + manager.registerEvents(new EotwListener(this), this); + manager.registerEvents(new EventSignListener(), this); + manager.registerEvents(new LivesListener(), this); + manager.registerEvents(new ExpMultiplierListener(), this); + manager.registerEvents(new FactionListener(this), this); + manager.registerEvents(new FoundDiamondsListener(this), this); + manager.registerEvents(new FurnaceSmeltSpeederListener(), this); + manager.registerEvents(new InfinityArrowFixListener(), this); + manager.registerEvents(new ItemStatTrackingListener(), this); + manager.registerEvents(new HungerFixListener(), this); + manager.registerEvents(new PearlGlitchListener(this), this); + manager.registerEvents(new FactionsCoreListener(this), this); + manager.registerEvents(new PearlGlitch(this), this); + manager.registerEvents(new EnderPearlFix(this), this); + manager.registerEvents(new SignSubclaimListener(this), this); + manager.registerEvents(new EndPortalCommand(getPlugin()), this); + manager.registerEvents(new ShopSignListener(this), this); + manager.registerEvents(new SkullListener(), this); + manager.registerEvents(new BeaconStrengthFixListener(), this); + manager.registerEvents(new VoidGlitchFixListener(), this); + manager.registerEvents(new WallBorderListener(this), this); + manager.registerEvents(this.playTimeManager, this); + manager.registerEvents(new WorldListener(this), this); + manager.registerEvents(new UnRepairableListener(), this); + manager.registerEvents(new StaffModeListener(), this); + manager.registerEvents(new SotwListener(this), this); + manager.registerEvents(new KitSignListener(), this); + manager.registerEvents(new CombatBuildListener(), this); + manager.registerEvents(new PrefixMenu(), this); + manager.registerEvents(new PrefixCommand(), this); + + if(ConfigUtil.KIT_MAP == true) { + manager.registerEvents(new SelectorListener(), this); + } + + } + + private void registerCommands() { + + getCommand("prefix").setExecutor(new PrefixCommand()); + getCommand("note").setExecutor(new NoteCommand()); + getCommand("top").setExecutor(new TopCommand()); + getCommand("list").setExecutor(new ListCommand()); + getCommand("setborder").setExecutor(new SetBorderCommand()); + getCommand("world").setExecutor(new WorldCommand()); + getCommand("endportal").setExecutor(new EndPortalCommand(getPlugin())); + getCommand("fix").setExecutor(new FixCommand()); + getCommand("enchant").setExecutor(new EnchantCommand()); + getCommand("freeze").setExecutor(new FreezeCommand(this)); + getCommand("staffrevive").setExecutor(new StaffReviveCommand(this)); + getCommand("lag").setExecutor(new LagCommand()); + getCommand("broadcast").setExecutor(new BroadCastCommand()); + getCommand("togglemessage").setExecutor(new ToggleMessageCommand()); + getCommand("reply").setExecutor(new ReplyCommand()); + getCommand("message").setExecutor(new MessageCommand()); + getCommand("feed").setExecutor(new FeedCommand()); + getCommand("setspawn").setExecutor(new SpawnCommand()); + getCommand("ping").setExecutor(new PingCommand()); + getCommand("togglemessage").setExecutor(new ToggleMessageCommand()); + getCommand("clearchat").setExecutor(new ClearChatCommand()); + getCommand("togglesidebar").setExecutor(new ToggleSidebarCommand(this)); + getCommand("teleportall").setExecutor(new TeleportAllCommand()); + getCommand("teleporthere").setExecutor(new TeleportHereCommand()); + getCommand("give").setExecutor(new GiveCommand()); + getCommand("gamemode").setExecutor(new GameModeCommand()); + getCommand("fly").setExecutor(new FlyCommand()); + getCommand("invsee").setExecutor(new InvSeeCommand(this)); + getCommand("god").setExecutor(new GodCommand()); + getCommand("vanish").setExecutor(new VanishCommand()); + getCommand("sotw").setExecutor(new SotwCommand(this)); + getCommand("random").setExecutor(new RandomCommand(this)); + getCommand("conquest").setExecutor(new ConquestExecutor(this)); + getCommand("crowbar").setExecutor(new CrowbarCommand()); + getCommand("economy").setExecutor(new EconomyCommand(this)); + getCommand("eotw").setExecutor(new EotwCommand(this)); + getCommand("event").setExecutor(new EventExecutor(this)); + getCommand("faction").setExecutor(new FactionExecutor(this)); + getCommand("playtime").setExecutor(new PlayTimeCommand(this)); + getCommand("gopple").setExecutor(new GoppleCommand(this)); + getCommand("koth").setExecutor(new KothExecutor(this)); + getCommand("lives").setExecutor(new LivesExecutor(this)); + getCommand("logout").setExecutor(new LogoutCommand(this)); + getCommand("more").setExecutor(new MoreCommand()); + getCommand("panic").setExecutor(new PanicCommand()); + getCommand("heal").setExecutor(new HealCommand()); + getCommand("pay").setExecutor(new PayCommand(this)); + getCommand("pvptimer").setExecutor(new PvpTimerCommand(this)); + getCommand("refund").setExecutor(new RefundCommand(this)); + getCommand("spawn").setExecutor(new SpawnCommand()); + getCommand("timer").setExecutor(new TimerExecutor(this)); + getCommand("kill").setExecutor(new KillCommand()); + getCommand("ores").setExecutor(new OreStatsCommand()); + getCommand("help").setExecutor(new HelpCommand()); + getCommand("rename").setExecutor(new RenameCommand()); + getCommand("teamspeak").setExecutor(new TeamspeakCommand()); + getCommand("coords").setExecutor(new CoordsCommand()); + getCommand("fsay").setExecutor(new MiscCommands()); + getCommand("medic").setExecutor(new DonatorReviveCommand(this)); + getCommand("staffmode").setExecutor(new StaffModeCommand()); + getCommand("spawner").setExecutor(new SpawnerCommand()); + getCommand("set").setExecutor(new SetCommand(this)); + getCommand("stats").setExecutor(new StatsCommand()); + getCommand("ci").setExecutor(new ClearCommand()); + getCommand("copyinv").setExecutor(new MiscCommands()); + getCommand("slowstop").setExecutor(new MiscCommands()); + + getCommand("teleport").setExecutor(new TeleportCommand()); + getCommand("skull").setExecutor(new SkullCommand()); + getCommand("reset").setExecutor(new ResetCommand()); + getCommand("sudo").setExecutor(new SudoCommand()); + getCommand("lff").setExecutor(new LFFCommand()); + getCommand("lff").setExecutor(new LFFCommand()); + getCommand("whois").setExecutor(new WhoisCommand(this)); + getCommand("fight").setExecutor(new FightCommand()); + getCommand("tl").setExecutor(new TLCommand()); + + Map> map = getDescription().getCommands(); + for (Map.Entry> entry : map.entrySet()) { + PluginCommand command = getCommand((String) entry.getKey()); + command.setPermission("command." + (String) entry.getKey()); + command.setPermissionMessage(ConfigUtil.PREFIX + ChatColor.RED.toString() + "You lack the sufficient permissions to execute this command."); + } + } + + private void registerManagers() { + this.claimHandler = new ClaimHandler(this); + this.deathbanManager = new FlatFileDeathbanManager(this); + this.economyManager = new FlatFileEconomyManager(this); + this.eotwHandler = new EOTWHandler(this); + this.factionManager = new FlatFileFactionManager(this); + this.itemDb = new SimpleItemDb(this); + this.playTimeManager = new PlayTimeManager(this); + this.pvpClassManager = new PvpClassManager(this); + this.timerManager = new TimerManager(this); + this.scoreboardHandler = new ScoreboardHandler(this); + this.userManager = new UserManager(this); + this.visualiseHandler = new VisualiseHandler(); + this.sotwTimer = new SotwTimer(); + this.message = new Message(this); + this.signHandler = new SignHandler(this); + new BardRestorer(this); + } + + public boolean checkLicense() { + try { + URL url = new URL("http://alphadev.pw/license/admin/api.php?plugin=zHub&license=" + this.getConfig().getString("License")); + BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); + + if ((reader.lines().count() != 0)) { + reader.close(); + return true; + } else { + reader.close(); + return false; + } + } catch (MalformedURLException e) { + e.printStackTrace(); + return false; + } catch (IOException e) { + e.printStackTrace(); + return false; + } + } + + + public Core() { + this.random = new Random(); + } + + + public static Core getPlugin() { + return plugin; + } + + public static Core getInstance() { + return instance; + } + + public static String getReaming(long millis) { + return getRemaining(millis, true, true); + } + + public static String getRemaining(long millis, boolean milliseconds) { + return getRemaining(millis, milliseconds, true); + } + + public static String getRemaining(long duration, boolean milliseconds, boolean trail) { + if ((milliseconds) && (duration < MINUTE)) { + return ((DecimalFormat) (trail ? DateTimeFormats.REMAINING_SECONDS_TRAILING + : DateTimeFormats.REMAINING_SECONDS).get()).format(duration * 0.001D) + 's'; + } + return DurationFormatUtils.formatDuration(duration, (duration >= HOUR ? "HH:" : "") + "mm:ss"); + } + + public static String getCombatRemaining(long duration, boolean milliseconds, boolean trail) { + + return DurationFormatUtils.formatDuration(duration, (duration >= HOUR ? "HH:" : "") + "mm:ss"); + } + + public static String getCombatRemaining(long millis, boolean milliseconds) { + return getCombatRemaining(millis, milliseconds, true); + + } + + + + + + + public static File conf; + public static FileConfiguration config; + public static Core instance; + private ConfigUtil configuration; + private static final long MINUTE = TimeUnit.MINUTES.toMillis(1L); + private static final long HOUR = TimeUnit.HOURS.toMillis(1L); + private static Core plugin; + public static Plugin pl; + private ServerHandler serverHandler; + public BukkitRunnable clearEntityHandler; + public BukkitRunnable announcementTask; + private Message message; + + public static final Joiner SPACE_JOINER = Joiner.on(' '); + public static final Joiner COMMA_JOINER = Joiner.on(", "); + private Random random; + private PlayTimeManager playTimeManager; + private WorldEditPlugin worldEdit; + private ClaimHandler claimHandler; + private ItemDb itemDb; + + private DeathbanManager deathbanManager; + private EconomyManager economyManager; + private EOTWHandler eotwHandler; + private FactionManager factionManager; + private PvpClassManager pvpClassManager; + private VanishListener vanish; + private ScoreboardHandler scoreboardHandler; + private SotwTimer sotwTimer; + private TimerManager timerManager; + private UserManager userManager; + private VisualiseHandler visualiseHandler; + private SignHandler signHandler; + + + + + + +} diff --git a/src/club/curahq/core/balance/EconomyCommand.java b/src/club/curahq/core/balance/EconomyCommand.java new file mode 100644 index 0000000..37e6b21 --- /dev/null +++ b/src/club/curahq/core/balance/EconomyCommand.java @@ -0,0 +1,131 @@ +package club.curahq.core.balance; + +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; + +import com.google.common.collect.ImmutableList; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.core.BaseConstants; + +public class EconomyCommand + implements CommandExecutor, TabCompleter +{ + private final Core plugin; + + public EconomyCommand(Core plugin) + { + this.plugin = plugin; + } + +@SuppressWarnings({ "deprecation", "unlikely-arg-type" }) +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + boolean hasStaffPermission = sender.hasPermission(command.getPermission() + ".staff"); + OfflinePlayer target; + if ((args.length > 0) && (hasStaffPermission)) + { + target = BukkitUtils.offlinePlayerWithNameOrUUID(args[0]); + } + else + { + if (!(sender instanceof Player)) + { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + target = (OfflinePlayer)sender; + } + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + UUID uuid = target.getUniqueId(); + int balance = this.plugin.getEconomyManager().getBalance(uuid); + if ((args.length < 2) || (!hasStaffPermission)) + { + sender.sendMessage(ChatColor.GRAY + (sender.equals(target) ? "Balance: " : new StringBuilder(String.valueOf(target.getName())).append("'s Balance: ").toString()) + ChatColor.GOLD + '$' + balance); + return true; + } + if (GIVE.contains(args[1].toLowerCase())) + { + if (args.length < 3) + { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + ' ' + target.getName() + ' ' + args[1] + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[2]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[2] + "' is not a valid number."); + return true; + } + int newBalance = this.plugin.getEconomyManager().addBalance(uuid, amount.intValue()); + sender.sendMessage(new String[] { ChatColor.GRAY + "Added " + ChatColor.GREEN + '$' + JavaUtils.format(amount) + ChatColor.GRAY + " to balance of " + target.getName() + '.', ChatColor.GRAY + "Balance of " + target.getName() + " is now " + ChatColor.GREEN + '$' + newBalance + ChatColor.GRAY + '.' }); + return true; + } + if (TAKE.contains(args[1].toLowerCase())) + { + if (args.length < 3) + { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + ' ' + target.getName() + ' ' + args[1] + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[2]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[2] + "' is not a valid number."); + return true; + } + int newBalance = this.plugin.getEconomyManager().subtractBalance(uuid, amount.intValue()); + sender.sendMessage(new String[] { ChatColor.GRAY + "Taken " + '$' + JavaUtils.format(amount) + " from balance of " + target.getName() + '.', ChatColor.GRAY + "Balance of " + target.getName() + " is now " + '$' + newBalance + '.' }); + return true; + } + if (!args[1].equalsIgnoreCase("set")) + { + sender.sendMessage(ChatColor.GOLD + (sender.equals(target) ? "Your balance" : new StringBuilder("Balance of ").append(target.getName()).toString()) + " is " + ChatColor.WHITE + '$' + balance + ChatColor.GOLD + '.'); + return true; + } + if (args.length < 3) + { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + ' ' + target.getName() + ' ' + args[1] + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[2]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[2] + "' is not a valid number."); + return true; + } + int newBalance = this.plugin.getEconomyManager().setBalance(uuid, amount.intValue()); + sender.sendMessage(ChatColor.GRAY + "Set balance of " + ChatColor.GOLD + target.getName() + ChatColor.GRAY + " to " + ChatColor.GREEN + '$' + JavaUtils.format(Integer.valueOf(newBalance)) + '.'); + return true; + } + + public List onTabComplete(CommandSender commandSender, Command command, String s, String[] args) + { + return args.length == 2 ? BukkitUtils.getCompletions(args, COMPLETIONS) : Collections.emptyList(); + } + + private static final ImmutableList TAKE = ImmutableList.of("take", "negate", "minus", "subtract"); + private static final ImmutableList GIVE; + + static + { + GIVE = ImmutableList.of("give", "add"); + } + + private static final ImmutableList COMPLETIONS = ImmutableList.of("add", "set", "take"); +} diff --git a/src/club/curahq/core/balance/EconomyManager.java b/src/club/curahq/core/balance/EconomyManager.java new file mode 100644 index 0000000..e962142 --- /dev/null +++ b/src/club/curahq/core/balance/EconomyManager.java @@ -0,0 +1,23 @@ +package club.curahq.core.balance; + +import java.util.UUID; +import net.minecraft.util.gnu.trove.map.TObjectIntMap; + +public abstract interface EconomyManager +{ + public static final char ECONOMY_SYMBOL = '$'; + + public abstract TObjectIntMap getBalanceMap(); + + public abstract int getBalance(UUID paramUUID); + + public abstract int setBalance(UUID paramUUID, int paramInt); + + public abstract int addBalance(UUID paramUUID, int paramInt); + + public abstract int subtractBalance(UUID paramUUID, int paramInt); + + public abstract void reloadEconomyData(); + + public abstract void saveEconomyData(); +} diff --git a/src/club/curahq/core/balance/FlatFileEconomyManager.java b/src/club/curahq/core/balance/FlatFileEconomyManager.java new file mode 100644 index 0000000..3d23443 --- /dev/null +++ b/src/club/curahq/core/balance/FlatFileEconomyManager.java @@ -0,0 +1,72 @@ +package club.curahq.core.balance; + +import net.minecraft.util.gnu.trove.map.TObjectIntMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap; +import org.bukkit.configuration.MemorySection; + +import club.curahq.core.Core; +import club.curahq.core.util.Config; + +import java.util.*; + +public class FlatFileEconomyManager implements EconomyManager { + private final Core plugin; + private TObjectIntMap balanceMap; + private Config balanceConfig; + + public FlatFileEconomyManager(final Core plugin) { + this.balanceMap = new TObjectIntHashMap(10, 0.5f, 0); + this.plugin = plugin; + this.reloadEconomyData(); + } + + @Override + public TObjectIntMap getBalanceMap() { + return this.balanceMap; + } + + @Override + public int getBalance(final UUID uuid) { + return this.balanceMap.get((Object) uuid); + } + + @Override + public int setBalance(final UUID uuid, final int amount) { + this.balanceMap.put(uuid, amount); + return amount; + } + + @Override + public int addBalance(final UUID uuid, final int amount) { + return this.setBalance(uuid, this.getBalance(uuid) + amount); + } + + @Override + public int subtractBalance(final UUID uuid, final int amount) { + return this.setBalance(uuid, this.getBalance(uuid) - amount); + } + + @Override + public void reloadEconomyData() { + this.balanceConfig = new Config(this.plugin, "balances"); + final Object object = this.balanceConfig.get("balances"); + if (object instanceof MemorySection) { + final MemorySection section = (MemorySection)object; + final Set keys = (Set)section.getKeys(false); + for (final String id : keys) { + this.balanceMap.put((UUID) UUID.fromString(id), this.balanceConfig.getInt("balances." + id)); + } + } + } + + public void saveEconomyData() { + final Map saveMap = new LinkedHashMap(this.balanceMap.size()); + this.balanceMap.forEachEntry((uuid, i) -> { + saveMap.put(uuid.toString(), i); + return true; + }); + this.balanceConfig.set("balances", (Object)saveMap); + this.balanceConfig.save(); + } + +} diff --git a/src/club/curahq/core/balance/PayCommand.java b/src/club/curahq/core/balance/PayCommand.java new file mode 100644 index 0000000..24fe761 --- /dev/null +++ b/src/club/curahq/core/balance/PayCommand.java @@ -0,0 +1,83 @@ +package club.curahq.core.balance; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.core.BaseConstants; + +public class PayCommand + implements CommandExecutor, TabCompleter +{ + private final Core plugin; + + public PayCommand(Core plugin) + { + this.plugin = plugin; + } + + @SuppressWarnings({ "deprecation", "unlikely-arg-type" }) +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 2) + { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[1]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[1] + "' is not a valid number."); + return true; + } + if (amount.intValue() <= 0) + { + sender.sendMessage(ChatColor.RED + "You must send money in positive quantities."); + return true; + } + Player senderPlayer = (Player)sender; + int senderBalance = senderPlayer != null ? this.plugin.getEconomyManager().getBalance(senderPlayer.getUniqueId()) : 1024; + if (senderBalance < amount.intValue()) + { + sender.sendMessage(ChatColor.RED + "You do not have that much money, you have: " + ChatColor.GREEN + senderBalance); + return true; + } + OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]); + if (sender.equals(target)) + { + sender.sendMessage(ChatColor.RED + "You cannot send money to yourself."); + return true; + } + Player targetPlayer = target.getPlayer(); + if ((!target.hasPlayedBefore()) && (targetPlayer == null)) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + if (targetPlayer == null) { + return false; + } + if (senderPlayer != null) { + this.plugin.getEconomyManager().subtractBalance(senderPlayer.getUniqueId(), amount.intValue()); + } + this.plugin.getEconomyManager().addBalance(targetPlayer.getUniqueId(), amount.intValue()); + targetPlayer.sendMessage(ChatColor.AQUA + sender.getName() + ChatColor.GRAY + " has sent you " + ChatColor.GREEN + '$' + amount + ChatColor.GRAY + '.'); + sender.sendMessage(ChatColor.GRAY + "You have sent " + ChatColor.GREEN + '$' + amount + ChatColor.GRAY + " to " + ChatColor.AQUA + target.getName() + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/balance/ShopSignListener.java b/src/club/curahq/core/balance/ShopSignListener.java new file mode 100644 index 0000000..c99ce98 --- /dev/null +++ b/src/club/curahq/core/balance/ShopSignListener.java @@ -0,0 +1,114 @@ +package club.curahq.core.balance; + +import java.util.Arrays; +import java.util.Map; +import java.util.regex.Pattern; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.block.Sign; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.Core; +import club.curahq.core.crowbar.Crowbar; +import club.curahq.core.util.InventoryUtils; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.core.BasePlugins; + +public class ShopSignListener + implements Listener +{ + public ShopSignListener(Core plugin) + { + this.plugin = plugin; + } + + @SuppressWarnings("deprecation") +@EventHandler(ignoreCancelled=false, priority=EventPriority.HIGH) + public void onPlayerInteract(PlayerInteractEvent event) + { + if (event.getAction() == Action.RIGHT_CLICK_BLOCK) + { + Block block = event.getClickedBlock(); + BlockState state = block.getState(); + if ((state instanceof Sign)) + { + Sign sign = (Sign)state; + String[] lines = sign.getLines(); + Integer quantity = JavaUtils.tryParseInt(lines[2]); + if (quantity == null) { + return; + } + Integer price = JavaUtils.tryParseInt(ALPHANUMERIC_REMOVER.matcher(lines[3]).replaceAll("")); + if (price == null) { + return; + } + ItemStack stack; + if (lines[1].equalsIgnoreCase("Crowbar")) { + stack = new Crowbar().getItemIfPresent(); + } else if ((stack = BasePlugins.getPlugin().getItemDb().getItem(ALPHANUMERIC_REMOVER.matcher(lines[1]).replaceAll(""), (int) quantity)) == null) { + return; + } + Player player = event.getPlayer(); + String[] fakeLines = (String[])Arrays.copyOf(sign.getLines(), 4); + if (((lines[0].contains("Sell")) && (lines[0].contains(ChatColor.RED.toString()))) || (lines[0].contains(ChatColor.AQUA.toString()))) + { + int sellQuantity = Math.min(quantity.intValue(), InventoryUtils.countAmount(player.getInventory(), stack.getType(), stack.getDurability())); + if (sellQuantity <= 0) + { + fakeLines[0] = (ChatColor.RED + "Not carrying any"); + fakeLines[2] = (ChatColor.RED + "on you."); + fakeLines[3] = ""; + } + else + { + int newPrice = price.intValue() / quantity.intValue() * sellQuantity; + fakeLines[0] = (ChatColor.GREEN + "Sold " + sellQuantity); + fakeLines[3] = (ChatColor.GREEN + "for " + '$' + newPrice); + this.plugin.getEconomyManager().addBalance(player.getUniqueId(), newPrice); + InventoryUtils.removeItem(player.getInventory(), stack.getType(), (short)stack.getData().getData(), sellQuantity); + player.updateInventory(); + } + } + else + { + if ((!lines[0].contains("Buy")) || (!lines[0].contains(ChatColor.GREEN.toString())) || (lines[0].contains(ChatColor.AQUA.toString()))) { + return; + } + if (price.intValue() > this.plugin.getEconomyManager().getBalance(player.getUniqueId())) + { + fakeLines[0] = (ChatColor.RED + "Cannot afford"); + } + else + { + fakeLines[0] = (ChatColor.GREEN + "Item bought"); + fakeLines[3] = (ChatColor.GREEN + "for " + '$' + price); + this.plugin.getEconomyManager().subtractBalance(player.getUniqueId(), price.intValue()); + World world = player.getWorld(); + Location location = player.getLocation(); + Map excess = player.getInventory().addItem(new ItemStack[] { stack }); + for (Map.Entry excessItemStack : excess.entrySet()) { + world.dropItemNaturally(location, (ItemStack)excessItemStack.getValue()); + } + player.setItemInHand(player.getItemInHand()); + player.updateInventory(); + } + } + event.setCancelled(true); + BasePlugins.getPlugin().getSignHandler().showLines(player, sign, fakeLines, 100L, true); + } + } + } + + private static final Pattern ALPHANUMERIC_REMOVER = Pattern.compile("[^A-Za-z0-9]"); + private final Core plugin; +} diff --git a/src/club/curahq/core/classes/PvpClass.java b/src/club/curahq/core/classes/PvpClass.java new file mode 100644 index 0000000..a954426 --- /dev/null +++ b/src/club/curahq/core/classes/PvpClass.java @@ -0,0 +1,58 @@ +package club.curahq.core.classes; + +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; + +public abstract class PvpClass +{ + public PvpClass(String name, long warmupDelay) + { + this.passiveEffects = new HashSet(); + this.name = name; + this.warmupDelay = warmupDelay; + } + + public String getName() + { + return this.name; + } + + public long getWarmupDelay() + { + return this.warmupDelay; + } + + public boolean onEquip(Player player) + { + for (PotionEffect effect : this.passiveEffects) { + player.addPotionEffect(effect, true); + } + player.sendMessage(ChatColor.YELLOW + "Class " + ChatColor.GOLD + this.name + ChatColor.YELLOW + " has been equipped."); + return true; + } + + public void onUnequip(Player player) + { + for (PotionEffect effect : this.passiveEffects) { + for (PotionEffect active : player.getActivePotionEffects()) { + if ((active.getDuration() > DEFAULT_MAX_DURATION) && (active.getType().equals(effect.getType())) && (active.getAmplifier() == effect.getAmplifier())) + { + player.removePotionEffect(effect.getType()); + break; + } + } + } + player.sendMessage(ChatColor.YELLOW + "Class " + ChatColor.GOLD + this.name + ChatColor.YELLOW + " has been un-equipped."); + } + + public static final long DEFAULT_MAX_DURATION = TimeUnit.MINUTES.toMillis(8L); + protected final Set passiveEffects; + protected final String name; + protected final long warmupDelay; + + public abstract boolean isApplicableFor(Player paramPlayer); +} diff --git a/src/club/curahq/core/classes/PvpClassManager.java b/src/club/curahq/core/classes/PvpClassManager.java new file mode 100644 index 0000000..7e5be73 --- /dev/null +++ b/src/club/curahq/core/classes/PvpClassManager.java @@ -0,0 +1,89 @@ +package club.curahq.core.classes; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import javax.annotation.Nullable; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.Listener; +import org.bukkit.plugin.Plugin; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.classes.archer.ArcherClass; +import club.curahq.core.classes.bard.BardClass; +import club.curahq.core.classes.event.PvpClassEquipEvent; +import club.curahq.core.classes.event.PvpClassUnequipEvent; +import club.curahq.core.classes.type.MinerClass; +import club.curahq.core.classes.type.RogueClass; + +public class PvpClassManager { + private final Map equippedClass = new HashMap(); + private final Map pvpClasses = new HashMap(); + + public PvpClassManager(Core plugin) { + this.pvpClasses.put("Archer", new ArcherClass(plugin)); + this.pvpClasses.put("Bard", new BardClass(plugin)); + this.pvpClasses.put("Miner", new MinerClass(plugin)); + this.pvpClasses.put("Rogue", new RogueClass(plugin)); + for (PvpClass pvpClass : this.pvpClasses.values()) { + if (!(pvpClass instanceof Listener)) continue; + plugin.getServer().getPluginManager().registerEvents((Listener)pvpClass, (Plugin)plugin); + } + } + + public void onDisable() { + for (Map.Entry entry : new HashMap(this.equippedClass).entrySet()) { + this.setEquippedClass(Bukkit.getPlayer((UUID)entry.getKey()), null); + } + this.pvpClasses.clear(); + this.equippedClass.clear(); + } + + public Collection getPvpClasses() { + return this.pvpClasses.values(); + } + + public PvpClass getPvpClass(String name) { + return this.pvpClasses.get(name); + } + + /* + * WARNING - Removed try catching itself - possible behaviour change. + */ + public PvpClass getEquippedClass(Player player) { + Map map = this.equippedClass; + synchronized (map) { + return this.equippedClass.get(player.getUniqueId()); + } + } + + public boolean hasClassEquipped(Player player, PvpClass pvpClass) { + PvpClass equipped = this.getEquippedClass(player); + if (equipped != null && equipped.equals(pvpClass)) { + return true; + } + return false; + } + + public void setEquippedClass(Player player, @Nullable PvpClass pvpClass) { + PvpClass equipped = this.getEquippedClass(player); + if (equipped != null) { + if (pvpClass == null) { + this.equippedClass.remove(player.getUniqueId()); + equipped.onUnequip(player); + Bukkit.getPluginManager().callEvent((Event)new PvpClassUnequipEvent(player, equipped)); + return; + } + } else if (pvpClass == null) { + return; + } + if (pvpClass.onEquip(player)) { + this.equippedClass.put(player.getUniqueId(), pvpClass); + Bukkit.getPluginManager().callEvent((Event)new PvpClassEquipEvent(player, pvpClass)); + } + } +} \ No newline at end of file diff --git a/src/club/curahq/core/classes/archer/ArcherClass.java b/src/club/curahq/core/classes/archer/ArcherClass.java new file mode 100644 index 0000000..f39ea37 --- /dev/null +++ b/src/club/curahq/core/classes/archer/ArcherClass.java @@ -0,0 +1,161 @@ +package club.curahq.core.classes.archer; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.TimeUnit; +import net.minecraft.util.gnu.trove.map.TObjectLongMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectLongHashMap; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.projectiles.ProjectileSource; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.util.core.Cooldowns; + +public class ArcherClass + extends PvpClass + implements Listener +{ + public ArcherClass(Core plugin) + { + super("Archer", TimeUnit.SECONDS.toMillis(1L)); + this.archerSpeedCooldowns = new TObjectLongHashMap(); + this.plugin = plugin; + this.passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.REGENERATION, Integer.MAX_VALUE, 0)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2)); + } + + public boolean onEquip(Player player) + { + return super.onEquip(player); + } + + @EventHandler + public void onPlayerClickSugar(PlayerInteractEvent e) + { + final Player p = e.getPlayer(); + if ((this.plugin.getPvpClassManager().getEquippedClass(p) != null) && (this.plugin.getPvpClassManager().getEquippedClass(p).equals(this)) && (p.getItemInHand().getType() == Material.SUGAR)) + { + if (Cooldowns.isOnCooldown("Archer_item_cooldown", p)) + { + p.sendMessage(ChatColor.RED + "You cannot use this for another " + ChatColor.BOLD.toString() + Core.getRemaining(Cooldowns.getCooldownForPlayerLong("Archer_item_cooldown", p), true) + ChatColor.RED + '.'); + e.setCancelled(true); + return; + } + Cooldowns.addCooldown("Archer_item_cooldown", p, ARCHER_SPEED_COOLDOWN_DELAY); + if (p.getItemInHand().getAmount() == 1) { + p.getInventory().remove(p.getItemInHand()); + } else { + p.getItemInHand().setAmount(p.getItemInHand().getAmount() - 1); + } + p.removePotionEffect(PotionEffectType.SPEED); + p.addPotionEffect(ARCHER_SPEED_EFFECT); + new BukkitRunnable() + { + public void run() + { + if (ArcherClass.this.isApplicableFor(p)) + { + p.removePotionEffect(PotionEffectType.SPEED); + p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2)); + } + } + }.runTaskLater(this.plugin, 180L); + } + } + + @EventHandler + public void onQuit(PlayerQuitEvent e) + { + if (TAGGED.containsKey(e.getPlayer().getUniqueId())) { + TAGGED.remove(e.getPlayer().getUniqueId()); + } + } + + @SuppressWarnings("deprecation") +@EventHandler(ignoreCancelled=true, priority=EventPriority.HIGHEST) + public void onEntityDamage(EntityDamageByEntityEvent event) + { + Entity entity = event.getEntity(); + Entity damager = event.getDamager(); + if (((entity instanceof Player)) && ((damager instanceof Arrow))) + { + Arrow arrow = (Arrow)damager; + ProjectileSource source = arrow.getShooter(); + if ((source instanceof Player)) + { + Player damaged = (Player)event.getEntity(); + Player shooter = (Player)source; + PvpClass equipped = this.plugin.getPvpClassManager().getEquippedClass(shooter); + if ((equipped == null) || (!equipped.equals(this))) { + return; + } + if (this.plugin.getTimerManager().archerTimer.getRemaining((Player)entity) == 0L) + { + if ((this.plugin.getPvpClassManager().getEquippedClass(damaged) != null) && (this.plugin.getPvpClassManager().getEquippedClass(damaged).equals(this))) { + return; + } + this.plugin.getTimerManager().archerTimer.setCooldown((Player)entity, entity.getUniqueId()); + TAGGED.put(damaged.getUniqueId(), shooter.getUniqueId()); + List onlinePlayers = new ArrayList(); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player player = arrayOfPlayer[i]; + onlinePlayers.add(player); + this.plugin.getScoreboardHandler().getPlayerBoard(player.getUniqueId()).addUpdates(onlinePlayers); + } + double distance = shooter.getLocation().distance(damaged.getLocation()); + double round = Math.round(distance*100) / 100; + shooter.sendMessage(ChatColor.YELLOW + "You marked " + ChatColor.BOLD + damaged.getName() + " for 10 seconds " + ChatColor.GRAY + "[distance: " + round + ChatColor.GRAY + ", damage: " + ChatColor.RED + event.getDamage() + ChatColor.GRAY + "]"); + damaged.sendMessage(ChatColor.RED + "Archer Marked! " + ChatColor.YELLOW + "You have been Archer Tagged, any damage you take by a player will be increased by 25%"); + } + } + } + } + + public boolean isApplicableFor(Player player) + { + PlayerInventory playerInventory = player.getInventory(); + ItemStack helmet = playerInventory.getHelmet(); + if ((helmet == null) || (helmet.getType() != Material.LEATHER_HELMET)) { + return false; + } + ItemStack chestplate = playerInventory.getChestplate(); + if ((chestplate == null) || (chestplate.getType() != Material.LEATHER_CHESTPLATE)) { + return false; + } + ItemStack leggings = playerInventory.getLeggings(); + if ((leggings == null) || (leggings.getType() != Material.LEATHER_LEGGINGS)) { + return false; + } + ItemStack boots = playerInventory.getBoots(); + return (boots != null) && (boots.getType() == Material.LEATHER_BOOTS); + } + + public static final HashMap TAGGED = new HashMap(); + private static final PotionEffect ARCHER_SPEED_EFFECT = new PotionEffect(PotionEffectType.SPEED, 180, 3); + private static final int ARCHER_SPEED_COOLDOWN_DELAY = 60; + public final TObjectLongMap archerSpeedCooldowns; + private final Core plugin; +} diff --git a/src/club/curahq/core/classes/bard/BardClass.java b/src/club/curahq/core/classes/bard/BardClass.java new file mode 100644 index 0000000..f3efd31 --- /dev/null +++ b/src/club/curahq/core/classes/bard/BardClass.java @@ -0,0 +1,321 @@ +package club.curahq.core.classes.bard; + +import java.util.Collection; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.TimeUnit; +import net.minecraft.util.gnu.trove.map.TObjectLongMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectLongHashMap; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.Event.Result; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerItemHeldEvent; +import org.bukkit.event.player.PlayerKickEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.faction.type.Faction; +import club.curahq.core.faction.type.PlayerFaction; + +public class BardClass + extends PvpClass + implements Listener +{ + public static final int HELD_EFFECT_DURATION_TICKS = 100; + + public BardClass(Core plugin) + { + super("Bard", TimeUnit.SECONDS.toMillis(1L)); + this.bardDataMap = new HashMap(); + this.bardEffects = new EnumMap(Material.class); + this.msgCooldowns = new TObjectLongHashMap(); + this.plugin = plugin; + this.bardRestorer = new BardRestorer(plugin); + this.passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.REGENERATION, Integer.MAX_VALUE, 0)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1)); + this.bardEffects.put(Material.SUGAR, new BardEffect(45, new PotionEffect(PotionEffectType.SPEED, 120, 2), new PotionEffect(PotionEffectType.SPEED, 100, 1))); + this.bardEffects.put(Material.BLAZE_POWDER, new BardEffect(45, new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 120, 0), null)); + this.bardEffects.put(Material.IRON_INGOT, new BardEffect(35, new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 80, 2), new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 100, 0))); + this.bardEffects.put(Material.GHAST_TEAR, new BardEffect(30, new PotionEffect(PotionEffectType.REGENERATION, 60, 2), new PotionEffect(PotionEffectType.REGENERATION, 100, 0))); + this.bardEffects.put(Material.FEATHER, new BardEffect(40, new PotionEffect(PotionEffectType.JUMP, 120, 3), new PotionEffect(PotionEffectType.JUMP, 100, 1))); + this.bardEffects.put(Material.SPIDER_EYE, new BardEffect(55, new PotionEffect(PotionEffectType.WITHER, 100, 1), null)); + this.bardEffects.put(Material.MAGMA_CREAM, new BardEffect(10, new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 900, 0), new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 120, 0))); + } + + public boolean onEquip(final Player player) + { + if (!super.onEquip(player)) { + return false; + } + if (BardClass.this.plugin.getTimerManager().invincibilityTimer.getRemaining(player.getUniqueId()) > 0L) { + player.sendMessage(ChatColor.RED + "You still have PvP Protection, you must enable it first."); + return false; + } + BardData bardData = new BardData(); + this.bardDataMap.put(player.getUniqueId(), bardData); + bardData.startEnergyTracking(); + bardData.heldTask = new BukkitRunnable() + { + int lastEnergy; + + @SuppressWarnings("deprecation") + public void run() + { + ItemStack held = player.getItemInHand(); + if (held != null) + { + BardEffect bardEffect = (BardEffect)BardClass.this.bardEffects.get(held.getType()); + if ((bardEffect != null) && (!BardClass.this.plugin.getFactionManager().getFactionAt(player.getLocation()).isSafezone())) + { + PlayerFaction playerFaction = BardClass.this.plugin.getFactionManager().getPlayerFaction(player); + if (playerFaction != null) + { + Collection nearbyEntities = player.getNearbyEntities(25.0D, 25.0D, 25.0D); + for (Entity nearby : nearbyEntities) { + if (((nearby instanceof Player)) && (!player.equals(nearby))) + { + Player target = (Player)nearby; + if (playerFaction.getMembers().containsKey(target.getUniqueId())) { + BardClass.this.bardRestorer.setRestoreEffect(target, bardEffect.heldable); + + //NEED FIXING + } + } + } + } + } + } + int energy = (int)BardClass.this.getEnergy(player); + if ((energy != 0) && (energy != this.lastEnergy) && ((energy % 10 == 0) || (this.lastEnergy - energy - 1 > 0) || (energy == 120.0D))) + { + this.lastEnergy = energy; + player.sendMessage(ChatColor.YELLOW + BardClass.this.name + " Energy: " + ChatColor.GOLD + energy); + } + } + }.runTaskTimer(this.plugin, 0L, 20L); + return true; + } + + public void onUnequip(Player player) + { + super.onUnequip(player); + clearBardData(player.getUniqueId()); + } + + private void clearBardData(UUID uuid) + { + BardData bardData = (BardData)this.bardDataMap.remove(uuid); + if ((bardData != null) && (bardData.heldTask != null)) { + bardData.heldTask.cancel(); + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerQuit(PlayerQuitEvent event) + { + clearBardData(event.getPlayer().getUniqueId()); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerKick(PlayerKickEvent event) + { + clearBardData(event.getPlayer().getUniqueId()); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onItemHeld(PlayerItemHeldEvent event) + { + Player player = event.getPlayer(); + PvpClass equipped = this.plugin.getPvpClassManager().getEquippedClass(player); + if ((equipped == null) || (!equipped.equals(this))) { + return; + } + UUID uuid = player.getUniqueId(); + long lastMessage = this.msgCooldowns.get(uuid); + long millis = System.currentTimeMillis(); + if ((lastMessage != this.msgCooldowns.getNoEntryValue()) && (lastMessage - millis > 0L)) { + return; + } + player.getInventory().getItem(event.getNewSlot()); + + } + + @SuppressWarnings("deprecation") +@EventHandler(ignoreCancelled=false, priority=EventPriority.MONITOR) + public void onPlayerInteract(PlayerInteractEvent event) + { + if (!event.hasItem()) { + return; + } + Action action = event.getAction(); + if ((action == Action.RIGHT_CLICK_AIR) || ((!event.isCancelled()) && (action == Action.RIGHT_CLICK_BLOCK))) + { + ItemStack stack = event.getItem(); + BardEffect bardEffect = (BardEffect)this.bardEffects.get(stack.getType()); + if ((bardEffect == null) || (bardEffect.clickable == null)) { + return; + } + event.setUseItemInHand(Result.DENY); + Player player = event.getPlayer(); + BardData bardData = (BardData)this.bardDataMap.get(player.getUniqueId()); + if (bardData != null) + { + if (!canUseBardEffect(player, bardData, bardEffect, true)) { + return; + } + if (stack.getAmount() > 1) { + stack.setAmount(stack.getAmount() - 1); + } else { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } + if ((bardEffect != null) && (!this.plugin.getFactionManager().getFactionAt(player.getLocation()).isSafezone())) + { + PlayerFaction playerFaction = this.plugin.getFactionManager().getPlayerFaction(player); + if ((playerFaction != null) && (!bardEffect.clickable.getType().equals(PotionEffectType.WITHER))) + { + Collection nearbyEntities = player.getNearbyEntities(25.0D, 25.0D, 25.0D); + for (Entity nearby : nearbyEntities) { + if (((nearby instanceof Player)) && (!player.equals(nearby))) + { + Player target = (Player)nearby; + if (playerFaction.getMembers().containsKey(target.getUniqueId())) { + this.bardRestorer.setRestoreEffect(target, bardEffect.clickable); + } + } + } + } + else if ((playerFaction != null) && (bardEffect.clickable.getType().equals(PotionEffectType.WITHER))) + { + Collection nearbyEntities = player.getNearbyEntities(25.0D, 25.0D, 25.0D); + for (Entity nearby : nearbyEntities) { + if (((nearby instanceof Player)) && (!player.equals(nearby))) + { + Player target = (Player)nearby; + if (!playerFaction.getMembers().containsKey(target.getUniqueId())) { + this.bardRestorer.setRestoreEffect(target, bardEffect.clickable); + } + } + } + } + else if (bardEffect.clickable.getType().equals(PotionEffectType.WITHER)) + { + Collection nearbyEntities = player.getNearbyEntities(25.0D, 25.0D, 25.0D); + for (Entity nearby : nearbyEntities) { + if (((nearby instanceof Player)) && (!player.equals(nearby))) + { + Player target = (Player)nearby; + this.bardRestorer.setRestoreEffect(target, bardEffect.clickable); + } + } + } + } + if ((bardEffect.clickable.getType().equals(PotionEffectType.INCREASE_DAMAGE))) + { + this.bardRestorer.setRestoreEffect(player, bardEffect.clickable); + player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 1, 0)); + } + this.bardRestorer.setRestoreEffect(player, bardEffect.clickable); + setEnergy(player, bardData.getEnergy() - bardEffect.energyCost); + bardData.buffCooldown = (System.currentTimeMillis() + BUFF_COOLDOWN_MILLIS); + } + } + } + + private boolean canUseBardEffect(Player player, BardData bardData, BardEffect bardEffect, boolean sendFeedback) + { + String errorFeedback = null; + double currentEnergy = bardData.getEnergy(); + if (bardEffect.energyCost > currentEnergy) { + errorFeedback = ChatColor.RED + "You need at least " + ChatColor.BOLD + bardEffect.energyCost + ChatColor.RED + " energy to use this Bard buff, whilst you only have " + ChatColor.BOLD + currentEnergy + ChatColor.RED + '.'; + } + long remaining = bardData.getRemainingBuffDelay(); + if (remaining > 0L) { + errorFeedback = ChatColor.RED + "You still have a cooldown on this " + ChatColor.GREEN + ChatColor.BOLD + "Bard" + ChatColor.RED + " buff for another " + Core.getRemaining(remaining, true, false) + ChatColor.RED + '.'; + } + Faction factionAt = this.plugin.getFactionManager().getFactionAt(player.getLocation()); + if (factionAt.isSafezone()) { + errorFeedback = ChatColor.RED + "Bard Buffs are disabled in safe-zones."; + } + if ((sendFeedback) && (errorFeedback != null)) { + player.sendMessage(errorFeedback); + } + return errorFeedback == null; + } + + public boolean isApplicableFor(Player player) + { + ItemStack helmet = player.getInventory().getHelmet(); + if ((helmet == null) || (helmet.getType() != Material.GOLD_HELMET)) { + return false; + } + ItemStack chestplate = player.getInventory().getChestplate(); + if ((chestplate == null) || (chestplate.getType() != Material.GOLD_CHESTPLATE)) { + return false; + } + ItemStack leggings = player.getInventory().getLeggings(); + if ((leggings == null) || (leggings.getType() != Material.GOLD_LEGGINGS)) { + return false; + } + ItemStack boots = player.getInventory().getBoots(); + return (boots != null) && (boots.getType() == Material.GOLD_BOOTS); + } + + public long getRemainingBuffDelay(Player player) + { + synchronized (this.bardDataMap) + { + BardData bardData = (BardData)this.bardDataMap.get(player.getUniqueId()); + return bardData == null ? 0L : bardData.getRemainingBuffDelay(); + } + } + + public double getEnergy(Player player) + { + synchronized (this.bardDataMap) + { + BardData bardData = (BardData)this.bardDataMap.get(player.getUniqueId()); + return bardData == null ? 0.0D : bardData.getEnergy(); + } + } + + public long getEnergyMillis(Player player) + { + synchronized (this.bardDataMap) + { + BardData bardData = (BardData)this.bardDataMap.get(player.getUniqueId()); + return bardData == null ? 0L : bardData.getEnergyMillis(); + } + } + + public double setEnergy(Player player, double energy) + { + BardData bardData = (BardData)this.bardDataMap.get(player.getUniqueId()); + if (bardData == null) { + return 0.0D; + } + bardData.setEnergy(energy); + return bardData.getEnergy(); + } + + private static final long BUFF_COOLDOWN_MILLIS = TimeUnit.SECONDS.toMillis(8L); + private final Map bardDataMap; + private final Map bardEffects; + private final BardRestorer bardRestorer; + private final Core plugin; + private final TObjectLongMap msgCooldowns; +} diff --git a/src/club/curahq/core/classes/bard/BardData.java b/src/club/curahq/core/classes/bard/BardData.java new file mode 100644 index 0000000..d4b9fe5 --- /dev/null +++ b/src/club/curahq/core/classes/bard/BardData.java @@ -0,0 +1,40 @@ +package club.curahq.core.classes.bard; + +import com.google.common.base.Preconditions; +import org.bukkit.scheduler.BukkitTask; + +public class BardData { + public static final double MIN_ENERGY = 0.0; + public static final double MAX_ENERGY = 120.0; + public static final long MAX_ENERGY_MILLIS = 120000L; + private static final double ENERGY_PER_MILLISECOND = 1.25; + public long buffCooldown; + public BukkitTask heldTask; + private long energyStart; + + public long getRemainingBuffDelay() { + return this.buffCooldown - System.currentTimeMillis(); + } + + public void startEnergyTracking() { + this.setEnergy(0.0); + } + + public long getEnergyMillis() { + if(this.energyStart == 0L) { + return 0L; + } + return Math.min(MAX_ENERGY_MILLIS, (long) (ENERGY_PER_MILLISECOND * (System.currentTimeMillis() - this.energyStart))); + } + + public double getEnergy() { + final double value = this.getEnergyMillis() / 1000.0; + return Math.round(value * 10.0) / 10.0; + } + + public void setEnergy(final double energy) { + Preconditions.checkArgument(energy >= MIN_ENERGY, (Object) "Energy cannot be less than 0.0"); + Preconditions.checkArgument(energy <= MAX_ENERGY, (Object) "Energy cannot be more than 120.0"); + this.energyStart = (long) (System.currentTimeMillis() - 1000.0 * energy); + } +} diff --git a/src/club/curahq/core/classes/bard/BardEffect.java b/src/club/curahq/core/classes/bard/BardEffect.java new file mode 100644 index 0000000..86e7b9e --- /dev/null +++ b/src/club/curahq/core/classes/bard/BardEffect.java @@ -0,0 +1,17 @@ +package club.curahq.core.classes.bard; + +import org.bukkit.potion.PotionEffect; + +public class BardEffect +{ + public final int energyCost; + public final PotionEffect clickable; + public final PotionEffect heldable; + + public BardEffect(int energyCost, PotionEffect clickable, PotionEffect heldable) + { + this.energyCost = energyCost; + this.clickable = clickable; + this.heldable = heldable; + } +} diff --git a/src/club/curahq/core/classes/bard/BardRestorer.java b/src/club/curahq/core/classes/bard/BardRestorer.java new file mode 100644 index 0000000..54c9240 --- /dev/null +++ b/src/club/curahq/core/classes/bard/BardRestorer.java @@ -0,0 +1,83 @@ +package club.curahq.core.classes.bard; + +import com.google.common.collect.HashBasedTable; +import com.google.common.collect.Table; + +import club.curahq.core.Core; +import club.curahq.core.classes.event.PvpClassUnequipEvent; + +import java.util.Collection; +import java.util.UUID; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PotionEffectExpireEvent; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + + +public class BardRestorer + implements Listener +{ + private final Table restores; + + public BardRestorer(Core plugin) + { + this.restores = HashBasedTable.create(); + plugin.getServer().getPluginManager().registerEvents(this, plugin); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPvpClassUnequip(PvpClassUnequipEvent event) + { + this.restores.rowKeySet().remove(event.getPlayer().getUniqueId()); + } + + public void setRestoreEffect(Player player, PotionEffect effect) { + boolean shouldCancel = true; + Collection activeList = player.getActivePotionEffects(); + for (PotionEffect active : activeList) { + if (!active.getType().equals(effect.getType())) + continue; + + // If the current potion effect has a higher amplifier, ignore this one. + if (effect.getAmplifier() < active.getAmplifier()) { + return; + } else if (effect.getAmplifier() == active.getAmplifier()) { + // If the current potion effect has a longer duration, ignore this one. + if (effect.getDuration() < active.getDuration()) { + return; + } + } + + restores.put(player.getUniqueId(), active.getType(), active); + shouldCancel = false; + break; + } + + // Cancel the previous restore. + //NEED FIXING + player.addPotionEffect(effect, true); + if (shouldCancel && effect.getDuration() > BardClass.HELD_EFFECT_DURATION_TICKS && effect.getDuration() < BardClass.DEFAULT_MAX_DURATION) { + restores.remove(player.getUniqueId(), effect.getType()); + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPotionEffectExpire(PotionEffectExpireEvent event) + { + LivingEntity livingEntity = event.getEntity(); + if ((livingEntity instanceof Player)) + { + Player player = (Player)livingEntity; + PotionEffect previous = (PotionEffect)this.restores.remove(player.getUniqueId(), event.getEffect().getType()); + if (previous != null) + { + event.setCancelled(true); + player.addPotionEffect(previous, true); + } + } + } +} diff --git a/src/club/curahq/core/classes/event/PvpClassEquipEvent.java b/src/club/curahq/core/classes/event/PvpClassEquipEvent.java new file mode 100644 index 0000000..a41e87e --- /dev/null +++ b/src/club/curahq/core/classes/event/PvpClassEquipEvent.java @@ -0,0 +1,35 @@ +package club.curahq.core.classes.event; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +import club.curahq.core.classes.PvpClass; + +public class PvpClassEquipEvent + extends PlayerEvent +{ + public PvpClassEquipEvent(Player player, PvpClass pvpClass) + { + super(player); + this.pvpClass = pvpClass; + } + + public static HandlerList getHandlerList() + { + return handlers; + } + + public PvpClass getPvpClass() + { + return this.pvpClass; + } + + public HandlerList getHandlers() + { + return handlers; + } + + private static final HandlerList handlers = new HandlerList(); + private final PvpClass pvpClass; +} diff --git a/src/club/curahq/core/classes/event/PvpClassUnequipEvent.java b/src/club/curahq/core/classes/event/PvpClassUnequipEvent.java new file mode 100644 index 0000000..122d47f --- /dev/null +++ b/src/club/curahq/core/classes/event/PvpClassUnequipEvent.java @@ -0,0 +1,35 @@ +package club.curahq.core.classes.event; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +import club.curahq.core.classes.PvpClass; + +public class PvpClassUnequipEvent + extends PlayerEvent +{ + public PvpClassUnequipEvent(Player player, PvpClass pvpClass) + { + super(player); + this.pvpClass = pvpClass; + } + + public static HandlerList getHandlerList() + { + return handlers; + } + + public PvpClass getPvpClass() + { + return this.pvpClass; + } + + public HandlerList getHandlers() + { + return handlers; + } + + private static final HandlerList handlers = new HandlerList(); + private final PvpClass pvpClass; +} diff --git a/src/club/curahq/core/classes/type/AssassinClass.java b/src/club/curahq/core/classes/type/AssassinClass.java new file mode 100644 index 0000000..8ae4d8c --- /dev/null +++ b/src/club/curahq/core/classes/type/AssassinClass.java @@ -0,0 +1,233 @@ +package club.curahq.core.classes.type; + +import java.util.HashMap; +import java.util.concurrent.TimeUnit; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.classes.event.PvpClassUnequipEvent; +import club.curahq.core.util.core.Cooldowns; + +public class AssassinClass + extends PvpClass + implements Listener +{ + private final Core plugin; + public HashMap firstAssassinEffects; + + public AssassinClass(Core plugin) + { + super("Reaper", TimeUnit.SECONDS.toMillis(3L)); + this.firstAssassinEffects = new HashMap(); + this.plugin = plugin; + this.passiveEffects.add(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 0)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1)); + } + + @SuppressWarnings({ "deprecation", "unlikely-arg-type" }) +@EventHandler + public void onUnEquip(PvpClassUnequipEvent e) + { + Player p = e.getPlayer(); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player on = arrayOfPlayer[i]; + if ((!on.canSee(p)) && (!on.hasPermission("base.command.vanish"))) { + on.showPlayer(p); + } + } + this.firstAssassinEffects.remove(p); + } + + @EventHandler + public void onDamageSelf(EntityDamageEvent e) + { + if ((e.getEntity() instanceof Player)) + { + Player p = (Player)e.getEntity(); + if ((this.plugin.getPvpClassManager().getEquippedClass(p) == null) || (!this.plugin.getPvpClassManager().getEquippedClass(p).equals(this))) { + return; + } + if ((this.firstAssassinEffects.containsKey(p.getName())) && (((Integer)this.firstAssassinEffects.get(p.getName())).intValue() == 1)) { + for (Entity entity : p.getNearbyEntities(20.0D, 20.0D, 20.0D)) { + if ((entity instanceof Player)) + { + Player players = (Player)entity; + players.sendMessage(ChatColor.YELLOW + "A reaper has taken damage in stealth mode near you: " + ChatColor.GRAY + ChatColor.ITALIC + "(20 x 20)"); + } + } + } + } + } + + @EventHandler + public void onHitOtherPlayers(EntityDamageByEntityEvent e) + { + if (((e.getDamager() instanceof Player)) && ((e.getEntity() instanceof Player))) + { + Player p = (Player)e.getDamager(); + e.getEntity(); + if ((this.firstAssassinEffects.containsKey(p.getName())) && (((Integer)this.firstAssassinEffects.get(p.getName())).intValue() == 1)) { + afterFiveSeconds(p, true); + } + } + } + + @SuppressWarnings("deprecation") +@EventHandler + public void onClickItem(PlayerInteractEvent e) + { + final Player p = e.getPlayer(); + if ((e.getAction() == Action.RIGHT_CLICK_BLOCK) || (e.getAction() == Action.RIGHT_CLICK_AIR)) + { + PvpClass equipped = this.plugin.getPvpClassManager().getEquippedClass(p); + if ((equipped == null) || (!equipped.equals(this))) { + return; + } + if (p.getItemInHand().getType() == Material.QUARTZ) + { + if (Cooldowns.isOnCooldown("Assassin_item_cooldown", p)) + { + p.sendMessage(ChatColor.RED + "You still have an " + ChatColor.GREEN + ChatColor.BOLD + "Reaper" + ChatColor.RED + " cooldown for another " + Core.getRemaining(Cooldowns.getCooldownForPlayerLong("Assassin_item_cooldown", p), true) + ChatColor.RED + '.'); + return; + } + if (p.getItemInHand().getAmount() == 1) { + p.getInventory().remove(p.getItemInHand()); + } + p.getItemInHand().setAmount(p.getItemInHand().getAmount() - 1); + p.sendMessage(ChatColor.YELLOW + "You are now in " + ChatColor.GRAY + "Stealth" + ChatColor.YELLOW + " Mode"); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player on = arrayOfPlayer[i]; + on.playEffect(p.getLocation().add(0.5D, 2.0D, 0.5D), Effect.ENDER_SIGNAL, 5); + on.playEffect(p.getLocation().add(0.5D, 1.5D, 0.5D), Effect.ENDER_SIGNAL, 5); + on.playEffect(p.getLocation().add(0.5D, 1.0D, 0.5D), Effect.ENDER_SIGNAL, 5); + on.playSound(p.getLocation(), Sound.ENDERMAN_TELEPORT, 1.0F, 1.0F); + if (!on.hasPermission("base.command.vanish")) { + on.hidePlayer(p); + } + } + Cooldowns.addCooldown("Assassin_item_cooldown", p, 60); + p.removePotionEffect(PotionEffectType.SPEED); + this.firstAssassinEffects.put(p.getName(), Integer.valueOf(1)); + p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 100, 4), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 100, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 100, 0), true); + new BukkitRunnable() + { + public void run() + { + if ((AssassinClass.this.isApplicableFor(p)) && (AssassinClass.this.firstAssassinEffects.containsKey(p.getName())) && (((Integer)AssassinClass.this.firstAssassinEffects.get(p.getName())).intValue() == 1)) { + AssassinClass.this.afterFiveSeconds(p, false); + } + } + }.runTaskLater(this.plugin, 100L); + } + } + } + + @SuppressWarnings("deprecation") +public void afterFiveSeconds(final Player p, boolean force) + { + if ((this.firstAssassinEffects.containsKey(p.getName())) && (isApplicableFor(p))) + { + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player on = arrayOfPlayer[i]; + if ((!on.canSee(p)) && (!on.hasPermission("base.command.vanish"))) { + on.showPlayer(p); + } + on.playEffect(p.getLocation().add(0.0D, 2.0D, 0.0D), Effect.ENDER_SIGNAL, 3); + on.playEffect(p.getLocation().add(0.0D, 1.5D, 0.0D), Effect.ENDER_SIGNAL, 3); + on.playEffect(p.getLocation().add(0.0D, 1.0D, 0.0D), Effect.ENDER_SIGNAL, 3); + on.playEffect(p.getLocation().add(0.0D, 2.0D, 0.0D), Effect.BLAZE_SHOOT, 5); + on.playEffect(p.getLocation().add(0.0D, 1.5D, 0.0D), Effect.BLAZE_SHOOT, 5); + on.playEffect(p.getLocation().add(0.0D, 1.0D, 0.0D), Effect.BLAZE_SHOOT, 5); + } + new BukkitRunnable() + { + public void run() + { + if ((AssassinClass.this.firstAssassinEffects.containsKey(p.getName())) && (((Integer)AssassinClass.this.firstAssassinEffects.get(p.getName())).intValue() == 2)) + { + AssassinClass.this.firstAssassinEffects.remove(p.getName()); + p.sendMessage(ChatColor.YELLOW + "You are now in " + ChatColor.GREEN + "Normal" + ChatColor.YELLOW + " Mode"); + if (AssassinClass.this.isApplicableFor(p)) + { + p.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1), true); + } + } + } + }.runTaskLater(this.plugin, 100L); + if (force) + { + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 120, 1), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 120, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 120, 1), true); + p.removePotionEffect(PotionEffectType.INVISIBILITY); + this.firstAssassinEffects.remove(p.getName()); + this.firstAssassinEffects.put(p.getName(), Integer.valueOf(2)); + p.sendMessage(ChatColor.YELLOW + "You have been forced into " + ChatColor.RED + "Power" + ChatColor.YELLOW + " Mode" + ChatColor.GRAY.toString() + ChatColor.ITALIC + " (5 Seconds)"); + return; + } + this.firstAssassinEffects.remove(p.getName()); + this.firstAssassinEffects.put(p.getName(), Integer.valueOf(2)); + p.sendMessage(ChatColor.YELLOW + "You are now in " + ChatColor.RED + "Power" + ChatColor.YELLOW + " Mode" + ChatColor.GRAY.toString() + ChatColor.ITALIC + " (5 Seconds)"); + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 120, 1), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 120, 0), true); + p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 120, 1), true); + p.removePotionEffect(PotionEffectType.INVISIBILITY); + } + } + + public boolean isApplicableFor(Player player) + { + PlayerInventory playerInventory = player.getInventory(); + ItemStack helmet = playerInventory.getHelmet(); + if ((helmet == null) || (helmet.getType() != Material.CHAINMAIL_HELMET)) { + return false; + } + ItemStack chestplate = playerInventory.getChestplate(); + if ((chestplate == null) || (chestplate.getType() != Material.CHAINMAIL_CHESTPLATE)) { + return false; + } + ItemStack leggings = playerInventory.getLeggings(); + if ((leggings == null) || (leggings.getType() != Material.CHAINMAIL_LEGGINGS)) { + return false; + } + ItemStack boots = playerInventory.getBoots(); + return (boots != null) && (boots.getType() == Material.CHAINMAIL_BOOTS); + } +} diff --git a/src/club/curahq/core/classes/type/MinerClass.java b/src/club/curahq/core/classes/type/MinerClass.java new file mode 100644 index 0000000..51eb268 --- /dev/null +++ b/src/club/curahq/core/classes/type/MinerClass.java @@ -0,0 +1,138 @@ +package club.curahq.core.classes.type; + +import java.util.concurrent.TimeUnit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Statistic; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.player.PlayerMoveEvent; +import org.bukkit.event.player.PlayerTeleportEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.classes.event.PvpClassEquipEvent; +import club.curahq.core.util.BukkitUtils; + +public class MinerClass + extends PvpClass + implements Listener +{ + public MinerClass(Core plugin) + { + super("Miner", TimeUnit.SECONDS.toMillis(10L)); + this.plugin = plugin; + this.passiveEffects.add(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 0)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.FAST_DIGGING, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0)); + } + + private void removeInvisibilitySafely(Player player) + { + for (PotionEffect active : player.getActivePotionEffects()) { + if ((active.getType().equals(PotionEffectType.INVISIBILITY)) && (active.getDuration() > DEFAULT_MAX_DURATION)) + { + player.sendMessage(ChatColor.LIGHT_PURPLE + getName() + ChatColor.YELLOW + " invisibility and haste disabled."); + player.removePotionEffect(active.getType()); + break; + } + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerDamage(EntityDamageByEntityEvent event) + { + Entity entity = event.getEntity(); + if (((entity instanceof Player)) && (BukkitUtils.getFinalAttacker(event, false) != null)) + { + Player player = (Player)entity; + if (this.plugin.getPvpClassManager().hasClassEquipped(player, this)) { + removeInvisibilitySafely(player); + } + } + } + + public void onUnequip(Player player) + { + super.onUnequip(player); + removeInvisibilitySafely(player); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerMove(PlayerMoveEvent event) + { + conformMinerInvisibility(event.getPlayer(), event.getFrom(), event.getTo()); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerTeleport(PlayerTeleportEvent event) + { + conformMinerInvisibility(event.getPlayer(), event.getFrom(), event.getTo()); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onClassEquip(PvpClassEquipEvent event) + { + Player player = event.getPlayer(); + if (event.getPvpClass().equals(this)) + { + player.addPotionEffect(HEIGHT_INVISIBILITY, true); + player.sendMessage(ChatColor.LIGHT_PURPLE + getName() + ChatColor.YELLOW + " invisibility and haste enabled."); + if (player.getStatistic(Statistic.MINE_BLOCK, Material.DIAMOND_ORE) > 30) { + this.passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 0)); + } + } + } + + private void conformMinerInvisibility(Player player, Location from, Location to) + { + int fromY = from.getBlockY(); + int toY = to.getBlockY(); + if ((fromY != toY) && (this.plugin.getPvpClassManager().hasClassEquipped(player, this))) + { + boolean isInvisible = player.hasPotionEffect(PotionEffectType.INVISIBILITY); + if (toY > 30) + { + if ((fromY <= 30) && (isInvisible)) { + removeInvisibilitySafely(player); + } + } + else if (!isInvisible) + { + player.addPotionEffect(HEIGHT_INVISIBILITY, true); + player.sendMessage(ChatColor.LIGHT_PURPLE + getName() + ChatColor.YELLOW + " invisibility and haste enabled."); + } + } + } + + public boolean isApplicableFor(Player player) + { + PlayerInventory playerInventory = player.getInventory(); + ItemStack helmet = playerInventory.getHelmet(); + if ((helmet == null) || (helmet.getType() != Material.IRON_HELMET) || (!helmet.getEnchantments().isEmpty())) { + return false; + } + ItemStack chestplate = playerInventory.getChestplate(); + if ((chestplate == null) || (chestplate.getType() != Material.IRON_CHESTPLATE) || (!chestplate.getEnchantments().isEmpty())) { + return false; + } + ItemStack leggings = playerInventory.getLeggings(); + if ((leggings == null) || (leggings.getType() != Material.IRON_LEGGINGS) || (!leggings.getEnchantments().isEmpty())) { + return false; + } + ItemStack boots = playerInventory.getBoots(); + return (boots != null) && (boots.getType() == Material.IRON_BOOTS) && (boots.getEnchantments().isEmpty()); + } + + private static final PotionEffect HEIGHT_INVISIBILITY = new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0); + private final Core plugin; +} diff --git a/src/club/curahq/core/classes/type/RogueClass.java b/src/club/curahq/core/classes/type/RogueClass.java new file mode 100644 index 0000000..707e55b --- /dev/null +++ b/src/club/curahq/core/classes/type/RogueClass.java @@ -0,0 +1,124 @@ +package club.curahq.core.classes.type; + +import java.util.concurrent.TimeUnit; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import club.curahq.core.Core; +import club.curahq.core.classes.PvpClass; +import club.curahq.core.util.core.ConfigUtil; +import club.curahq.core.util.core.Cooldowns; + +public class RogueClass + extends PvpClass + implements Listener +{ + private final Core plugin; + + public RogueClass(Core plugin) + { + super("Rogue", TimeUnit.SECONDS.toMillis(1L)); + this.plugin = plugin; + this.passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 1)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.REGENERATION, Integer.MAX_VALUE, 0)); + this.passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2)); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.HIGHEST) + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) + { + Entity entity = event.getEntity(); + Entity damager = event.getDamager(); + if (((entity instanceof Player)) && ((damager instanceof Player))) + { + Player attacker = (Player)damager; + PvpClass equipped = this.plugin.getPvpClassManager().getEquippedClass(attacker); + if ((equipped != null) && (equipped.equals(this))) + { + ItemStack stack = attacker.getItemInHand(); + if ((stack != null) && (stack.getType() == Material.GOLD_SWORD) && (stack.getEnchantments().isEmpty())) + { + Player player = (Player)entity; + if (player.isDead()) { + return; + } + if (Cooldowns.isOnCooldown("rogue_cooldown", attacker)) { + attacker.sendMessage(ChatColor.RED + "You are on cooldown for another " + Cooldowns.getCooldownForPlayerInt("rogue_cooldown", attacker) + "s."); + return; + } + if (rpGetPlayerDirection(attacker).equals(rpGetPlayerDirection(player))) { + player.sendMessage(ConfigUtil.ENEMY_COLOUR + attacker.getName() + ChatColor.YELLOW + " has backstabbed you."); + player.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F); + attacker.sendMessage(ChatColor.YELLOW + "You have backstabbed " + ConfigUtil.ENEMY_COLOUR + player.getName() + ChatColor.YELLOW + '.'); + attacker.setItemInHand(new ItemStack(Material.AIR, 1)); + attacker.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F); + attacker.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.valueOf(150), 1)); + double hp = ((CraftPlayer)player).getHealth(); + if (hp == 0) { + return; + } + double amount = hp - 6.0; + player.setHealth(amount); + Cooldowns.addCooldown("rogue_cooldown", attacker, 2); + } + } + } + } + } + + public String rpGetPlayerDirection(Player playerSelf) + { + String dir = ""; + float y = playerSelf.getLocation().getYaw(); + if (y < 0.0F) { + y += 360.0F; + } + y %= 360.0F; + int i = (int)((y + 8.0F) / 22.5D); + if ((i == 0) || (i == 1) || (i == 15)) { + dir = "west"; + } else if ((i == 4) || (i == 5) || (i == 6) || (i == 2) || (i == 3)) { + dir = "north"; + } else if ((i == 8) || (i == 7) || (i == 9)) { + dir = "east"; + } else if ((i == 11) || (i == 10) || (i == 12) || (i == 13) || (i == 14)) { + dir = "south"; + } else { + dir = "west"; + } + return dir; + } + + public boolean isApplicableFor(Player player) + { + PlayerInventory playerInventory = player.getInventory(); + ItemStack helmet = playerInventory.getHelmet(); + if ((helmet == null) || (helmet.getType() != Material.CHAINMAIL_HELMET)) { + return false; + } + ItemStack chestplate = playerInventory.getChestplate(); + if ((chestplate == null) || (chestplate.getType() != Material.CHAINMAIL_CHESTPLATE)) { + return false; + } + ItemStack leggings = playerInventory.getLeggings(); + if ((leggings == null) || (leggings.getType() != Material.CHAINMAIL_LEGGINGS)) { + return false; + } + ItemStack boots = playerInventory.getBoots(); + return (boots != null) && (boots.getType() == Material.CHAINMAIL_BOOTS); + } +} diff --git a/src/club/curahq/core/combatlog/CombatLogEntry.java b/src/club/curahq/core/combatlog/CombatLogEntry.java new file mode 100644 index 0000000..bb19d63 --- /dev/null +++ b/src/club/curahq/core/combatlog/CombatLogEntry.java @@ -0,0 +1,15 @@ +package club.curahq.core.combatlog; + +import org.bukkit.scheduler.BukkitTask; + +public class CombatLogEntry +{ + public final LoggerEntity loggerEntity; + public final BukkitTask task; + + public CombatLogEntry(LoggerEntity loggerEntity, BukkitTask task) + { + this.loggerEntity = loggerEntity; + this.task = task; + } +} diff --git a/src/club/curahq/core/combatlog/CombatLogListener.java b/src/club/curahq/core/combatlog/CombatLogListener.java new file mode 100644 index 0000000..7bba4cc --- /dev/null +++ b/src/club/curahq/core/combatlog/CombatLogListener.java @@ -0,0 +1,162 @@ +package club.curahq.core.combatlog; + +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityInteractEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.EntityEquipment; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.scheduler.BukkitRunnable; +import org.spigotmc.event.player.PlayerSpawnLocationEvent; + +import club.curahq.core.Core; + +public class CombatLogListener + implements Listener +{ + public CombatLogListener(Core plugin) + { + this.plugin = plugin; + } + + public static void safelyDisconnect(Player player, String reason) + { + if (SAFE_DISCONNECTS.add(player.getUniqueId())) { + player.kickPlayer(reason); + } + } + + public static void removeCombatLoggers() + { + Iterator iterator = LOGGERS.values().iterator(); + while (iterator.hasNext()) + { + CombatLogEntry entry = (CombatLogEntry)iterator.next(); + entry.task.cancel(); + entry.loggerEntity.getBukkitEntity().remove(); + iterator.remove(); + } + SAFE_DISCONNECTS.clear(); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onPlayerQuitSafe(PlayerQuitEvent event) + { + SAFE_DISCONNECTS.remove(event.getPlayer().getUniqueId()); + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.HIGH) + public void onLoggerInteract(EntityInteractEvent event) + { + Collection entries = LOGGERS.values(); + for (CombatLogEntry entry : entries) { + if (entry.loggerEntity.getBukkitEntity().equals(event.getEntity())) + { + event.setCancelled(true); + break; + } + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.MONITOR) + public void onLoggerDeath(LoggerDeathEvent event) + { + CombatLogEntry entry = (CombatLogEntry)LOGGERS.remove(event.getLoggerEntity().getPlayerUUID()); + if (entry != null) { + entry.task.cancel(); + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.HIGHEST) + public void onPlayerSpawnLocation(PlayerSpawnLocationEvent event) + { + CombatLogEntry combatLogEntry = (CombatLogEntry)LOGGERS.remove(event.getPlayer().getUniqueId()); + if (combatLogEntry != null) + { + CraftLivingEntity loggerEntity = combatLogEntry.loggerEntity.getBukkitEntity(); + Player player = event.getPlayer(); + event.setSpawnLocation(loggerEntity.getLocation()); + player.setFallDistance(loggerEntity.getFallDistance()); + player.setTicksLived(loggerEntity.getTicksLived()); + player.setRemainingAir(loggerEntity.getRemainingAir()); + loggerEntity.remove(); + combatLogEntry.task.cancel(); + } + } + + @EventHandler(ignoreCancelled=true, priority=EventPriority.NORMAL) + public void onPlayerQuit(PlayerQuitEvent event) + { + Player player = event.getPlayer(); + UUID uuid = player.getUniqueId(); + PlayerInventory inventory = player.getInventory(); + if ((player.getGameMode() != GameMode.CREATIVE) && (!player.isDead()) && (!SAFE_DISCONNECTS.contains(uuid))) + { + if ((this.plugin.getTimerManager().invincibilityTimer.getRemaining(uuid) > 0L)) { + return; + } + if (this.plugin.getTimerManager().teleportTimer.getNearbyEnemies(player, 64) <= 0) { + return; + } + Location location = player.getLocation(); + if (this.plugin.getFactionManager().getFactionAt(location).isSafezone()) { + return; + } + if (LOGGERS.containsKey(player.getUniqueId())) { + return; + } + World world = location.getWorld(); + LoggerEntity loggerEntity = new LoggerEntity(world, location, player); + LoggerSpawnEvent calledEvent = new LoggerSpawnEvent(loggerEntity); + Bukkit.getPluginManager().callEvent(calledEvent); + LOGGERS.put(uuid, new CombatLogEntry(loggerEntity, new LoggerRemovable(uuid, loggerEntity).runTaskLater(this.plugin, 600L))); + CraftEntity craftEntity = loggerEntity.getBukkitEntity(); + if (craftEntity != null) + { + CraftLivingEntity craftLivingEntity = (CraftLivingEntity)craftEntity; + EntityEquipment entityEquipment = craftLivingEntity.getEquipment(); + entityEquipment.setItemInHand(inventory.getItemInHand()); + entityEquipment.setArmorContents(inventory.getArmorContents()); + } + } + } + + private static final Set SAFE_DISCONNECTS = new HashSet(); + private static final Map LOGGERS = new HashMap(); + private final Core plugin; + + private static class LoggerRemovable + extends BukkitRunnable + { + private final UUID uuid; + private final LoggerEntity loggerEntity; + + public LoggerRemovable(UUID uuid, LoggerEntity loggerEntity) + { + this.uuid = uuid; + this.loggerEntity = loggerEntity; + } + + public void run() + { + if (CombatLogListener.LOGGERS.remove(this.uuid) != null) { + this.loggerEntity.dead = true; + } + } + } +} diff --git a/src/club/curahq/core/combatlog/CustomEntityRegistration.java b/src/club/curahq/core/combatlog/CustomEntityRegistration.java new file mode 100644 index 0000000..cfd0de4 --- /dev/null +++ b/src/club/curahq/core/combatlog/CustomEntityRegistration.java @@ -0,0 +1,60 @@ +package club.curahq.core.combatlog; + +import java.lang.reflect.Field; +import java.util.Map; +import net.minecraft.server.v1_7_R4.EntityTypes; + +public class CustomEntityRegistration +{ + public static void registerCustomEntities() + { + try + { + registerCustomEntity(LoggerEntity.class, "CraftSkeleton", 51); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + public static void registerCustomEntity(Class entityClass, String name, int id) + { + setFieldPrivateStaticMap("d", entityClass, name); + setFieldPrivateStaticMap("f", entityClass, Integer.valueOf(id)); + } + + public static void unregisterCustomEntities() {} + + @SuppressWarnings("unchecked") +public static void setFieldPrivateStaticMap(String fieldName, Object key, Object value) + { + try + { + Field field = EntityTypes.class.getDeclaredField(fieldName); + field.setAccessible(true); + Map map = (Map)field.get(null); + map.put(key, value); + field.set(null, map); + } + catch (NoSuchFieldException|SecurityException|IllegalArgumentException|IllegalAccessException ex3) + { + ex3.printStackTrace(); + } + } + + public static void setField(String fieldName, Object key, Object value) + { + try + { + Field field = key.getClass().getDeclaredField(fieldName); + field.setAccessible(true); + field.set(key, value); + field.setAccessible(false); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } +} diff --git a/src/club/curahq/core/combatlog/LoggerDeathEvent.java b/src/club/curahq/core/combatlog/LoggerDeathEvent.java new file mode 100644 index 0000000..013cd68 --- /dev/null +++ b/src/club/curahq/core/combatlog/LoggerDeathEvent.java @@ -0,0 +1,30 @@ +package club.curahq.core.combatlog; + +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +public class LoggerDeathEvent extends Event { + private static final HandlerList handlers; + + static { + handlers = new HandlerList(); + } + + private final LoggerEntity loggerEntity; + + public LoggerDeathEvent(final LoggerEntity loggerEntity) { + this.loggerEntity = loggerEntity; + } + + public static HandlerList getHandlerList() { + return LoggerDeathEvent.handlers; + } + + public LoggerEntity getLoggerEntity() { + return this.loggerEntity; + } + + public HandlerList getHandlers() { + return LoggerDeathEvent.handlers; + } +} diff --git a/src/club/curahq/core/combatlog/LoggerEntity.java b/src/club/curahq/core/combatlog/LoggerEntity.java new file mode 100644 index 0000000..d450d91 --- /dev/null +++ b/src/club/curahq/core/combatlog/LoggerEntity.java @@ -0,0 +1,199 @@ +package club.curahq.core.combatlog; + + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.World; +import org.bukkit.craftbukkit.v1_7_R4.CraftServer; +import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory; +import org.bukkit.entity.Player; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + +import com.google.common.base.Function; + +import net.minecraft.server.v1_7_R4.DamageSource; +import net.minecraft.server.v1_7_R4.Entity; +import net.minecraft.server.v1_7_R4.EntityAgeable; +import net.minecraft.server.v1_7_R4.EntityHuman; +import net.minecraft.server.v1_7_R4.EntityPlayer; +import net.minecraft.server.v1_7_R4.EntityVillager; +import net.minecraft.server.v1_7_R4.PlayerInteractManager; +import net.minecraft.server.v1_7_R4.WorldServer; +import net.minecraft.util.com.mojang.authlib.GameProfile; + + +public class LoggerEntity extends EntityVillager { + private static final Function DAMAGE_FUNCTION; + + static { + DAMAGE_FUNCTION = (f1 -> 0.0); + } + + private final UUID playerUUID; + + public LoggerEntity(final World world, final Location location, final Player player) { + super(((CraftWorld) world).getHandle()); + this.lastDamager = ((CraftPlayer) player).getHandle().lastDamager; + final double x = location.getX(); + final double y = location.getY(); + final double z = location.getZ(); + final String playerName = player.getName(); + final boolean hasSpawned = ((CraftWorld) world).getHandle().addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM); + Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD + "Combat Logger for [" + playerName + "] " + (hasSpawned ? (ChatColor.GREEN + "successfully spawned") : (ChatColor.RED + "failed to spawn")) + ChatColor.GOLD + " at (" + String.format("%.1f", x) + ", " + String.format("%.1f", y) + ", " + String.format("%.1f", z) + ')'); + this.playerUUID = player.getUniqueId(); + if(hasSpawned) { + this.setCustomName(playerName); + this.setCustomNameVisible(true); + this.setPositionRotation(x, y, z, location.getYaw(), location.getPitch()); + this.setCustomNameVisible(true); + } + } + + private static PlayerNmsResult getResult(final World world, final UUID playerUUID) { + final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(playerUUID); + if(offlinePlayer.hasPlayedBefore()) { + final WorldServer worldServer = ((CraftWorld) world).getHandle(); + final EntityPlayer entityPlayer = new EntityPlayer(((CraftServer) Bukkit.getServer()).getServer(), worldServer, new GameProfile(playerUUID, offlinePlayer.getName()), new PlayerInteractManager((net.minecraft.server.v1_7_R4.World) worldServer)); + final Player player = (Player) entityPlayer.getBukkitEntity(); + if(player != null) { + player.loadData(); + return new PlayerNmsResult(player, entityPlayer); + } + } + return null; + } + + public UUID getPlayerUUID() { + return this.playerUUID; + } + + public void move(final double d0, final double d1, final double d2) { + } + + public void b(final int i) { + } + + public void dropDeathLoot(final boolean flag, final int i) { + } + + public Entity findTarget() { + return null; + } + + public boolean damageEntity(final DamageSource damageSource, final float amount) { + final PlayerNmsResult nmsResult = getResult((World) this.world.getWorld(), this.playerUUID); + if(nmsResult == null) { + return true; + } + final EntityPlayer entityPlayer = nmsResult.entityPlayer; + if(entityPlayer != null) { + entityPlayer.setPosition(this.locX, this.locY, this.locZ); + final EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent((Entity) entityPlayer, damageSource, (double) amount, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, (Function) LoggerEntity.DAMAGE_FUNCTION, (Function) LoggerEntity.DAMAGE_FUNCTION, (Function) LoggerEntity.DAMAGE_FUNCTION, (Function) LoggerEntity.DAMAGE_FUNCTION, (Function) LoggerEntity.DAMAGE_FUNCTION, (Function) LoggerEntity.DAMAGE_FUNCTION); + if(event.isCancelled()) { + return false; + } + } + return super.damageEntity(damageSource, amount); + } + + public EntityAgeable createChild(EntityAgeable entityAgeable) { + return null; + } + + public boolean a(final EntityHuman entityHuman) { + return false; + } + + public void h() { + super.h(); + } + + public void collide(final Entity entity) { + } + + public void die(final DamageSource damageSource) { + final PlayerNmsResult playerNmsResult = getResult((World) this.world.getWorld(), this.playerUUID); + if(playerNmsResult == null) { + return; + } + final Player player = playerNmsResult.player; + final PlayerInventory inventory = player.getInventory(); + final boolean keepInventory = this.world.getGameRules().getBoolean("keepInventory"); + final List drops = new ArrayList<>(); + if(!keepInventory) { + ItemStack[] deathMessage = inventory.getContents(); + int entityPlayer = deathMessage.length; + + int event; + ItemStack loggerDeathEvent; + for(event = 0; event < entityPlayer; ++event) { + loggerDeathEvent = deathMessage[event]; + if(loggerDeathEvent != null && loggerDeathEvent.getType() != Material.AIR) { + drops.add(loggerDeathEvent); + } + } + + deathMessage = inventory.getArmorContents(); + entityPlayer = deathMessage.length; + + for(event = 0; event < entityPlayer; ++event) { + loggerDeathEvent = deathMessage[event]; + if(loggerDeathEvent != null && loggerDeathEvent.getType() != Material.AIR) { + drops.add(loggerDeathEvent); + } + } + } + String deathMessage = ChatColor.GRAY + "(Combat-Logger)" + ChatColor.YELLOW + this.combatTracker.b().c(); + final EntityPlayer entityPlayer = playerNmsResult.entityPlayer; + entityPlayer.combatTracker = this.combatTracker; + if(Bukkit.getPlayer(entityPlayer.getName()) != null){ + Bukkit.getPlayer(entityPlayer.getUniqueID()).getInventory().clear(); + Bukkit.getPlayer(entityPlayer.getUniqueID()).kickPlayer("error"); + } + final PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(entityPlayer, drops, deathMessage, keepInventory); + deathMessage = event.getDeathMessage(); + if(deathMessage != null && !deathMessage.isEmpty()) { + Bukkit.broadcastMessage(deathMessage); + } + super.die(damageSource); + final LoggerDeathEvent loggerDeathEvent = new LoggerDeathEvent(this); + Bukkit.getPluginManager().callEvent(loggerDeathEvent); + if(!event.getKeepInventory()) { + inventory.clear(); + inventory.setArmorContents(new ItemStack[inventory.getArmorContents().length]); + } + entityPlayer.setLocation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); + entityPlayer.setHealth(0.0f); + player.saveData(); + } + + + + public CraftLivingEntity getBukkitEntity() { + return (CraftLivingEntity) super.getBukkitEntity(); + } + + public static final class PlayerNmsResult { + public final Player player; + public final EntityPlayer entityPlayer; + + public PlayerNmsResult(final Player player, final EntityPlayer entityPlayer) { + this.player = player; + this.entityPlayer = entityPlayer; + } + } +} diff --git a/src/club/curahq/core/combatlog/LoggerSpawnEvent.java b/src/club/curahq/core/combatlog/LoggerSpawnEvent.java new file mode 100644 index 0000000..de2128d --- /dev/null +++ b/src/club/curahq/core/combatlog/LoggerSpawnEvent.java @@ -0,0 +1,31 @@ +package club.curahq.core.combatlog; + +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +public class LoggerSpawnEvent + extends Event +{ + public LoggerSpawnEvent(LoggerEntity loggerEntity) + { + this.loggerEntity = loggerEntity; + } + + public static HandlerList getHandlerList() + { + return handlers; + } + + public LoggerEntity getLoggerEntity() + { + return this.loggerEntity; + } + + public HandlerList getHandlers() + { + return handlers; + } + + private static final HandlerList handlers = new HandlerList(); + private final LoggerEntity loggerEntity; +} diff --git a/src/club/curahq/core/commands/MessageEvent.java b/src/club/curahq/core/commands/MessageEvent.java new file mode 100644 index 0000000..38429c6 --- /dev/null +++ b/src/club/curahq/core/commands/MessageEvent.java @@ -0,0 +1,24 @@ +package club.curahq.core.commands; + +public class MessageEvent +{ + + public static String format(String message) + { + message = message.replaceAll("&", "§"); + return message; + } + + public static String toString(String[] arguments, int start) + { + String returnString = ""; + for (int count = start; count < arguments.length; count++) { + if (count == start) { + returnString = arguments[count]; + } else { + returnString = returnString + " " + arguments[count]; + } + } + return returnString; + } +} diff --git a/src/club/curahq/core/commands/PlayerFreezeEvent.java b/src/club/curahq/core/commands/PlayerFreezeEvent.java new file mode 100644 index 0000000..0c62f39 --- /dev/null +++ b/src/club/curahq/core/commands/PlayerFreezeEvent.java @@ -0,0 +1,37 @@ +package club.curahq.core.commands; + +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +public class PlayerFreezeEvent extends PlayerEvent implements Cancellable { + public PlayerFreezeEvent(Player player, boolean frozen) { + super(player); + this.frozen = frozen; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + public boolean isFrozen() { + return this.frozen; + } + + public boolean isCancelled() { + return this.cancelled; + } + + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + public HandlerList getHandlers() { + return handlers; + } + + private static final HandlerList handlers = new HandlerList(); + private final boolean frozen; + private boolean cancelled; +} diff --git a/src/club/curahq/core/commands/PlayerVanishEvent.java b/src/club/curahq/core/commands/PlayerVanishEvent.java new file mode 100644 index 0000000..1bec183 --- /dev/null +++ b/src/club/curahq/core/commands/PlayerVanishEvent.java @@ -0,0 +1,44 @@ +package club.curahq.core.commands; + +import java.util.Collection; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +public class PlayerVanishEvent extends PlayerEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); + private final boolean vanished; + private final Collection viewers; + private boolean cancelled; + + public PlayerVanishEvent(Player player, Collection viewers, boolean vanished) { + super(player); + this.viewers = viewers; + this.vanished = vanished; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + public Collection getViewers() { + return this.viewers; + } + + public boolean isVanished() { + return this.vanished; + } + + public boolean isCancelled() { + return this.cancelled; + } + + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + public HandlerList getHandlers() { + return handlers; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/StaffInventory.java b/src/club/curahq/core/commands/StaffInventory.java new file mode 100644 index 0000000..1c07337 --- /dev/null +++ b/src/club/curahq/core/commands/StaffInventory.java @@ -0,0 +1,87 @@ +package club.curahq.core.commands; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.potion.PotionEffect; + +import club.curahq.core.Core; +import club.curahq.core.util.TimeUtils; +import net.minecraft.util.org.apache.commons.lang3.text.WordUtils; + +public class StaffInventory { + private final static Core plugin = Core.getPlugin(); + + public static String translate(String input) { + return ChatColor.translateAlternateColorCodes('&', input); + } + + public static List translateFromArray(List text) { + List messages = new ArrayList(); + for (String string : text) { + messages.add(translate(string)); + } + return messages; + } + + public static void inspector(Player player, Player target) { + Inventory inventory = Bukkit.getServer().createInventory(null, 45, ChatColor.translateAlternateColorCodes('&', "&eInspecting: " + target.getName())); + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { + public void run() { + PlayerInventory playerInventory = target.getInventory(); + + ItemStack cookedBeef = new ItemStack(Material.COOKED_BEEF, target.getFoodLevel()); + ItemMeta cookedBeefMeta = cookedBeef.getItemMeta(); + cookedBeefMeta.setDisplayName(translate("&aHunger")); + cookedBeef.setItemMeta(cookedBeefMeta); + + ItemStack ip = new ItemStack(Material.BED); + ItemMeta ipMeta = ip.getItemMeta(); + ipMeta.setDisplayName(ChatColor.GREEN + (player.hasPermission("core.seeip") ? target.getAddress().getAddress().getHostAddress() : "IP HIDDEN")); + ip.setItemMeta(ipMeta); + + + ItemStack brewingStand = new ItemStack(Material.BREWING_STAND_ITEM, target.getPlayer().getActivePotionEffects().size()); + ItemMeta brewingStandMeta = brewingStand.getItemMeta(); + brewingStandMeta.setDisplayName(translate("&aActive Effects")); + ArrayList brewingStandLore = new ArrayList(); + for (PotionEffect potionEffect : target.getPlayer().getActivePotionEffects()) { + String effectName = potionEffect.getType().getName(); + int effectLevel = potionEffect.getAmplifier(); + effectLevel++; + brewingStandLore.add(translate("&e" + WordUtils.capitalizeFully(effectName).replace("_", " ") + " " + effectLevel + "&7: &c" + TimeUtils.IntegerCountdown.setFormat(Integer.valueOf(potionEffect.getDuration() / 20)))); + } + brewingStandMeta.setLore(brewingStandLore); + brewingStand.setItemMeta(brewingStandMeta); + + ItemStack compass = new ItemStack(Material.COMPASS, 1); + ItemMeta compassMeta = compass.getItemMeta(); + compassMeta.setDisplayName(translate("&aPlayer Location")); + compassMeta.setLore(translateFromArray(Arrays.asList(new String[] { "&eWorld&7: &a" + player.getWorld().getName(),"&eCoords", " &eX&7: &c" + target.getLocation().getBlockX(), " &eY&7: &c" + target.getLocation().getBlockY(), " &eZ&7: &c" + target.getLocation().getBlockZ() }))); + compass.setItemMeta(compassMeta); + + inventory.setContents(playerInventory.getContents()); + inventory.setItem(36, playerInventory.getHelmet()); + inventory.setItem(37, playerInventory.getChestplate()); + inventory.setItem(38, playerInventory.getLeggings()); + inventory.setItem(39, playerInventory.getBoots()); + inventory.setItem(40, playerInventory.getItemInHand()); + inventory.setItem(41, cookedBeef); + inventory.setItem(42, brewingStand); + inventory.setItem(43, ip); + inventory.setItem(44, compass); + + } + }, 0, 5); + player.openInventory(inventory); + } +} diff --git a/src/club/curahq/core/commands/StaffItems.java b/src/club/curahq/core/commands/StaffItems.java new file mode 100644 index 0000000..71837c4 --- /dev/null +++ b/src/club/curahq/core/commands/StaffItems.java @@ -0,0 +1,65 @@ +package club.curahq.core.commands; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import club.curahq.core.commands.staff.StaffModeCommand; + +public class StaffItems { + + @SuppressWarnings("deprecation") + public static void modItems(Player p) { + Inventory inv = p.getInventory(); + + inv.clear(); + + ItemStack compass = new ItemStack(Material.COMPASS); + ItemStack book = new ItemStack(Material.BOOK); + ItemStack tp = new ItemStack(397, 1, (short) 3); + ItemStack vanish = new ItemStack(351, 1, (short) 10); + ItemStack carpet = new ItemStack(171, 1, (short) 15); + + ItemMeta compassMeta = compass.getItemMeta(); + ItemMeta bookMeta = book.getItemMeta(); + ItemMeta eggMeta = tp.getItemMeta(); + ItemMeta vanishMeta = vanish.getItemMeta(); + ItemMeta carpetMeta = carpet.getItemMeta(); + + compassMeta.setDisplayName("§eZoom"); + bookMeta.setDisplayName("§eInventory Inspector"); + eggMeta.setDisplayName("§eFind Player"); + vanishMeta.setDisplayName("§eVanish: §aOn"); + carpetMeta.setDisplayName("§eView"); + + compass.setItemMeta(compassMeta); + book.setItemMeta(bookMeta); + tp.setItemMeta(eggMeta); + vanish.setItemMeta(vanishMeta); + carpet.setItemMeta(carpetMeta); + + inv.setItem(0, compass); + inv.setItem(1, book); + inv.setItem(2, carpet); + inv.setItem(7, tp); + inv.setItem(8, vanish); + } + + public static void saveInventory(Player p) { + StaffModeCommand.armorContents.put(p.getName(), p.getInventory().getArmorContents()); + StaffModeCommand.inventoryContents.put(p.getName(), p.getInventory().getContents()); + } + + public static void loadInventory(Player p) { + p.getInventory().clear(); + + p.getInventory().setContents((ItemStack[]) StaffModeCommand.inventoryContents.get(p.getName())); + p.getInventory().setArmorContents((ItemStack[]) StaffModeCommand.armorContents.get(p.getName())); + + StaffModeCommand.inventoryContents.remove(p.getName()); + StaffModeCommand.armorContents.remove(p.getName()); + } + +} diff --git a/src/club/curahq/core/commands/StaffPriority.java b/src/club/curahq/core/commands/StaffPriority.java new file mode 100644 index 0000000..ae88344 --- /dev/null +++ b/src/club/curahq/core/commands/StaffPriority.java @@ -0,0 +1,50 @@ +package club.curahq.core.commands; + +import com.google.common.collect.ImmutableMap; +import org.bukkit.entity.Player; + +@SuppressWarnings({ "unchecked", "rawtypes" }) +public enum StaffPriority { + OWNER(6), + HEADADMIN(5), + STAFFMANAGER(4), + ADMIN(3), + MODERATOR(2), + TRIAL(1), + NONE(0); + + private static final ImmutableMap BY_ID; + private final int priorityLevel; + + private StaffPriority(int priorityLevel) { + this.priorityLevel = priorityLevel; + } + + public static StaffPriority of(int level) { + return (StaffPriority)((Object)BY_ID.get((Object)level)); + } + + public static StaffPriority of(Player player) { + for (StaffPriority staffPriority : StaffPriority.values()) { + if (!player.hasPermission("staffpriority." + staffPriority.priorityLevel)) continue; + return staffPriority; + } + return NONE; + } + + public int getPriorityLevel() { + return this.priorityLevel; + } + + public boolean isMoreThan(StaffPriority other) { + return this.priorityLevel > other.priorityLevel; + } + + static { + ImmutableMap.Builder builder = new ImmutableMap.Builder(); + for (StaffPriority staffPriority : StaffPriority.values()) { + builder.put((Object)staffPriority.priorityLevel, (Object)staffPriority); + } + BY_ID = builder.build(); + } +} diff --git a/src/club/curahq/core/commands/chat/ClearChatCommand.java b/src/club/curahq/core/commands/chat/ClearChatCommand.java new file mode 100644 index 0000000..b4fcc91 --- /dev/null +++ b/src/club/curahq/core/commands/chat/ClearChatCommand.java @@ -0,0 +1,47 @@ +package club.curahq.core.commands.chat; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.util.core.BaseCommand; +import net.minecraft.util.org.apache.commons.lang3.StringUtils; + +public class ClearChatCommand + extends BaseCommand +{ + +private static final String[] CLEAR_MESSAGE = new String[101]; + + public ClearChatCommand() + { + super("clearchat", "Clears the server chat for players."); + setAliases(new String[] { "cc" }); + setUsage("/(command) "); + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length == 0) + { + sender.sendMessage(getUsage()); + return true; + } + String reason = StringUtils.join(args, ' '); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player player = arrayOfPlayer[i]; + if (!player.hasPermission("command.mod")) { + player.sendMessage(CLEAR_MESSAGE); + } + } + Command.broadcastCommandMessage(sender, ChatColor.WHITE + "In-Game Chat has been cleared by " + ChatColor.YELLOW + sender.getName() + ChatColor.WHITE + " for: " + reason, true); + Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + sender.getName() + ChatColor.GRAY + " has cleared In-Game Chat for§7: §7" + reason); + return true; + } +} diff --git a/src/club/curahq/core/commands/chat/MessageCommand.java b/src/club/curahq/core/commands/chat/MessageCommand.java new file mode 100644 index 0000000..e50fa0e --- /dev/null +++ b/src/club/curahq/core/commands/chat/MessageCommand.java @@ -0,0 +1,59 @@ +package club.curahq.core.commands.chat; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +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 club.curahq.core.commands.MessageEvent; +import net.md_5.bungee.api.ChatColor; + +public class MessageCommand + implements CommandExecutor +{ + + public static List toggle = new ArrayList(); + public static HashMap reply = new HashMap(); + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) + { + if (sender instanceof Player) + { + if (args.length <= 1) + { + sender.sendMessage(ChatColor.RED + "Usage: /message "); + } + else if (Bukkit.getPlayer(args[0]) == null) + { + sender.sendMessage(ChatColor.RED + "Player isn't online."); + } + else if (Bukkit.getPlayer(args[0]).getName() == sender.getName()) + { + sender.sendMessage(ChatColor.RED + "You cannot message yourself"); + } + else if ((toggle.contains(Bukkit.getPlayer(args[0]).getDisplayName())) && (!sender.hasPermission("command.message.bypass"))) + { + sender.sendMessage(MessageEvent.format("&c" + Bukkit.getPlayer(args[0]).getName() + "&7 has their messages disabled.")); + } + else + { + String msgto = MessageEvent.format("&8(&7To " + "&f" + Bukkit.getPlayer(args[0]).getName() + "&8)&7 " + MessageEvent.toString(args, 1)); + sender.sendMessage(msgto); + + String msgrecieve = MessageEvent.format("&8(&7From &f" + sender.getName() + "&8) &7" + MessageEvent.toString(args, 1)); + Bukkit.getPlayer(args[0]).sendMessage(msgrecieve); + reply.put(sender, Bukkit.getPlayer(args[0])); + reply.put(Bukkit.getPlayer(args[0]), (Player)sender); + return true; + } + } + return false; + } +} + + + diff --git a/src/club/curahq/core/commands/chat/ReplyCommand.java b/src/club/curahq/core/commands/chat/ReplyCommand.java new file mode 100644 index 0000000..5b84bbb --- /dev/null +++ b/src/club/curahq/core/commands/chat/ReplyCommand.java @@ -0,0 +1,48 @@ +package club.curahq.core.commands.chat; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.commands.MessageEvent; +import net.md_5.bungee.api.ChatColor; + +public class ReplyCommand + implements CommandExecutor +{ + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) + { + if (args.length == 0) + { + sender.sendMessage(ChatColor.RED + "Usage: /reply "); + } + else if (MessageCommand.reply.get(sender) == null) + { + sender.sendMessage(ChatColor.RED + "You have nobody to reply to."); + } + else if (((Player)MessageCommand.reply.get(sender)).getName() == sender.getName()) + { + sender.sendMessage(ChatColor.RED + "You cannot message yourself."); + } + else if (args[0].equalsIgnoreCase("who")) + { + sender.sendMessage(MessageEvent.format("&7You are currently in a conversation with &b" + ((Player)MessageCommand.reply.get(sender)).getName())); + } + else if ((MessageCommand.toggle.contains(((Player)MessageCommand.reply.get(sender)).getName())) && (!sender.hasPermission("command.message.bypass"))) + { + sender.sendMessage(MessageEvent.format("&f" + ((Player)MessageCommand.reply.get(sender)).getName() + " has their messages disabled.")); + } + else + { + String msgto = MessageEvent.format("&8(&7To " + "&f" + MessageCommand.reply.get(sender).getName() + "&8)&7 " + MessageEvent.toString(args, 0)); + sender.sendMessage(msgto); + String msgget = MessageEvent.format("&8(&7From " + ChatColor.WHITE + sender.getName() + "&8)&7 " + MessageEvent.toString(args, 0)); + ((Player)MessageCommand.reply.get(sender)).sendMessage(MessageEvent.format(msgget)); + + return true; + } + return false; + } +} + diff --git a/src/club/curahq/core/commands/chat/ToggleMessageCommand.java b/src/club/curahq/core/commands/chat/ToggleMessageCommand.java new file mode 100644 index 0000000..f9041d7 --- /dev/null +++ b/src/club/curahq/core/commands/chat/ToggleMessageCommand.java @@ -0,0 +1,45 @@ +package club.curahq.core.commands.chat; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.commands.MessageEvent; + +public class ToggleMessageCommand + implements CommandExecutor +{ + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) + { + if (sender.hasPermission("command.togglemessage")) + { + if (!(sender instanceof Player)) + { + sender.sendMessage(MessageEvent.format("&cOnly in-game player can execute this command.")); + return false; + } + Player player = (Player)sender; + if (!MessageCommand.toggle.contains(player.getName())) + { + player.sendMessage(MessageEvent.format("&7You have &cdisabled &7your &3&lPrivate Messages")); + MessageCommand.toggle.add(sender.getName()); + return true; + } + if (MessageCommand.toggle.contains(player.getName())) + { + player.sendMessage(MessageEvent.format("&7You have &aenabled &7your &3&lPrivate Messages")); + MessageCommand.toggle.remove(sender.getName()); + return true; + } + if (args.length > 1) { + player.sendMessage(MessageEvent.format("&cYou have provided to many arguments")); + } + } + else + { + sender.sendMessage(MessageEvent.format("&cYou lack the sufficient permissions to execute this command.")); + } + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/CoordsCommand.java b/src/club/curahq/core/commands/essentials/CoordsCommand.java new file mode 100644 index 0000000..c8080a1 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/CoordsCommand.java @@ -0,0 +1,20 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +import club.curahq.core.Core; + +public class CoordsCommand implements CommandExecutor { + public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + if (command.getName().equalsIgnoreCase("coords")) { + for (String msg : Core.config.getStringList("Coords")) { + commandSender.sendMessage(ChatColor.translateAlternateColorCodes('&', msg)); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/essentials/DonatorReviveCommand.java b/src/club/curahq/core/commands/essentials/DonatorReviveCommand.java new file mode 100644 index 0000000..296b11e --- /dev/null +++ b/src/club/curahq/core/commands/essentials/DonatorReviveCommand.java @@ -0,0 +1,61 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.deathban.Deathban; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.core.Cooldowns; + +import java.util.UUID; + +public class DonatorReviveCommand implements CommandExecutor { + private final Core plugin; + + public DonatorReviveCommand(final Core plugin) { + this.plugin = plugin; + } + + @SuppressWarnings({ "deprecation", "static-access" }) + public boolean onCommand(final CommandSender sender, final Command command, final String label, + final String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + if (args.length == 0) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " [player]"); + return true; + } + final Player player = (Player) sender; + final OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]); + if (Cooldowns.isOnCooldown("revive_cooldown", player)) { + sender.sendMessage("§cYou cannot do this for another §l" + + Cooldowns.getCooldownForPlayerInt("revive_cooldown", player) / 60 + " §cminutes."); + return true; + } + final UUID targetUUID = target.getUniqueId(); + final FactionUser factionTarget = this.plugin.getUserManager().getUser(targetUUID); + final Deathban deathban = factionTarget.getDeathban(); + if (deathban == null || !deathban.isActive()) { + sender.sendMessage(ChatColor.RED + target.getName() + " is not death-banned."); + return true; + } + + factionTarget.removeDeathban(); + sender.sendMessage( + ChatColor.GRAY + "You have revived " + ChatColor.GOLD + target.getName() + ChatColor.GRAY + '.'); + Bukkit.broadcastMessage(ChatColor.GOLD + sender.getName() + ChatColor.GRAY + " has use their donator revive on " + ChatColor.GOLD + target.getName() + + ChatColor.GRAY + "." + "You can purchase this at " + ChatColor.GOLD + Core.getPlugin().config.getString("store")); + Cooldowns.addCooldown("revive_cooldown", player, 3600); + + return true; + } + +} diff --git a/src/club/curahq/core/commands/essentials/EnchantCommand.java b/src/club/curahq/core/commands/essentials/EnchantCommand.java new file mode 100644 index 0000000..b93dfbf --- /dev/null +++ b/src/club/curahq/core/commands/essentials/EnchantCommand.java @@ -0,0 +1,118 @@ +package club.curahq.core.commands.essentials; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftItemStack; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.core.BaseCommand; +import club.curahq.core.util.core.BaseConstants; + +public class EnchantCommand + extends BaseCommand +{ + public EnchantCommand() + { + super("enchant", "Adds enchantment to items."); + setUsage("/(command) [playerName]"); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 2) + { + sender.sendMessage(getUsage()); + return true; + } + Player target; + if ((args.length > 2) && (sender.hasPermission(command.getPermission() + ".others"))) + { + target = BukkitUtils.playerWithNameOrUUID(args[2]); + } + else + { + if (!(sender instanceof Player)) + { + sender.sendMessage(getUsage(label)); + return true; + } + target = (Player)sender; + } + if ((target == null) || (!BaseCommand.canSee(sender, target))) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + Enchantment enchantment = Enchantment.getByName(args[0]); + if (enchantment == null) + { + sender.sendMessage(ChatColor.RED + "No enchantment named '" + args[0] + "' found."); + return true; + } + org.bukkit.inventory.ItemStack stack = target.getItemInHand(); + if ((stack == null) || (stack.getType() == Material.AIR)) + { + sender.sendMessage(ChatColor.RED + target.getName() + " is not holding an item."); + return true; + } + Integer level = JavaUtils.tryParseInt(args[1]); + if (level == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[1] + "' is not a number."); + return true; + } + int maxLevel = enchantment.getMaxLevel(); + if ((level.intValue() > maxLevel) && (!sender.hasPermission(command.getPermission() + ".abovemaxlevel"))) + { + sender.sendMessage(ChatColor.RED + "The maximum enchantment level for " + enchantment.getName() + " is " + maxLevel + '.'); + return true; + } + if ((!enchantment.canEnchantItem(stack))) + { + sender.sendMessage(ChatColor.RED + "Enchantment " + enchantment.getName() + " cannot be applied to that item."); + return true; + } + stack.addUnsafeEnchantment(enchantment, level.intValue()); + String itemName; + try + { + itemName = CraftItemStack.asNMSCopy(stack).getName(); + } + catch (Error ex) + { + itemName = stack.getType().name(); + } + Command.broadcastCommandMessage(sender, ChatColor.GRAY + "Enchanted " + enchantment.getName() + " at level " + level + " onto " + itemName + " of " + target.getName() + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + switch (args.length) + { + case 1: + Enchantment[] enchantments = Enchantment.values(); + ArrayList results = new ArrayList(enchantments.length); + Enchantment[] arrayOfEnchantment1; + int j = (arrayOfEnchantment1 = enchantments).length; + for (int i = 0; i < j; i++) + { + Enchantment enchantment = arrayOfEnchantment1[i]; + results.add(enchantment.getName()); + } + return BukkitUtils.getCompletions(args, results); + case 3: + return null; + } + return Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/essentials/EndPortalCommand.java b/src/club/curahq/core/commands/essentials/EndPortalCommand.java new file mode 100644 index 0000000..99117cc --- /dev/null +++ b/src/club/curahq/core/commands/essentials/EndPortalCommand.java @@ -0,0 +1,211 @@ +package club.curahq.core.commands.essentials; + +import java.util.HashMap; +import java.util.Map; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerDropItemEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerKickEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; + +public class EndPortalCommand + implements CommandExecutor, Listener +{ + private Core mainPlugin; + private final String ITEM_DISPLAYNAME = ChatColor.RED.toString() + ChatColor.BOLD + "Endportal Maker"; + private Map playerSelections; + + public EndPortalCommand(Core plugin) + { + this.mainPlugin = plugin; + this.playerSelections = new HashMap(); + } + + @EventHandler + public void onInteract(final PlayerInteractEvent e) + { + if ((e.hasItem()) && (e.getClickedBlock() != null)) + { + ItemStack itemStack = e.getItem(); + Block b = e.getClickedBlock(); + if ((itemStack.getItemMeta().hasDisplayName()) && (itemStack.getItemMeta().getDisplayName().equals(this.ITEM_DISPLAYNAME))) + { + LocationPair locationPair = (LocationPair)this.playerSelections.get(e.getPlayer().getName()); + if (locationPair == null) + { + locationPair = new LocationPair(null, null); + this.playerSelections.put(e.getPlayer().getName(), locationPair); + } + if (e.getAction() == Action.LEFT_CLICK_BLOCK) + { + if (b.getType() != Material.ENDER_PORTAL_FRAME) + { + e.getPlayer().sendMessage(ChatColor.RED + "You must select an end portal frame."); + return; + } + locationPair.setFirstLoc(b.getLocation()); + e.getPlayer().sendMessage(ChatColor.GREEN + "Successfully set the first location."); + } + else if (e.getAction() == Action.RIGHT_CLICK_BLOCK) + { + if (b.getType() != Material.ENDER_PORTAL_FRAME) + { + e.getPlayer().sendMessage(ChatColor.RED + "You must select an end portal frame."); + return; + } + if (locationPair.getFirstLoc() == null) + { + e.getPlayer().sendMessage(ChatColor.RED + "Please set the first location (by left clicking the end portal frame)."); + return; + } + locationPair.setSecondLoc(b.getLocation()); + e.getPlayer().sendMessage(ChatColor.GREEN + "Successfully set the second location."); + Location firstLoc = locationPair.getFirstLoc(); + Location secondLoc = locationPair.getSecondLoc(); + if (firstLoc.distance(secondLoc) > 6.0D) + { + e.getPlayer().sendMessage(ChatColor.RED + "You cannot create an end portal that big."); + return; + } + if (firstLoc.getBlockY() != secondLoc.getBlockY()) + { + e.getPlayer().sendMessage(ChatColor.RED + "Make sure that the portals have the same elevation."); + return; + } + int minX = Math.min(firstLoc.getBlockX(), secondLoc.getBlockX()); + int minY = Math.min(firstLoc.getBlockY(), secondLoc.getBlockY()); + int minZ = Math.min(firstLoc.getBlockZ(), secondLoc.getBlockZ()); + int maxX = Math.max(firstLoc.getBlockX(), secondLoc.getBlockX()); + int maxY = Math.max(firstLoc.getBlockY(), secondLoc.getBlockY()); + int maxZ = Math.max(firstLoc.getBlockZ(), secondLoc.getBlockZ()); + int x = minX; + while (x <= maxX) + { + int y = minY; + while (y <= maxY) + { + int z = minZ; + while (z <= maxZ) + { + Block block = b.getWorld().getBlockAt(x, y, z); + if (block.isEmpty()) { + block.setType(Material.ENDER_PORTAL); + } + z++; + } + y++; + } + x++; + } + e.setCancelled(true); + new BukkitRunnable() + { + public void run() + { + e.getPlayer().setItemInHand(null); + e.getPlayer().updateInventory(); + } + }.runTask(this.mainPlugin); + e.getPlayer().sendMessage(ChatColor.GREEN + "You have successfully created an End Portal."); + this.playerSelections.remove(e.getPlayer().getName()); + } + } + } + } + + @EventHandler + public void onDrop(PlayerDropItemEvent e) + { + ItemStack itemStack = e.getItemDrop().getItemStack(); + if ((itemStack.getItemMeta().hasDisplayName()) && (itemStack.getItemMeta().getDisplayName().equals(this.ITEM_DISPLAYNAME))) { + e.getItemDrop().remove(); + } + } + + @EventHandler + public void onQuit(PlayerQuitEvent e) + { + this.playerSelections.remove(e.getPlayer().getName()); + } + + @EventHandler + public void onKick(PlayerKickEvent e) + { + this.playerSelections.remove(e.getPlayer().getName()); + } + + public boolean onCommand(CommandSender s, Command c, String alias, String[] args) + { + if (!s.hasPermission("command.endportal")) + { + s.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (!(s instanceof Player)) + { + s.sendMessage(ChatColor.RED + "You must be a player to perform this command."); + return true; + } + Player p = (Player)s; + if (p.getInventory().firstEmpty() == -1) + { + p.sendMessage(ChatColor.RED + "Please clear up your hotbar, and then perform this command again."); + return true; + } + ItemStack portalMaker = new ItemStack(Material.BLAZE_ROD); + ItemMeta itemMeta = portalMaker.getItemMeta(); + itemMeta.setDisplayName(this.ITEM_DISPLAYNAME); + portalMaker.setItemMeta(itemMeta); + p.getInventory().addItem(new ItemStack[] { portalMaker }); + p.sendMessage(ChatColor.GRAY + "You must select two points."); + return true; + } + + private class LocationPair + { + private Location firstLoc; + private Location secondLoc; + + public LocationPair(Location firstLoc, Location secondLoc) + { + this.firstLoc = firstLoc; + this.secondLoc = secondLoc; + } + + public Location getFirstLoc() + { + return this.firstLoc; + } + + public Location getSecondLoc() + { + return this.secondLoc; + } + + public void setFirstLoc(Location firstLoc) + { + this.firstLoc = firstLoc; + } + + public void setSecondLoc(Location secondLoc) + { + this.secondLoc = secondLoc; + } + } +} diff --git a/src/club/curahq/core/commands/essentials/FightCommand.java b/src/club/curahq/core/commands/essentials/FightCommand.java new file mode 100644 index 0000000..74ffdc2 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/FightCommand.java @@ -0,0 +1,61 @@ +package club.curahq.core.commands.essentials; + +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import net.minecraft.util.gnu.trove.map.TObjectLongMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectLongHashMap; + +@SuppressWarnings({ "unchecked", "rawtypes" }) +public class FightCommand implements CommandExecutor +{ + private static final long FIGHT_COOLDOWN_DELAY; + public static final TObjectLongMap FIGHT_COOLDOWN; + + static { + FIGHT_COOLDOWN_DELAY = TimeUnit.MINUTES.toMillis(30L); + FIGHT_COOLDOWN = (TObjectLongMap)new TObjectLongHashMap(); + } + + public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage("No Console"); + return true; + } + final Player player = (Player)sender; + final int x = player.getLocation().getBlockX(); + final int y = player.getLocation().getBlockY(); + final int z = player.getLocation().getBlockZ(); + + if (command.getName().equalsIgnoreCase("fight")) { + if (!player.hasPermission("command.fight")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (args.length == 0) { + final UUID uuid = player.getUniqueId(); + final long timestamp = FightCommand.FIGHT_COOLDOWN.get(uuid); + final long millis = System.currentTimeMillis(); + final long remaining = (timestamp == FightCommand.FIGHT_COOLDOWN.getNoEntryValue()) ? -1L : (timestamp - millis); + if (remaining > 0L) { + player.sendMessage(ChatColor.RED + "You cannot use this command for another " + ChatColor.BOLD + DurationFormatUtils.formatDurationWords(remaining, true, true) + "."); + return true; + } + Bukkit.broadcastMessage(ChatColor.DARK_GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------------------"); + Bukkit.broadcastMessage(ChatColor.GOLD + ChatColor.BOLD.toString() + sender.getName() + ChatColor.GRAY + " has broadcasted their Location �f(" + x + ", " + y + ", " + z + ")"); + Bukkit.broadcastMessage(ChatColor.DARK_GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------------------"); + } + player.sendMessage(ChatColor.GRAY + "You have announced that you are looking for a fight, you must wait 30 minutes before doing this again."); + FightCommand.FIGHT_COOLDOWN.put((UUID)player.getUniqueId(), System.currentTimeMillis() + FightCommand.FIGHT_COOLDOWN_DELAY); + } + return true; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/essentials/GoppleCommand.java b/src/club/curahq/core/commands/essentials/GoppleCommand.java new file mode 100644 index 0000000..fd6f4f1 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/GoppleCommand.java @@ -0,0 +1,43 @@ +package club.curahq.core.commands.essentials; + +import java.util.Collections; +import java.util.List; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.timer.PlayerTimer; + +public class GoppleCommand implements CommandExecutor, TabCompleter { + private final Core plugin; + + public GoppleCommand(Core plugin) { + this.plugin = plugin; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + Player player = (Player) sender; + PlayerTimer timer = this.plugin.getTimerManager().gappleTimer; + long remaining = timer.getRemaining(player); + if (remaining <= 0L) { + sender.sendMessage(ChatColor.RED + "No active Gopple timer."); + return true; + } + sender.sendMessage( + ChatColor.GRAY + "Your " + ChatColor.GOLD + timer.getDisplayName() + ChatColor.GRAY + " timer is active for another " + + ChatColor.GOLD + Core.getRemaining(remaining, true, false) + ChatColor.GRAY + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/essentials/HelpCommand.java b/src/club/curahq/core/commands/essentials/HelpCommand.java new file mode 100644 index 0000000..33b548d --- /dev/null +++ b/src/club/curahq/core/commands/essentials/HelpCommand.java @@ -0,0 +1,20 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +import club.curahq.core.Core; + +public class HelpCommand implements CommandExecutor { + public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + if (command.getName().equalsIgnoreCase("help")) { + for (String msg : Core.config.getStringList("Help")) { + commandSender.sendMessage(ChatColor.translateAlternateColorCodes('&', msg)); + } + return true; + } + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/LFFCommand.java b/src/club/curahq/core/commands/essentials/LFFCommand.java new file mode 100644 index 0000000..698849d --- /dev/null +++ b/src/club/curahq/core/commands/essentials/LFFCommand.java @@ -0,0 +1,30 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.core.Cooldowns; + +public class LFFCommand implements CommandExecutor +{ + public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This is a player only command"); + return true; + } + if (Cooldowns.isOnCooldown("lff_cooldown", (Player)sender)) { + sender.sendMessage(ChatColor.RED + "You are still on cooldown for " + ChatColor.RED + ChatColor.BOLD.toString() + Core.getRemaining(Cooldowns.getCooldownForPlayerLong("lff_cooldown", (Player)sender), true)); + return true; + } + Bukkit.broadcastMessage(ChatColor.DARK_GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------------------"); + Bukkit.broadcastMessage(ChatColor.GOLD + ChatColor.BOLD.toString() + sender.getName() + ChatColor.GRAY + " is looking for a faction!"); + Bukkit.broadcastMessage(ChatColor.DARK_GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------------------"); + Cooldowns.addCooldown("lff_cooldown", (Player)sender, 900); + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/ListCommand.java b/src/club/curahq/core/commands/essentials/ListCommand.java new file mode 100644 index 0000000..3dd55d9 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/ListCommand.java @@ -0,0 +1,38 @@ +package club.curahq.core.commands.essentials; + +import java.util.ArrayList; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.listener.staff.VanishListener; +import club.curahq.core.util.BukkitUtils; + + +public class ListCommand implements CommandExecutor{ + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ + if(cmd.getName().equalsIgnoreCase("list")){ + if (!(sender instanceof Player)) { + return true; + } + ArrayList playernames = new ArrayList(); + for(Player p : Bukkit.getOnlinePlayers()){ + if (p.hasPermission("command.mod") && (!VanishListener.isVanished(p))) { + playernames.add(p.getName() + ChatColor.GOLD); + } + } + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + sender.sendMessage(ChatColor.GRAY + "There are currently " + ChatColor.GOLD + Bukkit.getOnlinePlayers().length + ChatColor.GRAY + " players online out of a maximum of " + ChatColor.GOLD + Bukkit.getMaxPlayers()); + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + } + return true; + } + + +} diff --git a/src/club/curahq/core/commands/essentials/LogoutCommand.java b/src/club/curahq/core/commands/essentials/LogoutCommand.java new file mode 100644 index 0000000..afbd31e --- /dev/null +++ b/src/club/curahq/core/commands/essentials/LogoutCommand.java @@ -0,0 +1,43 @@ +package club.curahq.core.commands.essentials; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.timer.type.LogoutTimer; + +public class LogoutCommand implements CommandExecutor, TabCompleter { + private final Core plugin; + + public LogoutCommand(Core plugin) { + this.plugin = plugin; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + Player player = (Player) sender; + LogoutTimer logoutTimer = this.plugin.getTimerManager().logoutTimer; + if (!logoutTimer.setCooldown(player, player.getUniqueId())) { + sender.sendMessage(ChatColor.RED + "Your " + logoutTimer.getDisplayName() + ChatColor.RED + + " timer is already active."); + return true; + } + sender.sendMessage( + ChatColor.RED + "Your " + logoutTimer.getDisplayName() + ChatColor.RED + " timer has started."); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/essentials/OreStatsCommand.java b/src/club/curahq/core/commands/essentials/OreStatsCommand.java new file mode 100644 index 0000000..d5ce75e --- /dev/null +++ b/src/club/curahq/core/commands/essentials/OreStatsCommand.java @@ -0,0 +1,112 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Statistic; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +public class OreStatsCommand implements CommandExecutor, Listener { + + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + Player player = (Player) sender; + if ((cmd.getName().equalsIgnoreCase("ores")) && ((sender instanceof Player)) && (args.length > 1)) { + sender.sendMessage("§cUsage: /ores "); + return true; + } + if (args.length == 0) { + sender.sendMessage("§cUsage: /ores "); + return true; + } + Player target = Bukkit.getServer().getPlayer(args[0]); + if ((args.length == 1) && (target == null)) { + player.sendMessage("§cPlayer not found"); + return true; + } + this.onStatsGUI(player, target); + /* + * /sender.sendMessage("§7§m--------------------------------------------------") + * ; sender.sendMessage(" §eOres mined by: §6" + + * target.getDisplayName()); sender.sendMessage("§bDiamond(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.DIAMOND_ORE)); + * sender.sendMessage("§aEmerald(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.EMERALD_ORE)); + * sender.sendMessage("§7Iron(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.IRON_ORE)); + * sender.sendMessage("§6Gold(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.GOLD_ORE)); + * sender.sendMessage("§cRedstone(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.REDSTONE_ORE)); + * sender.sendMessage("§8Coal(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.COAL_ORE)); + * sender.sendMessage("§9Lapis(s): §7" + + * target.getStatistic(Statistic.MINE_BLOCK, Material.LAPIS_ORE)); + * sender.sendMessage("§7§m--------------------------------------------------"); + * / + */ + return false; + } + + public void onStatsGUI(Player player, Player target) { + Inventory inv = Bukkit.createInventory(null, 9, ChatColor.DARK_AQUA + ChatColor.BOLD.toString() + "Ores §8- §7" + target.getName()); + + ItemStack Diamond_ore = new ItemStack(Material.DIAMOND_ORE); + ItemStack Emerald_ore = new ItemStack(Material.EMERALD_ORE); + ItemStack Gold_ore = new ItemStack(Material.GOLD_ORE); + ItemStack Iron_ore = new ItemStack(Material.IRON_ORE); + ItemStack Coal_ore = new ItemStack(Material.COAL_ORE); + ItemStack Lapis_ore = new ItemStack(Material.LAPIS_ORE); + ItemStack RedStone_ore = new ItemStack(Material.REDSTONE_ORE); + + ItemMeta DiamondMeta = Diamond_ore.getItemMeta(); + ItemMeta EmeraldMeta = Emerald_ore.getItemMeta(); + ItemMeta GoldMeta = Gold_ore.getItemMeta(); + ItemMeta IronMeta = Iron_ore.getItemMeta(); + ItemMeta CoalMeta = Coal_ore.getItemMeta(); + ItemMeta LapisMeta = Lapis_ore.getItemMeta(); + ItemMeta RedStoneMeta = RedStone_ore.getItemMeta(); + + DiamondMeta.setDisplayName("§bDiamond(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.DIAMOND_ORE)); + EmeraldMeta.setDisplayName("§aEmerald(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.EMERALD_ORE)); + IronMeta.setDisplayName("§7Iron(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.IRON_ORE)); + GoldMeta.setDisplayName("§6Gold(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.GOLD_ORE)); + RedStoneMeta.setDisplayName("§cRedstone(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.REDSTONE_ORE)); + CoalMeta.setDisplayName("§8Coal(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.COAL_ORE)); + LapisMeta.setDisplayName("§9Lapis(s): §7" + target.getStatistic(Statistic.MINE_BLOCK, Material.LAPIS_ORE)); + + Diamond_ore.setItemMeta(DiamondMeta); + Emerald_ore.setItemMeta(EmeraldMeta); + Iron_ore.setItemMeta(IronMeta); + Gold_ore.setItemMeta(GoldMeta); + RedStone_ore.setItemMeta(RedStoneMeta); + Coal_ore.setItemMeta(CoalMeta); + Lapis_ore.setItemMeta(LapisMeta); + + inv.setItem(0, Diamond_ore); + inv.setItem(1, Emerald_ore); + inv.setItem(2, Iron_ore); + inv.setItem(3, Gold_ore); + inv.setItem(4, RedStone_ore); + inv.setItem(5, Coal_ore); + inv.setItem(6, Lapis_ore); + + player.openInventory(inv); + + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent event) { + if (event.getInventory().getTitle().startsWith(ChatColor.DARK_AQUA + ChatColor.BOLD.toString() + "Ores §8- §7")) { + event.setCancelled(true); + } + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/essentials/PanicCommand.java b/src/club/curahq/core/commands/essentials/PanicCommand.java new file mode 100644 index 0000000..3623bcb --- /dev/null +++ b/src/club/curahq/core/commands/essentials/PanicCommand.java @@ -0,0 +1,34 @@ +package club.curahq.core.commands.essentials; + + +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 net.md_5.bungee.api.ChatColor; + +public class PanicCommand + implements CommandExecutor +{ + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) + { + if (commandLabel.equalsIgnoreCase("panic") && (sender.hasPermission("command.panic"))) + { + sender.sendMessage(ChatColor.RED.toString() + ChatColor.BOLD + "You have entered panic mode. Please join Teamspeak for further assistance."); + Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ss " + sender.getName()); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) + { + Player players = arrayOfPlayer[i]; + if (players.hasPermission("command.mod")) { + players.sendMessage(ChatColor.translateAlternateColorCodes('&', "&8(&3&lPANIC&8) &b" + sender.getName() + " &7has just entered &6&lPanic Mode")); + } + } + } + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/PingCommand.java b/src/club/curahq/core/commands/essentials/PingCommand.java new file mode 100644 index 0000000..f5311a1 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/PingCommand.java @@ -0,0 +1,43 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Player; + +public class PingCommand implements CommandExecutor { + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + if ((cmd.getName().equalsIgnoreCase("ping"))) { + if (args.length < 1) { + if ((sender instanceof Player)) { + CraftPlayer handler = (CraftPlayer) sender; + sender.sendMessage(ChatColor.GRAY + "You have a ping of " + ChatColor.GOLD + + handler.getHandle().playerConnection.player.ping + ChatColor.GRAY + " ms."); + } else { + sender.sendMessage(ChatColor.RED + "Correct usage: /ping "); + } + } else { + boolean found = false; + for (Player p : Bukkit.getOnlinePlayers()) { + String name = p.getName(); + CraftPlayer handler = (CraftPlayer) p; + if (name.equalsIgnoreCase(args[0])) { + sender.sendMessage(ChatColor.GOLD + name + ChatColor.GRAY + " has a ping of " + ChatColor.GOLD + + handler.getHandle().playerConnection.player.ping + ChatColor.GRAY + " ms."); + found = true; + break; + } + } + if (!found) { + sender.sendMessage(ChatColor.RED + "Player not found."); + } + } + } + return true; + } +} diff --git a/src/club/curahq/core/commands/essentials/PlayTimeCommand.java b/src/club/curahq/core/commands/essentials/PlayTimeCommand.java new file mode 100644 index 0000000..ed5c3c7 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/PlayTimeCommand.java @@ -0,0 +1,63 @@ +package club.curahq.core.commands.essentials; + +import java.util.Collections; +import java.util.List; + +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; +import club.curahq.core.util.core.BaseConstants; + +public class PlayTimeCommand + extends BaseCommand +{ + private final Core plugin; + + public PlayTimeCommand(Core plugin) + { + super("playtime", "Check the playtime of another player."); + setAliases(new String[] { "pt" }); + setUsage("/(command) [playerName]"); + this.plugin = plugin; + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + OfflinePlayer target; + if (args.length >= 1) + { + target = BukkitUtils.offlinePlayerWithNameOrUUID(args[0]); + } + else + { + if (!(sender instanceof Player)) + { + sender.sendMessage(getUsage(label)); + return true; + } + target = (OfflinePlayer)sender; + } + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + sender.sendMessage(ChatColor.DARK_GRAY.toString() + ChatColor.STRIKETHROUGH + "-------------------------------------------------"); + sender.sendMessage(ChatColor.GOLD + target.getName() + " §7has a playtime of " + ChatColor.GREEN + DurationFormatUtils.formatDurationWords(this.plugin.getPlayTimeManager().getTotalPlayTime(target.getUniqueId()), true, true) + ChatColor.GRAY + " this map."); + sender.sendMessage(ChatColor.DARK_GRAY.toString() + ChatColor.STRIKETHROUGH + "-------------------------------------------------"); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 1 ? null : Collections.emptyList(); + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/essentials/PvpTimerCommand.java b/src/club/curahq/core/commands/essentials/PvpTimerCommand.java new file mode 100644 index 0000000..c2e27a0 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/PvpTimerCommand.java @@ -0,0 +1,82 @@ +package club.curahq.core.commands.essentials; + +import com.google.common.collect.ImmutableList; + +import club.curahq.core.Core; +import club.curahq.core.timer.type.PvPTimerProtection; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.DurationFormatter; +import club.curahq.core.util.config.PlayerData; + +import java.util.Collections; +import java.util.List; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; + +public class PvpTimerCommand implements CommandExecutor, TabCompleter { + private final Core plugin; + + public PvpTimerCommand(Core plugin) { + this.plugin = plugin; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + Player player = (Player) sender; + PvPTimerProtection pvpTimer = this.plugin.getTimerManager().invincibilityTimer; + if (args.length < 1) { + printUsage(sender, label, pvpTimer); + return true; + } + if ((args[0].equalsIgnoreCase("enable")) || (args[0].equalsIgnoreCase("remove")) + || (args[0].equalsIgnoreCase("off"))) { + if (pvpTimer.getRemaining(player) <= 0L) { + sender.sendMessage(ChatColor.RED + "Your " + pvpTimer.getDisplayName() + ChatColor.RED + + " is currently not active."); + return true; + } + sender.sendMessage( + ChatColor.RED + "Your " + pvpTimer.getDisplayName() + ChatColor.RED + " timer is now off."); + pvpTimer.clearCooldown(player); + PlayerData.getInstance().getConfig().set("UUID." + player.getUniqueId() + ".Pvp-Timer", Integer.valueOf(0)); + PlayerData.getInstance().saveConfig(); + return true; + } + if ((args[0].equalsIgnoreCase("remaining")) || (args[0].equalsIgnoreCase("time")) + || (args[0].equalsIgnoreCase("left")) || (args[0].equalsIgnoreCase("check"))) { + long remaining = pvpTimer.getRemaining(player); + if (remaining <= 0L) { + sender.sendMessage(ChatColor.RED + "Your " + pvpTimer.getDisplayName() + ChatColor.RED + + " timer is currently not active."); + return true; + } + sender.sendMessage(ChatColor.GRAY + "Your " + ChatColor.GOLD + pvpTimer.getDisplayName() + "Timer" + ChatColor.GRAY + " is active for another " + ChatColor.GOLD + DurationFormatter.getRemaining(remaining, true, false) + ChatColor.GRAY + (pvpTimer.isPaused(player) ? " and is currently paused" : "") + '.'); + + return true; + } + printUsage(sender, label, pvpTimer); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? BukkitUtils.getCompletions(args, COMPLETIONS) : Collections.emptyList(); + } + + private static final ImmutableList COMPLETIONS = ImmutableList.of("enable", "time"); + + private void printUsage(CommandSender sender, String label, PvPTimerProtection pvpTimer) { + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + sender.sendMessage("§6PvP Help"); + sender.sendMessage(ChatColor.YELLOW + " /pvp enable" + ChatColor.DARK_GRAY + " - " + ChatColor.GRAY + "Remove your PvP Protection."); + sender.sendMessage(ChatColor.YELLOW + " /pvp time" + ChatColor.DARK_GRAY + " - " + ChatColor.GRAY + "Check the remaining for your PvP Protection."); + sender.sendMessage(ChatColor.YELLOW + " /lives" + ChatColor.DARK_GRAY + " - " + ChatColor.GRAY + "Info about lives and deathbans."); + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + } +} diff --git a/src/club/curahq/core/commands/essentials/RandomCommand.java b/src/club/curahq/core/commands/essentials/RandomCommand.java new file mode 100644 index 0000000..53c8e21 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/RandomCommand.java @@ -0,0 +1,48 @@ +package club.curahq.core.commands.essentials; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Random; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; + +public class RandomCommand implements CommandExecutor { + public RandomCommand(Core plugin) { + } + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + Player player = (Player) sender; + List players = new ArrayList(); + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) { + Player players2 = arrayOfPlayer[i]; + players.add(players2); + } + Collections.shuffle(players); + Random random = new Random(); + Integer randoms = Integer.valueOf(random.nextInt(Bukkit.getOnlinePlayers().length)); + Player p = (Player) players.get(randoms.intValue()); + if ((player.canSee(p)) && (player.hasPermission(command.getPermission() + ".teleport"))) { + player.teleport(p); + player.sendMessage(ChatColor.GRAY + "You have teleported to " + ChatColor.GOLD + p.getName()); + } else if (player.canSee(p)) { + player.sendMessage(ChatColor.GRAY + "You have found " + ChatColor.GOLD + p.getName()); + } else { + player.sendMessage(ChatColor.RED + "Player not found"); + } + return true; + } +} diff --git a/src/club/curahq/core/commands/essentials/ResetCommand.java b/src/club/curahq/core/commands/essentials/ResetCommand.java new file mode 100644 index 0000000..b7709a3 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/ResetCommand.java @@ -0,0 +1,48 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Statistic; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +public class ResetCommand implements CommandExecutor{ + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + Player player = (Player)sender; + if ((command.getName().equalsIgnoreCase("reset")) && ((sender instanceof Player)) && + (args.length > 1)) + { + sender.sendMessage("�cUsage: /Reset "); + return true; + } + if (args.length == 0) + { + sender.sendMessage("�cUsage: /Reset "); + return true; + } + Player target = Bukkit.getServer().getPlayer(args[0]); + if ((args.length == 1) && + (target == null)) + { + player.sendMessage("�cPlayer not found"); + return true; + } + target.setStatistic(Statistic.DEATHS, 0); + target.setStatistic(Statistic.PLAYER_KILLS, 0); + + sender.sendMessage(ChatColor.RED + "You have reset " + target.getPlayer().getName() + " 's stats!"); + for (Player s : Bukkit.getOnlinePlayers()) { + if (s.hasPermission("command.reset")) { + s.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e" + sender.getName() + " &fhas reset the &eStatistics &fof &e" + target.getName())); + return false; + } + + } + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/SkullCommand.java b/src/club/curahq/core/commands/essentials/SkullCommand.java new file mode 100644 index 0000000..9a00e11 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/SkullCommand.java @@ -0,0 +1,39 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.SkullMeta; + +import net.md_5.bungee.api.ChatColor; + +public class SkullCommand implements Listener, CommandExecutor +{ + private ItemStack playerSkullForName(final String name) { + final ItemStack is = new ItemStack(Material.SKULL_ITEM, 1); + is.setDurability((short)3); + final ItemMeta meta = is.getItemMeta(); + ((SkullMeta) meta).setOwner(name); + is.setItemMeta(meta); + return is; + } + + public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) { + if (command.getName().equalsIgnoreCase("skull") && args.length == 1) { + if (sender instanceof Player) { + final Player p = (Player)sender; + p.getInventory().addItem(new ItemStack[] { this.playerSkullForName(args[0]) }); + sender.sendMessage(ChatColor.GRAY + "Added " + ChatColor.GOLD + args[0] + ChatColor.GRAY + "'s skull to your inventory"); + return true; + } + sender.sendMessage(ChatColor.RED + "You must run this command as a player."); + } + return false; + } +} + diff --git a/src/club/curahq/core/commands/essentials/StatsCommand.java b/src/club/curahq/core/commands/essentials/StatsCommand.java new file mode 100644 index 0000000..e4342c1 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/StatsCommand.java @@ -0,0 +1,49 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Statistic; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; + +public class StatsCommand implements CommandExecutor{ + + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) + { + Player player = (Player)sender; + if ((cmd.getName().equalsIgnoreCase("Stats")) && ((sender instanceof Player)) && + (args.length > 1)) + { + sender.sendMessage("§cUsage: /Stats "); + return true; + } + if (args.length == 0) + { + sender.sendMessage("§cUsage: /Stats "); + return true; + } + Player target = Bukkit.getServer().getPlayer(args[0]); + if ((args.length == 1) && + (target == null)) + { + player.sendMessage("§cPlayer not found"); + return true; + } + int kills = target.getStatistic(Statistic.PLAYER_KILLS); + int deaths = target.getStatistic(Statistic.DEATHS); + double kdr = Math.abs(kills / deaths); + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + sender.sendMessage(" " + ChatColor.GOLD + target.getName() + "'s Stats "); + sender.sendMessage(" " + ChatColor.YELLOW + "Kills" + ChatColor.GOLD + " § " + ChatColor.GRAY + kills); + sender.sendMessage(" " + ChatColor.YELLOW + "Deaths" + ChatColor.GOLD + " § " + ChatColor.GRAY + deaths); + sender.sendMessage(" " + ChatColor.YELLOW + "KD" + ChatColor.GOLD + " § " + ChatColor.GRAY + kdr); + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + return false; + } + +} diff --git a/src/club/curahq/core/commands/essentials/SudoCommand.java b/src/club/curahq/core/commands/essentials/SudoCommand.java new file mode 100644 index 0000000..abe3337 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/SudoCommand.java @@ -0,0 +1,104 @@ +package club.curahq.core.commands.essentials; + + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; +import me.apache.commons.lang3.StringUtils; + +public class SudoCommand extends BaseCommand { + public SudoCommand() { + super("sudo", "Forces a player to run command."); + } + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + boolean force; + if (args.length < 3) { + sender.sendMessage((Object)ChatColor.RED + "Usage: " + "/(command) \n[Warning!] Forcing will give player temporary OP until executed."); + return true; + } + try { + force = Boolean.parseBoolean(args[0]); + } + catch (IllegalArgumentException ex) { + sender.sendMessage((Object)ChatColor.RED + "Usage: " + "/(command) \n[Warning!] Forcing will give player temporary OP until executed."); + return true; + } + String executingCommand = StringUtils.join((Object[])args, (char)' ', (int)2, (int)args.length); + if (args[1].equalsIgnoreCase("all")) { + for (Player target : Bukkit.getOnlinePlayers()) { + this.executeCommand(target, executingCommand, force); + } + sender.sendMessage((Object)ChatColor.RED + "Forcing all players to run " + executingCommand + (force ? " with permission bypasses" : "") + '.'); + return true; + } + Player target2 = Bukkit.getPlayer((String)args[1]); + if (target2 == null || !BaseCommand.canSee(sender, target2)) { + sender.sendMessage((Object)ChatColor.RED + "Player not found."); + return true; + } + this.executeCommand(target2, executingCommand, force); + Command.broadcastCommandMessage((CommandSender)sender, (String)((Object)ChatColor.RED + sender.getName() + (Object)ChatColor.RED + " made " + target2.getName() + " run " + executingCommand + (force ? " with permission bypasses" : "") + '.')); + sender.sendMessage((Object)ChatColor.RED + "Making " + target2.getName() + " to run " + executingCommand + (force ? " with permission bypasses" : "") + '.'); + return true; + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + ArrayList results; + if (args.length == 1) { + results = new ArrayList(2); + results.add("true"); + results.add("false"); + } else { + if (args.length != 2) { + return Collections.emptyList(); + } + results = new ArrayList(); + results.add("ALL"); + Player senderPlayer = sender instanceof Player ? (Player)sender : null; + for (Player target : Bukkit.getOnlinePlayers()) { + if (senderPlayer != null && !senderPlayer.canSee(target)) continue; + results.add(target.getName()); + } + } + return BukkitUtils.getCompletions(args, results); + } + + /* + * WARNING - Removed try catching itself - possible behaviour change. + */ + private boolean executeCommand(Player target, String executingCommand, boolean force) { + if (target.isOp()) { + force = false; + } + try { + if (force) { + target.setOp(true); + } + target.performCommand(executingCommand); + boolean bl = true; + return bl; + } + catch (Exception ex) { + boolean bl = false; + return bl; + } + finally { + if (force) { + target.setOp(false); + } + } + } +} + diff --git a/src/club/curahq/core/commands/essentials/TLCommand.java b/src/club/curahq/core/commands/essentials/TLCommand.java new file mode 100644 index 0000000..7b5f3b1 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/TLCommand.java @@ -0,0 +1,27 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +public class TLCommand implements CommandExecutor { + + public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage("No Console"); + return true; + } + final Player player = (Player)sender; + final int x = player.getLocation().getBlockX(); + final int y = player.getLocation().getBlockY(); + final int z = player.getLocation().getBlockZ(); + + if (command.getName().equalsIgnoreCase("tl")) { + player.chat("/f message " + x + ", " + y + ", " + z); + return true; + } + return true; + } + +} diff --git a/src/club/curahq/core/commands/essentials/TeamspeakCommand.java b/src/club/curahq/core/commands/essentials/TeamspeakCommand.java new file mode 100644 index 0000000..21471d8 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/TeamspeakCommand.java @@ -0,0 +1,20 @@ +package club.curahq.core.commands.essentials; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +import club.curahq.core.Core; + +public class TeamspeakCommand implements CommandExecutor { + public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + if (command.getName().equalsIgnoreCase("teamspeak")) { + for (String msg : Core.config.getStringList("Teamspeak")) { + commandSender.sendMessage(ChatColor.translateAlternateColorCodes('&', msg)); + } + return true; + } + return false; + } +} diff --git a/src/club/curahq/core/commands/essentials/ToggleSidebarCommand.java b/src/club/curahq/core/commands/essentials/ToggleSidebarCommand.java new file mode 100644 index 0000000..cb65ce5 --- /dev/null +++ b/src/club/curahq/core/commands/essentials/ToggleSidebarCommand.java @@ -0,0 +1,38 @@ +package club.curahq.core.commands.essentials; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabExecutor; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.scoreboard.PlayerBoard; + +public class ToggleSidebarCommand implements CommandExecutor, TabExecutor { + private final Core plugin; + + public ToggleSidebarCommand(Core plugin) { + this.plugin = plugin; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + PlayerBoard playerBoard = this.plugin.getScoreboardHandler().getPlayerBoard(((Player) sender).getUniqueId()); + boolean newVisibile = !playerBoard.isSidebarVisible(); + playerBoard.setSidebarVisible(newVisibile); + sender.sendMessage(ChatColor.GRAY + "You have " + (newVisibile ? ChatColor.GREEN + "enabled" : new StringBuilder().append(ChatColor.RED).append("disabled").toString()) + ChatColor.GRAY + " your §6§lScoreboard"); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/note/NoteCommand.java b/src/club/curahq/core/commands/note/NoteCommand.java new file mode 100644 index 0000000..f0d7507 --- /dev/null +++ b/src/club/curahq/core/commands/note/NoteCommand.java @@ -0,0 +1,72 @@ +package club.curahq.core.commands.note; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.time.DateFormatUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.util.config.PlayerData; +import club.curahq.core.util.core.BaseConstants; +import club.curahq.core.util.core.NoteApi; + +public class NoteCommand implements CommandExecutor { + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender cs, Command cmd, String s, String[] args) { + if (!(cs instanceof Player)) { + cs.sendMessage(ChatColor.RED + "Please use the server to execute this command."); + return true; + } + Player player = (Player) cs; + if (args.length < 2) { + player.sendMessage(ChatColor.RED + "/note "); + return true; + } + if ((Bukkit.getPlayer(args[1]) == null) && (Bukkit.getOfflinePlayer(args[1]) == null)) { + cs.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + OfflinePlayer starget = Bukkit.getOfflinePlayer(args[1]); + Player targetUser = (Player) starget; + if (targetUser == null) { + cs.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + String note = StringUtils.join(args, ' ', 2, args.length); + String time; + if (args[0].equalsIgnoreCase("add")) { + if (note == null) { + player.sendMessage(ChatColor.RED + "You need to add a note to this player."); + return true; + } + time = DateFormatUtils.format(System.currentTimeMillis(), "hh:mm"); + NoteApi.addNote(targetUser, player, note, time); + player.sendMessage(ChatColor.GRAY + "You added a note to " + targetUser.getName() + "."); + return true; + } + if (args[0].equalsIgnoreCase("remove")) { + if (!player.hasPermission("command.note.remove")) { + player.sendMessage(ChatColor.RED + "No permission to this argument."); + return true; + } + if (PlayerData.getInstance().getConfig().contains("UUID." + targetUser.getUniqueId() + ".Reason")) { + player.sendMessage( + ChatColor.GOLD + targetUser.getName() + ChatColor.GRAY + " notes has been removed."); + NoteApi.removeNote(targetUser); + + } else { + player.sendMessage(ChatColor.RED + "The player does not contain any notes."); + return true; + } + } + if (args[0].equalsIgnoreCase("check")) { + NoteApi.checkNote(targetUser, player); + } + return false; + } +} diff --git a/src/club/curahq/core/commands/staff/BroadCastCommand.java b/src/club/curahq/core/commands/staff/BroadCastCommand.java new file mode 100644 index 0000000..5823499 --- /dev/null +++ b/src/club/curahq/core/commands/staff/BroadCastCommand.java @@ -0,0 +1,33 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +import club.curahq.core.util.core.ConfigUtil; + +public class BroadCastCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + if (cmd.getName().equalsIgnoreCase("broadcast")) { + String r = ""; + if (sender.hasPermission("command.broadcast")) { + if (args.length > 0) { + for (int i = 0; i < args.length; i++) { + r = r + args[i] + " "; + } + r = r.replace("&", "§"); + Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', ConfigUtil.PREFIX + "&7 " + r)); + } else { + sender.sendMessage(ChatColor.RED + "Usage: /broadcast "); + } + } else { + sender.sendMessage("§§cYou lack the sufficient permissions to execute this command."); + } + } + return true; + } + +} diff --git a/src/club/curahq/core/commands/staff/ClearCommand.java b/src/club/curahq/core/commands/staff/ClearCommand.java new file mode 100644 index 0000000..0ab79b5 --- /dev/null +++ b/src/club/curahq/core/commands/staff/ClearCommand.java @@ -0,0 +1,63 @@ +package club.curahq.core.commands.staff; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +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.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffectType; + +import com.google.common.collect.ImmutableSet; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; +import net.md_5.bungee.api.ChatColor; + +public class ClearCommand implements CommandExecutor { + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + Player onlyTarget = null; + Collection targets; + + if ((args.length > 0) && (sender.hasPermission("command.clearinventory"))) { + if ((args[0].equalsIgnoreCase("all")) && (sender.hasPermission(command.getPermission() + ".all"))) { + targets = ImmutableSet.copyOf(Bukkit.getOnlinePlayers()); + } else { + if (((onlyTarget = BukkitUtils.playerWithNameOrUUID(args[0])) == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + targets = ImmutableSet.of(onlyTarget); + } + } else { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Useage: /ci "); + return true; + } + targets = ImmutableSet.of(onlyTarget = (Player) sender); + } + for (Player target : targets) { + target.removePotionEffect(PotionEffectType.HUNGER); + target.setFoodLevel(20); + target.getInventory().clear(); + target.getInventory().setHelmet(new ItemStack(Material.AIR)); + target.getInventory().setChestplate(new ItemStack(Material.AIR)); + target.getInventory().setLeggings(new ItemStack(Material.AIR)); + target.getInventory().setBoots(new ItemStack(Material.AIR)); + } + sender.sendMessage(ChatColor.GRAY.toString() + "Your inventory has been cleared."); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/CrowbarCommand.java b/src/club/curahq/core/commands/staff/CrowbarCommand.java new file mode 100644 index 0000000..80a25d2 --- /dev/null +++ b/src/club/curahq/core/commands/staff/CrowbarCommand.java @@ -0,0 +1,105 @@ +package club.curahq.core.commands.staff; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import com.google.common.base.Optional; + +import club.curahq.core.crowbar.Crowbar; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.JavaUtils; + +public class CrowbarCommand implements CommandExecutor, TabCompleter { + private final List completions; + + public CrowbarCommand() { + this.completions = Arrays.asList(new String[] { "spawn", "setspawners", "setendframes" }); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + Player player = (Player) sender; + if (args[0].equalsIgnoreCase("spawn")) { + ItemStack stack = new Crowbar().getItemIfPresent(); + player.getInventory().addItem(new ItemStack[] { stack }); + sender.sendMessage(ChatColor.GRAY + "You have given yourself a " + ChatColor.AQUA + stack.getItemMeta().getDisplayName() + + ChatColor.GRAY + '.'); + return true; + } + Optional crowbarOptional = Crowbar.fromStack(player.getItemInHand()); + if (!crowbarOptional.isPresent()) { + sender.sendMessage(ChatColor.RED + "You are not holding a Crowbar."); + return true; + } + if (args[0].equalsIgnoreCase("setspawners")) { + if (args.length < 2) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + ' ' + args[0].toLowerCase() + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[1]); + if (amount == null) { + sender.sendMessage(ChatColor.RED + "'" + args[1] + "' is not a number."); + return true; + } + if (amount.intValue() < 0) { + sender.sendMessage(ChatColor.RED + "You cannot set Spawner uses to an amount less than " + 0 + '.'); + return true; + } + if (amount.intValue() > 1) { + sender.sendMessage(ChatColor.RED + "Crowbars have maximum Spawner uses of " + 1 + '.'); + return true; + } + Crowbar crowbar = (Crowbar) crowbarOptional.get(); + crowbar.setSpawnerUses(amount.intValue()); + player.setItemInHand(crowbar.getItemIfPresent()); + sender.sendMessage(ChatColor.GRAY + "Set Spawner uses of held Crowbar to " + ChatColor.AQUA + amount + ChatColor.GRAY + '.'); + return true; + } + if (!args[0].equalsIgnoreCase("setendframes")) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + if (args.length < 2) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + ' ' + args[0].toLowerCase() + " "); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[1]); + if (amount == null) { + sender.sendMessage(ChatColor.RED + "'" + args[1] + "' is not a number."); + return true; + } + if (amount.intValue() < 0) { + sender.sendMessage(ChatColor.RED + "You cannot set End Frame uses to an amount less than " + 0 + '.'); + return true; + } + if (amount.intValue() > 5) { + sender.sendMessage(ChatColor.RED + "Crowbars have maximum End Frame uses of " + 1 + '.'); + return true; + } + Crowbar crowbar = (Crowbar) crowbarOptional.get(); + crowbar.setEndFrameUses(amount.intValue()); + player.setItemInHand(crowbar.getItemIfPresent()); + sender.sendMessage(ChatColor.GRAY + "Set End Frame uses of held Crowbar to " + ChatColor.AQUA + amount + ChatColor.GRAY + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? BukkitUtils.getCompletions(args, this.completions) : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/FeedCommand.java b/src/club/curahq/core/commands/staff/FeedCommand.java new file mode 100644 index 0000000..181cda1 --- /dev/null +++ b/src/club/curahq/core/commands/staff/FeedCommand.java @@ -0,0 +1,60 @@ +package club.curahq.core.commands.staff; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffectType; + +import com.google.common.collect.ImmutableSet; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; + +public class FeedCommand implements CommandExecutor { + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + Player onlyTarget = null; + Collection targets; + + if ((args.length > 0) && (sender.hasPermission(command.getPermission() + ".others"))) { + if ((args[0].equalsIgnoreCase("all")) && (sender.hasPermission(command.getPermission() + ".all"))) { + targets = ImmutableSet.copyOf(Bukkit.getOnlinePlayers()); + } else { + if (((onlyTarget = BukkitUtils.playerWithNameOrUUID(args[0])) == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + targets = ImmutableSet.of(onlyTarget); + } + } else { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Useage: /Feed "); + return true; + } + targets = ImmutableSet.of(onlyTarget = (Player) sender); + } + if ((onlyTarget != null) && (onlyTarget.getFoodLevel() == 20)) { + sender.sendMessage(ChatColor.RED + onlyTarget.getName() + " already has full hunger."); + return true; + } + for (Player target : targets) { + target.removePotionEffect(PotionEffectType.HUNGER); + target.setFoodLevel(20); + } + sender.sendMessage(ChatColor.GRAY.toString() + "Your hunger has been replenished" + + (onlyTarget == null ? "all online players" : onlyTarget.getName()) + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/FixCommand.java b/src/club/curahq/core/commands/staff/FixCommand.java new file mode 100644 index 0000000..5503df5 --- /dev/null +++ b/src/club/curahq/core/commands/staff/FixCommand.java @@ -0,0 +1,74 @@ +package club.curahq.core.commands.staff; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; +import club.curahq.core.util.core.BaseConstants; + +public class FixCommand + extends BaseCommand +{ + public FixCommand() + { + super("fix", "Allows repairing of damaged tools for a player."); + setUsage("/(command) [all]"); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + Player target; + if (args.length > 0) + { + target = BukkitUtils.playerWithNameOrUUID(args[0]); + } + else + { + if (!(sender instanceof Player)) + { + sender.sendMessage(getUsage(label)); + return true; + } + target = (Player)sender; + } + if ((target == null) || (!BaseCommand.canSee(sender, target))) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + Set toRepair = new HashSet(); + if ((args.length >= 1) && (args[1].equalsIgnoreCase("all"))) + { + PlayerInventory targetInventory = target.getInventory(); + toRepair.addAll(Arrays.asList(targetInventory.getContents())); + toRepair.addAll(Arrays.asList(targetInventory.getArmorContents())); + } + else + { + toRepair.add(target.getItemInHand()); + } + for (ItemStack stack : toRepair) { + if ((stack != null) && (stack.getType() != Material.AIR)) { + stack.setDurability((short)0); + } + } + sender.sendMessage(ChatColor.GRAY + "Repaired " + (toRepair.size() > 1 ? "all" : "item in hand") + " of " + target.getName() + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/FlyCommand.java b/src/club/curahq/core/commands/staff/FlyCommand.java new file mode 100644 index 0000000..87bf953 --- /dev/null +++ b/src/club/curahq/core/commands/staff/FlyCommand.java @@ -0,0 +1,54 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +public class FlyCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + if (cmd.getName().equalsIgnoreCase("fly")) { + if (!sender.hasPermission("command.fly")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (args.length < 1) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "You must be a player to execute this command"); + return true; + } + Player p = (Player) sender; + if (p.getAllowFlight()) { + p.setAllowFlight(false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &fyour &eFlight Mode")); + return true; + } + p.setAllowFlight(true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &fyour &eFlight Mode")); + return true; + } + if (!sender.hasPermission("command.fly.others")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + Player t = Bukkit.getPlayer(args[0]); + if (t == null) { + sender.sendMessage("�cPlayer not found."); + return true; + } + if (t.getAllowFlight()) { + t.setAllowFlight(false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &f" + t.getName() + "'s &eFlight Mode")); + return true; + } + t.setAllowFlight(true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &f" + t.getName() + "'s &eFlight Mode")); + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/FreezeCommand.java b/src/club/curahq/core/commands/staff/FreezeCommand.java new file mode 100644 index 0000000..1b19988 --- /dev/null +++ b/src/club/curahq/core/commands/staff/FreezeCommand.java @@ -0,0 +1,294 @@ +package club.curahq.core.commands.staff; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerDropItemEvent; +import org.bukkit.event.player.PlayerMoveEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.Plugin; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import club.curahq.core.commands.PlayerFreezeEvent; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.chat.ClickAction; +import club.curahq.core.util.chat.Text; +import club.curahq.core.util.core.ConfigUtil; +import me.apache.commons.lang3.time.DurationFormatUtils; +import net.minecraft.util.gnu.trove.map.TObjectLongMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectLongHashMap; + +@SuppressWarnings("deprecation") +public class FreezeCommand implements Listener, CommandExecutor { + private final static TObjectLongMap frozenPlayers = new TObjectLongHashMap(); + public static long defaultFreezeDuration; + private long serverFrozenMillis; + public static HashSet frozen = new HashSet(); + + public FreezeCommand(Core plugin) { + FreezeCommand.defaultFreezeDuration = TimeUnit.MINUTES.toMillis(60); + Bukkit.getServer().getPluginManager().registerEvents((Listener) this, (Plugin) plugin); + } + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (args.length < 1) { + sender.sendMessage((Object) ChatColor.RED + "Usage: /Freeze "); + return true; + } + String reason = null; + Long freezeTicks = FreezeCommand.defaultFreezeDuration; + long millis = System.currentTimeMillis(); + if (args[0].equalsIgnoreCase("all") && sender.hasPermission(command.getPermission() + ".all")) { + long oldTicks = this.getRemainingServerFrozenMillis(); + if (oldTicks > 0) { + freezeTicks = (long) 0; + } + this.serverFrozenMillis = millis + FreezeCommand.defaultFreezeDuration; + Bukkit.getServer() + .broadcastMessage((Object) ChatColor.GRAY + "The server is " + (freezeTicks > 0 + ? new StringBuilder().append("now frozen for ") + .append(DurationFormatUtils.formatDurationWords((long) freezeTicks, (boolean) true, + (boolean) true)) + .toString() + : "no longer frozen") + + (reason == null ? "" + : new StringBuilder().append(" with reason ").append(reason).toString()) + + '.'); + return true; + } + Player target = Bukkit.getServer().getPlayer(args[0]); + if (target == null) { + sender.sendMessage((Object) ChatColor.GOLD + "Player '" + (Object) ChatColor.WHITE + args[0] + + (Object) ChatColor.GOLD + "' not found."); + return true; + } + if (target.equals((Object) sender)) { + sender.sendMessage((Object) ChatColor.RED + "You cannot freeze yourself."); + return true; + } + UUID targetUUID = target.getUniqueId(); + boolean shouldFreeze = FreezeCommand.getRemainingPlayerFrozenMillis(targetUUID) > 0; + PlayerFreezeEvent playerFreezeEvent = new PlayerFreezeEvent(target, shouldFreeze); + Bukkit.getServer().getPluginManager().callEvent((Event) playerFreezeEvent); + if (playerFreezeEvent.isCancelled()) { + sender.sendMessage((Object) ChatColor.RED + "Unable to freeze " + target.getName() + '.'); + return false; + } + if (shouldFreeze) { + FreezeCommand.frozen.remove(target.getName()); + FreezeCommand.frozenPlayers.remove((Object) targetUUID); + target.sendMessage((Object) ChatColor.GREEN + "You have been un-frozen."); + Command.broadcastCommandMessage((CommandSender) sender, + (String) ((Object) ChatColor.GRAY + target.getName() + " is no longer frozen.")); + } else { + FreezeCommand.frozen.add(target.getName()); + FreezeCommand.frozenPlayers.put(targetUUID, millis + freezeTicks); + String timeString = DurationFormatUtils.formatDurationWords((long) freezeTicks, (boolean) true, + (boolean) true); + this.Message(target.getName()); + Command.broadcastCommandMessage((CommandSender) sender, + (String) ((Object) ChatColor.GRAY + target.getName() + " is now frozen for " + timeString + '.')); + } + return true; + } + + private void Message(final String name) { + new HashMap(); + final Player p = Bukkit.getPlayer((String) name); + new BukkitRunnable() { + + public void run() { + if (FreezeCommand.frozen.contains(name)) { + p.sendMessage(""); + p.sendMessage(ChatColor.GRAY + "§8§m---------§8§m-----------§8§m------"); + p.sendMessage(ChatColor.GRAY + "You have been frozen by a staff member."); + p.sendMessage(ChatColor.GRAY + "If you disconnect you will be " + (Object) ChatColor.DARK_RED + + (Object) ChatColor.BOLD + "BANNED" + (Object) ChatColor.GRAY + '.'); + p.sendMessage( + ChatColor.GRAY + "Please connect to our Teamspeak" + (Object) ChatColor.GRAY + '.'); + new Text(ChatColor.GRAY + " (" + ConfigUtil.TEAMSPEAK_URL + ") " + + (Object) ChatColor.ITALIC + "Click me to download" + (Object) ChatColor.GRAY + '.') + .setClick(ClickAction.OPEN_URL, "http://www.teamspeak.com/downloads") + .send((CommandSender) p); + p.sendMessage(ChatColor.GRAY + "§8§m---------§8§m-----------§8§m------"); + p.sendMessage(""); + } else { + this.cancel(); + } + } + }.runTaskTimerAsynchronously((Plugin) Core.getPlugin(), 0, 30); + } + public void onFreezeGUI(Player p) { + + Inventory inv = Bukkit.getServer().createInventory(null, 9, ChatColor.RED + "You are frozen!"); + + ItemStack redglass = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14); + ItemStack freezepaper = new ItemStack(Material.PAPER); + + ItemMeta redglassmeta = redglass.getItemMeta(); + ItemMeta freezepapermeta = freezepaper.getItemMeta(); + + redglassmeta.setDisplayName(ChatColor.RED + "You are frozen!"); + freezepapermeta.setDisplayName(ChatColor.RED + "Teamspeak: (ts.kitmap.us)"); + + redglass.setItemMeta(redglassmeta); + freezepaper.setItemMeta(freezepapermeta); + + inv.setItem(0, redglass); + inv.setItem(1, redglass); + inv.setItem(2, redglass); + inv.setItem(3, redglass); + inv.setItem(4, freezepaper); + inv.setItem(5, redglass); + inv.setItem(6, redglass); + inv.setItem(7, redglass); + inv.setItem(8, redglass); + + p.openInventory(inv); + } + + @SuppressWarnings("unlikely-arg-type") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onClick(InventoryClickEvent e) { + Player player = (Player) e.getWhoClicked(); + if (FreezeCommand.frozen.contains(player)) { + e.setCancelled(true); + } + } + + @SuppressWarnings("unlikely-arg-type") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onDrop(PlayerDropItemEvent e) { + Player player = (Player) e.getPlayer(); + if (FreezeCommand.frozen.contains(player)) { + e.setCancelled(true); + } + } + + @SuppressWarnings("unlikely-arg-type") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onBreak(BlockBreakEvent e) { + Player player = (Player) e.getPlayer(); + if (FreezeCommand.frozen.contains(player)) { + e.setCancelled(true); + } + } + + @SuppressWarnings("unlikely-arg-type") + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onBreak(BlockPlaceEvent e) { + Player player = (Player) e.getPlayer(); + if (FreezeCommand.frozen.contains(player)) { + e.setCancelled(true); + } + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { + Entity entity = event.getEntity(); + if (entity instanceof Player) { + Player attacker = BukkitUtils.getFinalAttacker((EntityDamageEvent) event, false); + if (attacker == null) { + return; + } + Player player = (Player) entity; + if (!(this.getRemainingServerFrozenMillis() <= 0 + && FreezeCommand.getRemainingPlayerFrozenMillis(player.getUniqueId()) <= 0 + || player.hasPermission("command.freeze.bypass"))) { + attacker.sendMessage( + (Object) ChatColor.RED + player.getName() + " is currently frozen, you may not attack."); + event.setCancelled(true); + return; + } + if (!(this.getRemainingServerFrozenMillis() <= 0 + && FreezeCommand.getRemainingPlayerFrozenMillis(attacker.getUniqueId()) <= 0 + || attacker.hasPermission("command.freeze.bypass"))) { + event.setCancelled(true); + attacker.sendMessage((Object) ChatColor.RED + "You may not attack players whilst frozen."); + } + } + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onPreCommandProcess(PlayerCommandPreprocessEvent event) { + Player player = event.getPlayer(); + if (!(this.getRemainingServerFrozenMillis() <= 0 + && FreezeCommand.getRemainingPlayerFrozenMillis(player.getUniqueId()) <= 0 + || player.hasPermission("command.freeze.bypass"))) { + event.setCancelled(true); + player.sendMessage((Object) ChatColor.RED + "You may not use commands whilst frozen."); + } + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onPlayerMove(PlayerMoveEvent event) { + Location from = event.getFrom(); + Location to = event.getTo(); + if (from.getBlockX() == to.getBlockX() && from.getBlockZ() == to.getBlockZ()) { + return; + } + Player player = event.getPlayer(); + if (!(this.getRemainingServerFrozenMillis() <= 0 + && FreezeCommand.getRemainingPlayerFrozenMillis(player.getUniqueId()) <= 0 + || player.hasPermission("command.freeze.bypass"))) { + event.setTo(event.getFrom()); + } + } + + @EventHandler + public void onPlayerQuit(final PlayerQuitEvent e) { + if (FreezeCommand.frozen.contains(e.getPlayer().getName())) { + for (final Player online : Bukkit.getOnlinePlayers()) { + if (!online.hasPermission("command.command.freeze")) { + continue; + } + new Text(ChatColor.GRAY + e.getPlayer().getName() + " has " + ChatColor.DARK_RED + "QUIT" + ChatColor.GRAY + " while frozen. " + ChatColor.GRAY + ChatColor.ITALIC + "(Click here to ban)").setHoverText(ChatColor.GRAY + "Click here to permanently ban " + ChatColor.GRAY + e.getPlayer().getName()).setClick(ClickAction.RUN_COMMAND, "/ban " + e.getPlayer().getName() + " Disconnected whilst Frozen").send((CommandSender)online); + } + } + } + + public long getRemainingServerFrozenMillis() { + return this.serverFrozenMillis - System.currentTimeMillis(); + } + + public static long getRemainingPlayerFrozenMillis(UUID uuid) { + long remaining = frozenPlayers.get((Object) uuid); + if (remaining == frozenPlayers.getNoEntryValue()) { + return 0; + } + return remaining - System.currentTimeMillis(); + } + +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/GameModeCommand.java b/src/club/curahq/core/commands/staff/GameModeCommand.java new file mode 100644 index 0000000..cbec27e --- /dev/null +++ b/src/club/curahq/core/commands/staff/GameModeCommand.java @@ -0,0 +1,93 @@ +package club.curahq.core.commands.staff; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Locale; + +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; + +public class GameModeCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /gamemode "); + return true; + } + GameMode mode = getGameModeByName(args[0]); + if (mode == null) { + sender.sendMessage(ChatColor.RED + "Gamemode '" + args[0] + "' not found."); + return true; + } + Player target; + if (args.length > 1) { + if (sender.hasPermission(command.getPermission() + ".others")) { + target = BukkitUtils.playerWithNameOrUUID(args[1]); + } else { + target = null; + } + } else { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Usage: /gamemode "); + return true; + } + target = (Player) sender; + } + if ((target == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[1] })); + return true; + } + if (target.getGameMode() == mode) { + sender.sendMessage(ChatColor.RED + "Gamemode of " + target.getName() + " is already " + mode.name() + '.'); + return true; + } + target.setGameMode(mode); + Command.broadcastCommandMessage(sender, ChatColor.WHITE + "Set gamemode of " + ChatColor.GOLD + target.getName() + ChatColor.WHITE + " to " + ChatColor.GOLD + mode.name() + ChatColor.WHITE + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + if (args.length != 1) { + return Collections.emptyList(); + } + GameMode[] gameModes = GameMode.values(); + List results = new ArrayList(gameModes.length); + GameMode[] arrayOfGameMode1; + int j = (arrayOfGameMode1 = gameModes).length; + for (int i = 0; i < j; i++) { + GameMode mode = arrayOfGameMode1[i]; + results.add(mode.name()); + } + return BukkitUtils.getCompletions(args, results); + } + + private GameMode getGameModeByName(String id) { + id = id.toLowerCase(Locale.ENGLISH); + if ((id.equalsIgnoreCase("gmc")) || (id.contains("creat")) || (id.equalsIgnoreCase("1")) + || (id.equalsIgnoreCase("c"))) { + return GameMode.CREATIVE; + } + if ((id.equalsIgnoreCase("gms")) || (id.contains("survi")) || (id.equalsIgnoreCase("0")) + || (id.equalsIgnoreCase("s"))) { + return GameMode.SURVIVAL; + } + if ((id.equalsIgnoreCase("gma")) || (id.contains("advent")) || (id.equalsIgnoreCase("2")) + || (id.equalsIgnoreCase("a"))) { + return GameMode.ADVENTURE; + } + if ((id.equalsIgnoreCase("gmt")) || (id.contains("toggle")) || (id.contains("cycle")) + || (id.equalsIgnoreCase("t"))) { + return null; + } + return null; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/GiveCommand.java b/src/club/curahq/core/commands/staff/GiveCommand.java new file mode 100644 index 0000000..66429bb --- /dev/null +++ b/src/club/curahq/core/commands/staff/GiveCommand.java @@ -0,0 +1,75 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.Core; +import club.curahq.core.util.core.BaseCommand; + +public class GiveCommand extends BaseCommand +{ + public GiveCommand() + { + super("give", "Gives an item to a player."); + setUsage("/(command) [quantity]"); + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable for players."); + return true; + } + Player p = (Player)sender; + if (args.length < 2) { + p.sendMessage(ChatColor.RED + getUsage()); + return true; + } + if (Bukkit.getPlayer(args[0]) == null) { + sender.sendMessage(ChatColor.RED + "Player not found."); + return true; + } + Player t = Bukkit.getPlayer(args[0]); + if (Core.getPlugin().getItemDb().getItem(args[1]) == null) { + sender.sendMessage(ChatColor.RED + "Item named or with ID " + ChatColor.GOLD + args[1] + ChatColor.GRAY + " not found."); + return true; + } + if (args.length == 2) { + if (!t.getInventory().addItem(new ItemStack[] { Core.getPlugin().getItemDb().getItem(args[1], Core.getPlugin().getItemDb().getItem(args[1]).getMaxStackSize()) }).isEmpty()) { + p.sendMessage(ChatColor.RED + "The inventory of the player is full."); + return true; + } + for (Player on : Bukkit.getOnlinePlayers()) { + if (on.hasPermission("core.give")) { + if (on != p) { + on.sendMessage(ChatColor.GRAY + "[" + ChatColor.GOLD + p.getName() + ChatColor.GRAY + " has given " + t.getName() + ChatColor.GOLD + " 64 " + Core.getPlugin().getItemDb().getName(Core.getPlugin().getItemDb().getItem(args[1])) + "]"); + } else { + on.sendMessage(ChatColor.GRAY + "You gave " + ChatColor.GOLD + ChatColor.BOLD + t.getName() + ChatColor.GRAY + " " + " 64 " + Core.getPlugin().getItemDb().getName(Core.getPlugin().getItemDb().getItem(args[1]))); + } + } + } + } + if (args.length == 3) { + if (!t.getInventory().addItem(new ItemStack[] { Core.getPlugin().getItemDb().getItem(args[1], Integer.parseInt(args[2])) }).isEmpty()) { + p.sendMessage(ChatColor.RED + "The inventory of the player is full."); + return true; + } + for (Player on : Bukkit.getOnlinePlayers()) { + if (on.hasPermission("command.give")) { + if (on != p) { + on.sendMessage(ChatColor.GRAY + "[" + ChatColor.GOLD + p.getName() + ChatColor.GRAY + " has given " + ChatColor.GOLD + t.getName() + ChatColor.GRAY + " " + args[2] + " " + Core.getPlugin().getItemDb().getName(Core.getPlugin().getItemDb().getItem(args[1])) + "]"); + } else { + on.sendMessage(ChatColor.GRAY + "You gave " + ChatColor.GOLD + ChatColor.BOLD + t.getName() + ChatColor.GRAY + " " + args[2] + " " + Core.getPlugin().getItemDb().getName(Core.getPlugin().getItemDb().getItem(args[1]))); + } + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/GodCommand.java b/src/club/curahq/core/commands/staff/GodCommand.java new file mode 100644 index 0000000..fbf6a41 --- /dev/null +++ b/src/club/curahq/core/commands/staff/GodCommand.java @@ -0,0 +1,57 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.listener.GodListener; + +public class GodCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + if (cmd.getName().equalsIgnoreCase("god")) { + if (!sender.hasPermission("command.god")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (args.length < 1) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "You cannot execute this command from CONSOLE"); + return true; + } + Player p = (Player) sender; + if (GodListener.getInstance().isinGod(p)) { + GodListener.getInstance().setGod(p, false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &fyour &6GOD MODE")); + return true; + } + GodListener.getInstance().setGod(p, true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &fyour &6GOD MODE")); + return true; + } + if (!sender.hasPermission("command.god.others")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + Player t = Bukkit.getPlayer(args[0]); + if (t == null) { + sender.sendMessage("�cPlayer not found."); + return true; + } + if (GodListener.getInstance().isinGod(t)) { + GodListener.getInstance().setGod(t, false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &f" + t.getName() + "'s &6GOD MODE")); + return true; + } + GodListener.getInstance().setGod(t, true); + t.setAllowFlight(true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &f" + t.getName() + "'s &6GOD MODE")); + return true; + } + return false; + } + +} diff --git a/src/club/curahq/core/commands/staff/HealCommand.java b/src/club/curahq/core/commands/staff/HealCommand.java new file mode 100644 index 0000000..3cde7ca --- /dev/null +++ b/src/club/curahq/core/commands/staff/HealCommand.java @@ -0,0 +1,60 @@ +package club.curahq.core.commands.staff; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +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.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import com.google.common.collect.ImmutableSet; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; +import net.md_5.bungee.api.ChatColor; + +public class HealCommand implements CommandExecutor { + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + Player onlyTarget = null; + Collection targets; + + if ((args.length > 0) && (sender.hasPermission("command.heal"))) { + if ((args[0].equalsIgnoreCase("all")) && (sender.hasPermission(command.getPermission() + ".all"))) { + targets = ImmutableSet.copyOf(Bukkit.getOnlinePlayers()); + } else { + if (((onlyTarget = BukkitUtils.playerWithNameOrUUID(args[0])) == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + targets = ImmutableSet.of(onlyTarget); + } + } else { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Useage: /heal "); + return true; + } + targets = ImmutableSet.of(onlyTarget = (Player) sender); + } + for (Player target : targets) { + target.removePotionEffect(PotionEffectType.HUNGER); + target.setHealth(20); + target.setFoodLevel(20); + for (PotionEffect effect : target.getActivePotionEffects()) + target.removePotionEffect(effect.getType()); + }for (Player target : targets) { + sender.sendMessage(ChatColor.GRAY.toString() + "You have healed " + target.getDisplayName() + "." ); } + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/InvSeeCommand.java b/src/club/curahq/core/commands/staff/InvSeeCommand.java new file mode 100644 index 0000000..339368b --- /dev/null +++ b/src/club/curahq/core/commands/staff/InvSeeCommand.java @@ -0,0 +1,122 @@ +package club.curahq.core.commands.staff; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; + +public class InvSeeCommand implements Listener, CommandExecutor { + private final InventoryType[] types; + private final Map inventories; + + public InvSeeCommand(Core plugin) { + this.types = new InventoryType[] { InventoryType.BREWING, InventoryType.CHEST, InventoryType.DISPENSER, + InventoryType.ENCHANTING, InventoryType.FURNACE, InventoryType.HOPPER, InventoryType.PLAYER, + InventoryType.WORKBENCH }; + this.inventories = new EnumMap(InventoryType.class); + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + public boolean isPlayerOnlyCommand() { + return true; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /invsee "); + return true; + } + Player target = BukkitUtils.playerWithNameOrUUID(args[0]); + if (target == null) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + sender.sendMessage(ChatColor.GRAY + "This players inventory contains: "); + ItemStack[] arrayOfItemStack; + int j = (arrayOfItemStack = target.getInventory().getContents()).length; + for (int i = 0; i < j; i++) { + ItemStack items = arrayOfItemStack[i]; + if (items != null) { + sender.sendMessage(ChatColor.GOLD + items.getType().toString().replace("_", "").toLowerCase() + ": " + + items.getAmount()); + } + } + return true; + } + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /Invsee "); + return true; + } + Player player = (Player) sender; + Inventory inventory = null; + InventoryType[] types = this.types; + int length = types.length; + int i = 0; + while (i < length) { + InventoryType type = types[i]; + if (type.name().equalsIgnoreCase(args[0])) { + Inventory inventoryRevert; + inventory = (Inventory) this.inventories.putIfAbsent(type, + inventoryRevert = Bukkit.createInventory(player, type)); + if (inventory != null) { + break; + } + inventory = inventoryRevert; + break; + } + i++; + } + if (inventory == null) { + Player target2 = BukkitUtils.playerWithNameOrUUID(args[0]); + if (sender.equals(target2)) { + sender.sendMessage(ChatColor.RED + "You cannot check the inventory of yourself."); + return true; + } + if ((target2 == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + inventory = target2.getInventory(); + } + player.openInventory(inventory); + return true; + } + + @SuppressWarnings("deprecation") + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + if (args.length != 1) { + return Collections.emptyList(); + } + InventoryType[] values = InventoryType.values(); + List results = new ArrayList(values.length); + Player senderPlayer = (Player) sender; + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) { + Player target = arrayOfPlayer[i]; + if ((senderPlayer == null) || (senderPlayer.canSee(target))) { + results.add(target.getName()); + } + } + return BukkitUtils.getCompletions(args, results); + } +} diff --git a/src/club/curahq/core/commands/staff/ItemCommand.java b/src/club/curahq/core/commands/staff/ItemCommand.java new file mode 100644 index 0000000..93ddbdd --- /dev/null +++ b/src/club/curahq/core/commands/staff/ItemCommand.java @@ -0,0 +1,50 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.util.core.BasePlugins; + +public class ItemCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable for players."); + return true; + } + String amount = ""; + Player p = (Player) sender; + if (args.length == 0) { + p.sendMessage(ChatColor.RED + "Usage: /I "); + return true; + } + if (BasePlugins.getPlugin().getItemDb().getItem(args[0]) == null) { + sender.sendMessage(ChatColor.RED + "Item or ID not found."); + return true; + } + if (args.length == 1) { + if (!p.getInventory().addItem(new ItemStack[] { BasePlugins.getPlugin().getItemDb().getItem(args[0], + BasePlugins.getPlugin().getItemDb().getItem(args[0]).getMaxStackSize()) }).isEmpty()) { + p.sendMessage(ChatColor.RED + "Your inventory is full."); + return true; + } + } + if (args.length == 2) { + if (!p.getInventory().addItem( + new ItemStack[] { BasePlugins.getPlugin().getItemDb().getItem(args[0], Integer.parseInt(args[1])) }) + .isEmpty()) { + p.sendMessage(ChatColor.RED + "Your inventory is full."); + return true; + } + amount = args[1]; + } + Command.broadcastCommandMessage(sender, ChatColor.GRAY + p.getName() + " gave himself " + amount + ", " + + BasePlugins.getPlugin().getItemDb().getName(BasePlugins.getPlugin().getItemDb().getItem(args[0])), + true); + return true; + } +} diff --git a/src/club/curahq/core/commands/staff/KillCommand.java b/src/club/curahq/core/commands/staff/KillCommand.java new file mode 100644 index 0000000..73c1dfd --- /dev/null +++ b/src/club/curahq/core/commands/staff/KillCommand.java @@ -0,0 +1,61 @@ +package club.curahq.core.commands.staff; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.entity.EntityDamageEvent; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; + +public class KillCommand extends BaseCommand { + public KillCommand() { + super("kill", "Kills a player."); + setAliases(new String[] { "slay" }); + setUsage("/(command) "); + } + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + Player target; + if ((args.length > 0) + && (sender.hasPermission(String.valueOf(String.valueOf(command.getPermission())) + ".others"))) { + target = BukkitUtils.playerWithNameOrUUID(args[0]); + } else { + if (!(sender instanceof Player)) { + sender.sendMessage(getUsage(label)); + return true; + } + target = (Player) sender; + } + if (target.isDead()) { + sender.sendMessage(ChatColor.RED + target.getName() + " is already dead."); + return true; + } + EntityDamageEvent event = new EntityDamageEvent(target, EntityDamageEvent.DamageCause.SUICIDE, 10000); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + sender.sendMessage(ChatColor.RED + "You cannot kill " + target.getName() + '.'); + return true; + } + target.setLastDamageCause(event); + target.setHealth(0.0D); + if (sender.equals(target)) { + sender.sendMessage(ChatColor.RED + "You have been killed."); + return true; + } + Command.broadcastCommandMessage(sender, ChatColor.GRAY + "Slain player " + ChatColor.GOLD + target.getName() + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return (args.length == 1) + && (sender.hasPermission(String.valueOf(String.valueOf(command.getPermission())) + ".others")) ? null + : Collections.emptyList(); + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/LagCommand.java b/src/club/curahq/core/commands/staff/LagCommand.java new file mode 100644 index 0000000..c7e5aa5 --- /dev/null +++ b/src/club/curahq/core/commands/staff/LagCommand.java @@ -0,0 +1,61 @@ +package club.curahq.core.commands.staff; + +import java.util.Collection; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Chunk; +import org.bukkit.World; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.event.Listener; + +import me.apache.commons.lang3.text.WordUtils; + +public class LagCommand implements Listener, CommandExecutor { + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + double tps = Bukkit.spigot().getTPS()[0]; + double lag = Math.round((1.0D - tps / 20.0D) * 100.0D); + ChatColor colour; + if (tps >= 18.0D) { + colour = ChatColor.GREEN; + } else { + if (tps >= 15.0D) { + colour = ChatColor.YELLOW; + } else { + colour = ChatColor.RED; + } + } + sender.sendMessage("§7§m-----------------------------------------------------"); + String nameOS= System.getProperty("os.name"); + sender.sendMessage(colour + "OS: " + nameOS); + sender.sendMessage(colour + "Server TPS is currently at " + Math.round(tps * 10000.0D) / 10000.0D + '.'); + sender.sendMessage(colour + "Server lag is currently at " + Math.round(lag * 10000.0D) / 10000.0D + '%'); + if (sender.hasPermission(command.getPermission() + ".memory")) { + Runtime runtime = Runtime.getRuntime(); + sender.sendMessage(colour + "Processor: " + System.getenv("PROCESSOR_IDENTIFIER")); + sender.sendMessage(colour + "Available Processors: " + runtime.availableProcessors()); + sender.sendMessage(colour + "Max Memory: " + runtime.maxMemory() / 1048576L + "MB"); + sender.sendMessage(colour + "Total Memory: " + runtime.totalMemory() / 1048576L + "MB"); + sender.sendMessage(colour + "Free Memory: " + runtime.freeMemory() / 1048576L + "MB"); + Collection worlds = Bukkit.getWorlds(); + + for (World world : worlds) { + World.Environment environment = world.getEnvironment(); + String environmentName = WordUtils.capitalizeFully(environment.name().replace('_', ' ')); + int tileEntities = 0; + Chunk[] loadedChunks2; + Chunk[] loadedChunks = loadedChunks2 = world.getLoadedChunks(); + for (Chunk chunk : loadedChunks2) { + tileEntities += chunk.getTileEntities().length; + } + sender.sendMessage(ChatColor.RED + world.getName() + '(' + environmentName + "): " + ChatColor.YELLOW + + loadedChunks.length + " chunks, " + world.getEntities().size() + " entities, " + tileEntities + + " tile entities."); + } + sender.sendMessage("§7§m-----------------------------------------------------"); + } + return true; + } +} diff --git a/src/club/curahq/core/commands/staff/MiscCommands.java b/src/club/curahq/core/commands/staff/MiscCommands.java new file mode 100644 index 0000000..f2f381e --- /dev/null +++ b/src/club/curahq/core/commands/staff/MiscCommands.java @@ -0,0 +1,120 @@ +package club.curahq.core.commands.staff; + +import java.util.HashMap; + +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.inventory.ItemStack; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import net.md_5.bungee.api.ChatColor; + +public class MiscCommands implements CommandExecutor { + public boolean onCommand (final CommandSender sender, final Command cmd, final String commandLabel, final String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "You cannot do this in console"); + return true; + } + final Player p = (Player)sender; + p.getLocation(); + p.getInventory(); + String perm = ChatColor.translateAlternateColorCodes('&', "&cNo."); + perm = perm.replaceAll("&", "�"); + if (cmd.getName().equalsIgnoreCase("copyinv")) { + if (!p.hasPermission("copyinv.yes")) { + p.sendMessage(perm); + return true; + } + if (args.length == 0) { + p.sendMessage(ChatColor.GRAY + "/copyinv "); + } + if (args.length == 1) { + final Player all2 = Bukkit.getPlayer(args[0]); + if (all2 == null) { + p.sendMessage(ChatColor.RED + "That player does not exist!"); + } + else { + final ItemStack[] armor = all2.getInventory().getArmorContents(); + p.getInventory().clear(); + p.getInventory().setArmorContents((ItemStack[])null); + p.getInventory().setArmorContents(armor); + final ItemStack[] inv = all2.getInventory().getContents(); + final HashMap itemhash = new HashMap(); + itemhash.put(p, inv); + final ItemStack[] items = itemhash.get(p); + p.getInventory().setContents(items); + p.sendMessage(ChatColor.GRAY + "Copying " + ChatColor.RED + args[0] + ChatColor.GRAY + " Inventory"); + } + } + } + if (cmd.getName().equalsIgnoreCase("fsay")) { + if (!p.hasPermission("fsay.yes")) { + p.sendMessage(perm); + return true; + } + if (args.length == 0) { + sender.sendMessage(ChatColor.GRAY + "/fsay "); + return true; + } + if (args.length == 1) { + sender.sendMessage(ChatColor.GRAY + "/fsay "); + } + else if (args.length >= 2) { + final Player user = Bukkit.getServer().getPlayer(args[0]); + if (user == null) { + final StringBuilder message = new StringBuilder(args[1]); + for (int arg2 = 2; arg2 < args.length; ++arg2) { + message.append(" ").append(args[arg2]); + } + return true; + } + final StringBuilder message = new StringBuilder(args[1]); + for (int arg2 = 2; arg2 < args.length; ++arg2) { + message.append(" ").append(args[arg2]); + } + user.chat(message.toString()); + } + } + + if (!cmd.getName().equalsIgnoreCase("slowstop")) { + return false; + } + if (!p.hasPermission("core.slowstop")) { + p.sendMessage(perm); + return true; + } + new BukkitRunnable() { + int i = 15; + + @Override + public void run() { + if(i > 0) { + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588" + " " + ChatColor.RED + "Server Restarting in " + i + " seconds."); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588" + ChatColor.GOLD + "\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588\u2588" + ChatColor.DARK_RED + "\u2588\u2588\u2588\u2588\u2588" + ChatColor.GOLD + "\u2588\u2588\u2588"); + Bukkit.broadcastMessage(ChatColor.GOLD + "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588"); + } + + if(i == 0) { + Bukkit.getServer().dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "restart"); + } + i--; + } + + }.runTaskTimer(Core.getPlugin(), 20L, 20L); + + + return true; + } + } diff --git a/src/club/curahq/core/commands/staff/MoreCommand.java b/src/club/curahq/core/commands/staff/MoreCommand.java new file mode 100644 index 0000000..4de0d88 --- /dev/null +++ b/src/club/curahq/core/commands/staff/MoreCommand.java @@ -0,0 +1,54 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.util.core.BaseCommand; + +public class MoreCommand extends BaseCommand { + public MoreCommand() { + super("more", "Sets your item to its maximum amount."); + setUsage("/(command)"); + } + + public boolean isPlayerOnlyCommand() { + return true; + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable for players."); + return true; + } + Player player = (Player) sender; + ItemStack stack = player.getItemInHand(); + if ((stack == null) || (stack.getType() == Material.AIR)) { + sender.sendMessage(ChatColor.RED + "You are not holding any item."); + return true; + } + Integer amount = null; + if (args.length > 0) { + Integer amount1 = Integer.valueOf(Integer.parseInt(args[0])); + if (amount1 == null) { + sender.sendMessage(ChatColor.RED + "'" + args[0] + "' is not a number."); + return true; + } + if (amount1.intValue() <= 0) { + sender.sendMessage(ChatColor.RED + "Item amounts must be positive."); + return true; + } + } else { + int curAmount = stack.getAmount(); + if (curAmount >= (amount = Integer.valueOf(stack.getMaxStackSize())).intValue()) { + sender.sendMessage(ChatColor.RED + "You already have the maximum amount: " + amount + '.'); + return true; + } + } + stack.setAmount(amount.intValue()); + return true; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/RefundCommand.java b/src/club/curahq/core/commands/staff/RefundCommand.java new file mode 100644 index 0000000..2081f92 --- /dev/null +++ b/src/club/curahq/core/commands/staff/RefundCommand.java @@ -0,0 +1,92 @@ +package club.curahq.core.commands.staff; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.Core; + +public class RefundCommand implements CommandExecutor, Listener { + private Core mainPlugin; + private Map rollbackInv; + + public Map getRollbackInv() { + return this.rollbackInv; + } + + public RefundCommand(Core mainPlugin) { + this.mainPlugin = mainPlugin; + this.mainPlugin.getServer().getPluginManager().registerEvents(this, this.mainPlugin); + + this.rollbackInv = new HashMap(); + } + + public class InventorySet { + private Player p; + private ItemStack[] inv; + private ItemStack[] armor; + + public Player getP() { + return this.p; + } + + public ItemStack[] getInv() { + return this.inv; + } + + public ItemStack[] getArmor() { + return this.armor; + } + + public InventorySet(Player p) { + this.p = p; + + this.inv = p.getInventory().getContents(); + this.armor = p.getInventory().getArmorContents(); + } + } + + public boolean onCommand(CommandSender s, Command c, String alias, String[] args) { + if (!s.hasPermission("core.refund")) { + s.sendMessage(ChatColor.RED + "You do not have permission."); + return true; + } + if (args.length != 1) { + s.sendMessage(ChatColor.RED + "Correct Usage: /" + c.getName() + " "); + return true; + } + Player p = this.mainPlugin.getServer().getPlayer(args[0]); + if (p == null) { + s.sendMessage(ChatColor.RED + "Player is not online."); + return true; + } + if (!this.rollbackInv.containsKey(p.getUniqueId())) { + s.sendMessage(ChatColor.RED + p.getName() + " does not have a stored record of his/her inventory."); + } else { + s.sendMessage(ChatColor.GREEN + p.getName() + "'s inventory has been restored."); + p.sendMessage(ChatColor.GREEN + "Your inventory was restored by " + s.getName() + "."); + + InventorySet invSet = (InventorySet) this.rollbackInv.get(p.getUniqueId()); + + p.getInventory().setContents(invSet.getInv()); + p.getInventory().setArmorContents(invSet.getArmor()); + } + return true; + } + + @EventHandler(priority = EventPriority.LOWEST) + public void onDeath(PlayerDeathEvent e) { + UUID entityUUID = e.getEntity().getUniqueId(); + this.rollbackInv.put(entityUUID, new InventorySet(e.getEntity())); + } +} diff --git a/src/club/curahq/core/commands/staff/RenameCommand.java b/src/club/curahq/core/commands/staff/RenameCommand.java new file mode 100644 index 0000000..dd99e0c --- /dev/null +++ b/src/club/curahq/core/commands/staff/RenameCommand.java @@ -0,0 +1,106 @@ +package club.curahq.core.commands.staff; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import club.curahq.core.util.core.BaseCommand; + + +public class RenameCommand extends BaseCommand { + + public static final List DISALLOWED; + + public RenameCommand() { + + super("rename", "Rename your held item."); + this.setUsage("/(command) "); +} + + public void setUsage(String string) { + // TODO Auto-generated method stub + + } + + //.contains("nigger")) || (message.toLowerCase().contains("steal plugins")) || (message.toLowerCase().contains("take plugins")) || (message.toLowerCase().contains("kill yourself")) || (message.toLowerCase().contains("shit staff") + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Only players can execute this command."); + return true; + } + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: " + "/rename "); + return true; + } + Player player = (Player)sender; + ItemStack stack = player.getItemInHand(); + if (stack == null || stack.getType() == Material.AIR) { + sender.sendMessage(ChatColor.RED + "You are not holding anything."); + return true; + } + ItemMeta meta = stack.getItemMeta(); + String oldName = meta.getDisplayName(); + if (oldName != null) { + oldName = oldName.trim(); + } + String newName = args[0].equalsIgnoreCase("none") || args[0].equalsIgnoreCase("null") ? null : ChatColor.translateAlternateColorCodes((char)'&', (String)StringUtils.join((Object[])args, (char)' ', (int)0, (int)args.length)); + if (oldName == null && newName == null) { + sender.sendMessage(ChatColor.RED + "Your held item already has no name."); + return true; + } + if (oldName != null && oldName.equals(newName)) { + sender.sendMessage(ChatColor.RED + "Your held item is already named this."); + return true; + } + if(stack.getType() == Material.TRIPWIRE_HOOK){ + sender.sendMessage(ChatColor.RED + "You cannot rename Trip wire hooks, as you can exploit it to create crate keys."); + Bukkit.broadcast(ChatColor.GRAY + player.getName() + " attempted to rename a tripwire hook to " + newName + ChatColor.GRAY + "! (Could potentially be trying to create a crate key)", "command.staffmode"); + return true; + } + if (newName != null) { + final String lower = newName.toLowerCase(); + for (final String word : DISALLOWED) { + if (lower.contains(word)) { + sender.sendMessage(ChatColor.RED + "You have attempted to rename your item to a disallowed name, you have now been warned."); + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "warn -s " + sender.getName() + " Innapropriate renaming"); + return true; + } + } + } + meta.setDisplayName(newName); + stack.setItemMeta(meta); + if (newName == null) { + sender.sendMessage(ChatColor.GRAY + "Removed name of held item from " + oldName + '.'); + return true; + } + sender.sendMessage(ChatColor.GRAY + "Renamed held item from " + (oldName == null ? "no name" : oldName) + " to " + newName + ChatColor.GRAY + '.'); + return true; + } + + public String getUsage(String label) { + // TODO Auto-generated method stub + return null; + } + + static { + DISALLOWED = Arrays.asList("hitler", "\u534d", "jews", "nigger", "n1gger", "brouard", "ddos", "nigga", "dox", "kys", "leaked", "shit staff", "my server", "join my server", "customkkk"); + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } +} + diff --git a/src/club/curahq/core/commands/staff/ServerTimeCommand.java b/src/club/curahq/core/commands/staff/ServerTimeCommand.java new file mode 100644 index 0000000..c5d7fc9 --- /dev/null +++ b/src/club/curahq/core/commands/staff/ServerTimeCommand.java @@ -0,0 +1,28 @@ +package club.curahq.core.commands.staff; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; + +import club.curahq.core.util.core.ConfigUtil; +import me.apache.commons.lang3.time.FastDateFormat; + +public class ServerTimeCommand implements CommandExecutor, TabCompleter { + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + sender.sendMessage(ChatColor.GRAY + "The server time is " + ChatColor.GOLD + + FORMAT.format(System.currentTimeMillis()) + ChatColor.GRAY + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } + + private static final FastDateFormat FORMAT = FastDateFormat.getInstance("E MMM dd h:mm:ssa z yyyy", + ConfigUtil.SERVER_TIME_ZONE); +} diff --git a/src/club/curahq/core/commands/staff/SetBorderCommand.java b/src/club/curahq/core/commands/staff/SetBorderCommand.java new file mode 100644 index 0000000..e411a46 --- /dev/null +++ b/src/club/curahq/core/commands/staff/SetBorderCommand.java @@ -0,0 +1,67 @@ +package club.curahq.core.commands.staff; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.World; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; + +import com.google.common.base.Optional; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.config.WorldData; +import compat.com.google.common.collect.GuavaCompat; + +public class SetBorderCommand implements CommandExecutor, TabCompleter { + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (args.length < 2) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + Optional optional = GuavaCompat.getIfPresent(World.Environment.class, args[0]); + if (!optional.isPresent()) { + sender.sendMessage(ChatColor.RED + "Environment '" + args[0] + "' not found."); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[1]); + if (amount == null) { + sender.sendMessage(ChatColor.RED + "'" + args[1] + "' is not a valid number."); + return true; + } + if (amount.intValue() < 50) { + sender.sendMessage(ChatColor.RED + "Minimum border size is " + 50 + 100 + '.'); + return true; + } + if (amount.intValue() > 250000) { + sender.sendMessage(ChatColor.RED + "Maximum border size is " + 250000 + '.'); + return true; + } + World.Environment environment = (World.Environment) optional.get(); + WorldData.getInstance().getConfig().set("world-" + environment + "-border", amount); + WorldData.getInstance().saveConfig(); + Command.broadcastCommandMessage(sender, + ChatColor.GRAY + "Set border size of environment " + environment.name() + " to " + amount + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + if (args.length != 1) { + return Collections.emptyList(); + } + World.Environment[] values = World.Environment.values(); + List results = new ArrayList(values.length); + World.Environment[] arrayOfEnvironment1; + int j = (arrayOfEnvironment1 = values).length; + for (int i = 0; i < j; i++) { + World.Environment environment = arrayOfEnvironment1[i]; + results.add(environment.name()); + } + return BukkitUtils.getCompletions(args, results); + } +} diff --git a/src/club/curahq/core/commands/staff/SetCommand.java b/src/club/curahq/core/commands/staff/SetCommand.java new file mode 100644 index 0000000..a4972c4 --- /dev/null +++ b/src/club/curahq/core/commands/staff/SetCommand.java @@ -0,0 +1,55 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.config.WorldData; + +public class SetCommand implements CommandExecutor, Listener { + public SetCommand(Core plugin) { + } + + public boolean onCommand(CommandSender s, Command c, String alias, String[] args) { + if (!s.hasPermission("core.admin")) { + s.sendMessage(ChatColor.RED + "You do not have permission to perform this command."); + return true; + } + Player p = (Player) s; + if ((args.length != 1)) { + p.sendMessage(ChatColor.RED + "/set "); + p.sendMessage(ChatColor.GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + p.sendMessage(ChatColor.BLUE + ChatColor.BOLD.toString() + "Set Location " + ChatColor.GRAY + "(Page 1/1)"); + p.sendMessage(ChatColor.GRAY + " /Set end" + ChatColor.GOLD + " � " + ChatColor.RESET + + "Set the location for end-spawn."); + p.sendMessage(ChatColor.GRAY + " /Set exit" + ChatColor.GOLD + " � " + ChatColor.RESET + + "Set the location for end-exit."); + p.sendMessage(ChatColor.GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + return true; + + } else if (args[0].equalsIgnoreCase("exit")) { + Location loc = p.getLocation(); + WorldData.getInstance().getConfig().set("world.exit.x", Double.valueOf(loc.getX())); + WorldData.getInstance().getConfig().set("world.exit.y", Double.valueOf(loc.getY())); + WorldData.getInstance().getConfig().set("world.exit.z", Double.valueOf(loc.getZ())); + WorldData.getInstance().saveConfig(); + p.sendMessage(ChatColor.GREEN + "EndExit has been set!."); + } else if (args[0].equalsIgnoreCase("end")) { + Location loc = p.getLocation(); + WorldData.getInstance().getConfig().set("world.end.entrace.x", Double.valueOf(loc.getX())); + WorldData.getInstance().getConfig().set("world.end.entrace.y", Double.valueOf(loc.getY())); + WorldData.getInstance().getConfig().set("world.end.entrace.z", Double.valueOf(loc.getZ())); + WorldData.getInstance().saveConfig(); + p.sendMessage(ChatColor.GREEN + "End spawn has been set!."); + + } + return true; + } + +} diff --git a/src/club/curahq/core/commands/staff/SpawnCommand.java b/src/club/curahq/core/commands/staff/SpawnCommand.java new file mode 100644 index 0000000..b839b6a --- /dev/null +++ b/src/club/curahq/core/commands/staff/SpawnCommand.java @@ -0,0 +1,64 @@ +package club.curahq.core.commands.staff; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; + +public class SpawnCommand + implements CommandExecutor +{ + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) + { + Player player = (Player)sender; + if (cmd.getName().equalsIgnoreCase("spawn")) + { + if (args.length == 0) { + sendLocation(player); + return true; + } + + Player target = Bukkit.getPlayer(args[0]); + if (target == null) + { + player.sendMessage(ChatColor.RED + "Player isnt online"); + return true; + } + player.sendMessage(ChatColor.GREEN + target.getName() + " has been teleported to spawn!"); + sendLocation(target); + return true; + } + if ((cmd.getName().equalsIgnoreCase("setspawn")) && + (cmd.getName().equalsIgnoreCase("setspawn"))) + { + Core.getPlugin().getConfig().set("spawn.world", player.getLocation().getWorld().getName()); + Core.getPlugin().getConfig().set("spawn.x", Double.valueOf(player.getLocation().getX())); + Core.getPlugin().getConfig().set("spawn.y", Double.valueOf(player.getLocation().getY())); + Core.getPlugin().getConfig().set("spawn.z", Double.valueOf(player.getLocation().getZ())); + Core.getPlugin().getConfig().set("spawn.yaw", Float.valueOf(player.getLocation().getYaw())); + Core.getPlugin().getConfig().set("spawn.pitch", Float.valueOf(player.getLocation().getPitch())); + Core.getPlugin().saveConfig(); + player.sendMessage(ChatColor.GREEN + "Spawn set!"); + return true; + } + return false; + } + + public static boolean sendLocation(Player player) + { + World w = Bukkit.getServer().getWorld(Core.getPlugin().getConfig().getString("spawn.world")); + double x = Core.getPlugin().getConfig().getDouble("spawn.x"); + double y = Core.getPlugin().getConfig().getDouble("spawn.y"); + double z = Core.getPlugin().getConfig().getDouble("spawn.z"); + float yaw = (float)Core.getPlugin().getConfig().getDouble("spawn.yaw"); + float pitch = (float)Core.getPlugin().getConfig().getDouble("spawn.pitch"); + player.teleport(new Location(w, x, y, z, yaw, pitch)); + return false; + } +} \ No newline at end of file diff --git a/src/club/curahq/core/commands/staff/SpawnerCommand.java b/src/club/curahq/core/commands/staff/SpawnerCommand.java new file mode 100644 index 0000000..b3408df --- /dev/null +++ b/src/club/curahq/core/commands/staff/SpawnerCommand.java @@ -0,0 +1,41 @@ +package club.curahq.core.commands.staff; + +import java.util.Collections; +import java.util.List; +import net.minecraft.util.org.apache.commons.lang3.text.WordUtils; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.util.ItemBuilder; + +public class SpawnerCommand implements CommandExecutor, TabCompleter { + + public String C(String msg) { + return ChatColor.translateAlternateColorCodes('&', msg); + } + + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + if (args.length == 0) { + sender.sendMessage(ChatColor.RED + "/spawner "); + return false; + } + String spawner = args[0]; + Player p = (Player) sender; + Inventory inv = p.getInventory(); + inv.addItem(new ItemStack[] { new ItemBuilder(Material.MOB_SPAWNER).displayName(ChatColor.GREEN + "Spawner") + .loreLine(ChatColor.WHITE + WordUtils.capitalizeFully(spawner)).build() }); + p.sendMessage(C("&7You just got a &6" + spawner + "&7.")); + return false; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/staff/StaffModeCommand.java b/src/club/curahq/core/commands/staff/StaffModeCommand.java new file mode 100644 index 0000000..e03f1ca --- /dev/null +++ b/src/club/curahq/core/commands/staff/StaffModeCommand.java @@ -0,0 +1,124 @@ + package club.curahq.core.commands.staff; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.inventory.ItemStack; + +import club.curahq.core.commands.StaffItems; +import club.curahq.core.listener.staff.VanishListener; + +public class StaffModeCommand implements Listener, CommandExecutor { + public static ArrayList modMode = new ArrayList(); + public static ArrayList Staff = new ArrayList(); + public static ArrayList teleportList = new ArrayList(); + public static HashMap armorContents = new HashMap<>(); + public static HashMap inventoryContents = new HashMap<>(); + public String color(String msg) { + return ChatColor.translateAlternateColorCodes('§', msg); + } + + static StaffModeCommand instance = new StaffModeCommand(); + + public static StaffModeCommand getInstance() { + return instance; + } + + public static boolean isMod(Player p) { + return Staff.contains(p.getUniqueId()); + + } + + public static boolean enterMod(final Player p) { + modMode.add(p); + Staff.add(p.getUniqueId()); + StaffItems.saveInventory(p); + VanishListener.getInstance().setVanish(p, true); + p.getInventory().clear(); + p.getInventory().setHelmet(null); + p.getInventory().setChestplate(null); + p.getInventory().setLeggings(null); + p.getInventory().setBoots(null); + p.setExp(0.0F); + p.setAllowFlight(true); + p.setGameMode(GameMode.CREATIVE); + StaffItems.modItems(p); + p.sendMessage("§fYou have §aenabled §fyour §6Staff Mode"); + return true; + } + + public static boolean leaveMod(final Player p) { + modMode.remove(p); + Staff.remove(p.getUniqueId()); + p.getInventory().clear(); + StaffItems.loadInventory(p); + p.setAllowFlight(false); + VanishListener.getInstance().setVanish(p, false); + p.sendMessage(ChatColor.translateAlternateColorCodes('§', "§fYou have §cdisabled §fyour §6Staff Mode")); + p.setGameMode(GameMode.SURVIVAL); + + return true; + } + + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + if (cmd.getName().equalsIgnoreCase("staffmode")) { + if (!sender.hasPermission("command.mod")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (args.length < 1) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "User command only"); + return true; + } + if (modMode.contains(sender)) { + leaveMod((Player) sender); + return true; + } + enterMod((Player) sender); + return true; + } + if (!sender.hasPermission("command.mod.others")) { + sender.sendMessage(ChatColor.RED + "No."); + return true; + } + Player t = Bukkit.getPlayer(args[0]); + if (t == null) { + sender.sendMessage("§cPlayer not found."); + return true; + } + if (modMode.contains(t)) { + leaveMod(t); + sender.sendMessage("§fYou have §cdisabled §f" + t.getName() + "'s §6Staff Mode"); + return true; + } + enterMod(t); + sender.sendMessage("§fYou have §aenabled §f" + t.getName() + "'s §6Staff Mode"); + return true; + } + return false; + } + @SuppressWarnings({ "deprecation" }) + public static void onDisableMod() { + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) { + Player p = arrayOfPlayer[i]; + if (Staff.contains(p.getUniqueId())) { + leaveMod(p); + p.sendMessage(ChatColor.RED.toString() + "You have been taken out of Staff Mode because of a reload."); + teleportList.remove(p); + } + } + } + +} diff --git a/src/club/curahq/core/commands/staff/VanishCommand.java b/src/club/curahq/core/commands/staff/VanishCommand.java new file mode 100644 index 0000000..9e9a96c --- /dev/null +++ b/src/club/curahq/core/commands/staff/VanishCommand.java @@ -0,0 +1,63 @@ +package club.curahq.core.commands.staff; + +import java.util.ArrayList; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.listener.staff.VanishListener; + +public class VanishCommand implements CommandExecutor { + + public static ArrayList staff = new ArrayList(); + + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + if (cmd.getName().equalsIgnoreCase("vanish")) { + if (!sender.hasPermission("command.vanish")) { + sender.sendMessage(ChatColor.RED + "You lack the sufficient permissions to execute this command."); + return true; + } + if (args.length < 1) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "You must be a player to execute this command"); + return true; + } + Player p = (Player) sender; + VanishListener.getInstance(); + if (VanishListener.isVanished(p.getPlayer())) { + VanishListener.getInstance().setVanish(p, false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &fyour &6Vanish Mode")); + return true; + } + VanishListener.getInstance().setVanish(p, true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &fyour &6Vanish Mode")); + return true; + } + if (!sender.hasPermission("command.vanish.others")) { + sender.sendMessage(ChatColor.RED + "No."); + return true; + } + Player t = Bukkit.getPlayer(args[0]); + if (t == null) { + sender.sendMessage("§6Could not find player §f" + args[0].toString() + "§6."); + return true; + } + VanishListener.getInstance(); + if (VanishListener.isVanished(t.getPlayer())) { + VanishListener.getInstance().setVanish(t, false); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &cdisabled &f" + t.getName() + "'s &6Vanish Mode")); + return true; + } + VanishListener.getInstance().setVanish(t, true); + sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&fYou have &aenabled &f" + t.getName() + "'s &6Vanish Mode")); + return true; + } + return false; + } + +} diff --git a/src/club/curahq/core/commands/staff/WhoisCommand.java b/src/club/curahq/core/commands/staff/WhoisCommand.java new file mode 100644 index 0000000..e42eb9e --- /dev/null +++ b/src/club/curahq/core/commands/staff/WhoisCommand.java @@ -0,0 +1,68 @@ +package club.curahq.core.commands.staff; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Player; + +import com.google.common.collect.ImmutableMap; + +import club.curahq.core.Core; +import club.curahq.core.user.FactionUser; +import club.curahq.core.user.UserManager; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.chat.Text; +import club.curahq.core.util.core.BaseCommand; +import club.curahq.core.util.core.BaseConstants; +import club.curahq.core.util.core.StaffPriority; +import me.apache.commons.lang3.text.WordUtils; +import me.apache.commons.lang3.time.DurationFormatUtils; + +public class WhoisCommand extends BaseCommand { + + private final Core plugin; + + public WhoisCommand(final Core plugin) { + super("whois", "Check information about a player."); + this.plugin = plugin; + this.setUsage("/(command) [playerName]"); + } + + @Override + public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) { + if(args.length < 1) { + sender.sendMessage(this.getUsage()); + return true; + } + final Player target = BukkitUtils.playerWithNameOrUUID(args[0]); + if(target == null || !BaseCommand.canSee(sender, target)) { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, args[0])); + return true; + } + final Location location = target.getLocation(); + final World world = location.getWorld(); + sender.sendMessage(ChatColor.GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + sender.sendMessage(ChatColor.GRAY + " [" + ChatColor.GRAY + target.getDisplayName() + ChatColor.GRAY + ']'); + sender.sendMessage(ChatColor.GOLD + " Hunger: " + ChatColor.GRAY + target.getFoodLevel() + '/' + 20 + " (" + target.getSaturation() + " saturation)"); + sender.sendMessage(ChatColor.GOLD + " Exp/Level: " + ChatColor.GRAY + target.getExp() + '/' + target.getLevel()); + sender.sendMessage(ChatColor.GOLD + " Location: " + ChatColor.GRAY + world.getName() + ' ' + ChatColor.GRAY + '[' + WordUtils.capitalizeFully(world.getEnvironment().name().replace('_', ' ')) + "] " + ChatColor.GRAY + '(' + location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ() + ')'); + sender.sendMessage(ChatColor.GOLD + " Operator: " + ChatColor.GRAY + target.isOp()); + sender.sendMessage(ChatColor.GOLD + " GameMode: " + ChatColor.GRAY + WordUtils.capitalizeFully(target.getGameMode().name().replace('_', ' '))); + sender.sendMessage(ChatColor.GOLD + " Idle Time: " + ChatColor.GRAY + DurationFormatUtils.formatDurationWords(BukkitUtils.getIdleTime(target), true, true)); + sender.sendMessage(ChatColor.GOLD + " IP4 Address: " + ChatColor.GRAY + (sender.hasPermission(command.getPermission() + ".ip") ? target.getAddress().getHostString(): ChatColor.STRIKETHROUGH + "1.1.1.1" )); + sender.sendMessage(ChatColor.GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + return true; + } + + @Override + public List onTabComplete(final CommandSender sender, final Command command, final String label, final String[] args) { + return (args.length == 1) ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/teleport/TeleportAllCommand.java b/src/club/curahq/core/commands/teleport/TeleportAllCommand.java new file mode 100644 index 0000000..85d52c4 --- /dev/null +++ b/src/club/curahq/core/commands/teleport/TeleportAllCommand.java @@ -0,0 +1,37 @@ +package club.curahq.core.commands.teleport; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent; + +public class TeleportAllCommand implements CommandExecutor { + + @SuppressWarnings("deprecation") + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + Player player = (Player) sender; + Player[] arrayOfPlayer; + int j = (arrayOfPlayer = Bukkit.getOnlinePlayers()).length; + for (int i = 0; i < j; i++) { + Player target = arrayOfPlayer[i]; + if ((!target.equals(player)) && (player.canSee(target))) { + target.teleport(player, PlayerTeleportEvent.TeleportCause.COMMAND); + } + } + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/teleport/TeleportCommand.java b/src/club/curahq/core/commands/teleport/TeleportCommand.java new file mode 100644 index 0000000..540c7e8 --- /dev/null +++ b/src/club/curahq/core/commands/teleport/TeleportCommand.java @@ -0,0 +1,75 @@ +package club.curahq.core.commands.teleport; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseConstants; + +public class TeleportCommand implements CommandExecutor { + static final int MAX_COORD = 30000000; + static final int MIN_COORD = -30000000; + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if ((args.length < 1) || (args.length > 4)) { + sender.sendMessage(ChatColor.RED + "Usage: /Teleport | "); + return true; + } + Player targetA; + if ((args.length == 1) || (args.length == 3)) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "Usage: /Teleport | "); + return true; + } + targetA = (Player) sender; + } else { + targetA = BukkitUtils.playerWithNameOrUUID(args[0]); + } + if ((targetA == null)) { + sender.sendMessage( + String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[0] })); + return true; + } + if (args.length < 3) { + Player targetB = BukkitUtils.playerWithNameOrUUID(args[(args.length - 1)]); + if ((targetB == null)) { + sender.sendMessage(ChatColor.RED + "Player '" + ChatColor.GRAY + args[(args.length - 1)] + + ChatColor.RED + "' not found."); + return true; + } + if (targetA.equals(targetB)) { + sender.sendMessage(ChatColor.RED + "The teleportee and teleported are the same player."); + return true; + } + if (targetA.teleport(targetB, PlayerTeleportEvent.TeleportCause.COMMAND)) { + sender.sendMessage( + ChatColor.GRAY + "Teleported " + targetA.getName() + " to " + targetB.getName() + '.'); + } else { + sender.sendMessage(ChatColor.RED + "Failed to teleport you to " + targetB.getName() + '.'); + } + } else if (targetA.getWorld() != null) { + Location loc = new Location(targetA.getLocation().getWorld(), Integer.parseInt(args[0]), + Integer.parseInt(args[1]), Integer.parseInt(args[2])); + targetA.teleport(loc); + if (targetA.teleport(loc, PlayerTeleportEvent.TeleportCause.COMMAND)) { + sender.sendMessage( + "You have been teleported to: " + ChatColor.GREEN + args[0] + ", " + args[1] + ", " + args[2]); + } else { + sender.sendMessage(ChatColor.RED + "Failed to teleport you."); + } + } + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return (args.length == 1) || (args.length == 2) ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/teleport/TeleportHereCommand.java b/src/club/curahq/core/commands/teleport/TeleportHereCommand.java new file mode 100644 index 0000000..6b98938 --- /dev/null +++ b/src/club/curahq/core/commands/teleport/TeleportHereCommand.java @@ -0,0 +1,33 @@ +package club.curahq.core.commands.teleport; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.util.BukkitUtils; + +public class TeleportHereCommand implements CommandExecutor { + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage(ChatColor.RED + "This command is only executable by players."); + return true; + } + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /teleporthere "); + return true; + } + Player player = (Player) sender; + BukkitUtils.playerWithNameOrUUID(args[0]).teleport(player); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + return args.length == 1 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/commands/teleport/TopCommand.java b/src/club/curahq/core/commands/teleport/TopCommand.java new file mode 100644 index 0000000..14a856d --- /dev/null +++ b/src/club/curahq/core/commands/teleport/TopCommand.java @@ -0,0 +1,53 @@ +package club.curahq.core.commands.teleport; + +import java.util.Objects; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; + +public class TopCommand +extends BaseCommand { + public TopCommand() { + super("top", "Teleports to the highest safe spot."); + this.setUsage("/(command)"); + } + + @Override + public boolean isPlayerOnlyCommand() { + return true; + } + + /* + * Enabled aggressive block sorting + */ + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage((Object)ChatColor.RED + "This command is only executable for players."); + return true; + } + Player player = (Player)sender; + Location origin = player.getLocation().clone(); + Location highestLocation = BukkitUtils.getHighestLocation(origin.clone()); + if (highestLocation != null && !Objects.equals((Object)highestLocation, (Object)origin)) { + Block originBlock = origin.getBlock(); + if ((highestLocation.getBlockY() - originBlock.getY() != 1 || originBlock.getType() != Material.WATER) && originBlock.getType() != Material.STATIONARY_WATER) { + player.teleport(highestLocation.add(0.0, 1.0, 0.0), PlayerTeleportEvent.TeleportCause.COMMAND); + sender.sendMessage((Object)ChatColor.AQUA + "Teleported to highest location."); + return true; + } + } + sender.sendMessage((Object)ChatColor.RED + "No highest location found."); + return true; + } +} + diff --git a/src/club/curahq/core/commands/teleport/WorldCommand.java b/src/club/curahq/core/commands/teleport/WorldCommand.java new file mode 100644 index 0000000..e937916 --- /dev/null +++ b/src/club/curahq/core/commands/teleport/WorldCommand.java @@ -0,0 +1,73 @@ +package club.curahq.core.commands.teleport; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.lang.WordUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent; + +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.core.BaseCommand; + +public class WorldCommand + extends BaseCommand +{ + public WorldCommand() + { + super("world", "Change current world."); + setAliases(new String[] { "changeworld", "switchworld" }); + setUsage("/(command) "); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (!(sender instanceof Player)) + { + sender.sendMessage(ChatColor.RED + "This command is only executable for players."); + return true; + } + if (args.length < 1) + { + sender.sendMessage(ChatColor.RED + getUsage()); + return true; + } + World world = Bukkit.getWorld(args[0]); + if (world == null) + { + sender.sendMessage(ChatColor.RED + "World '" + args[0] + "' not found."); + return true; + } + Player player = (Player)sender; + if (player.getWorld().equals(world)) + { + sender.sendMessage(ChatColor.RED + "You are already in that world."); + return true; + } + Location origin = player.getLocation(); + Location location = new Location(world, origin.getX(), origin.getY(), origin.getZ(), origin.getYaw(), origin.getPitch()); + player.teleport(location, PlayerTeleportEvent.TeleportCause.COMMAND); + sender.sendMessage(ChatColor.GRAY + "Switched world to '" + world.getName() + ChatColor.AQUA + " [" + WordUtils.capitalizeFully(world.getEnvironment().name().replace('_', ' ')) + ']' + ChatColor.AQUA + "'."); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + if (args.length != 1) { + return Collections.emptyList(); + } + List worlds = Bukkit.getWorlds(); + ArrayList results = new ArrayList(worlds.size()); + for (World world : Bukkit.getWorlds()) { + results.add(world.getName()); + } + return BukkitUtils.getCompletions(args, results); + } +} \ No newline at end of file diff --git a/src/club/curahq/core/crowbar/Crowbar.java b/src/club/curahq/core/crowbar/Crowbar.java new file mode 100644 index 0000000..feae2ac --- /dev/null +++ b/src/club/curahq/core/crowbar/Crowbar.java @@ -0,0 +1,117 @@ +package club.curahq.core.crowbar; + +import com.google.common.base.Optional; +import com.google.common.base.Preconditions; +import java.util.Arrays; +import java.util.List; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +public class Crowbar { + public static final int MAX_SPAWNER_USES = 1; + public static final int MAX_END_FRAME_USES = 6; + + public Crowbar() { + this(1, 6, 1); + } + + public Crowbar(int spawnerUses, int endFrameUses, int endDragonUses) { + this.stack = new ItemStack(CROWBAR_TYPE, 1); + Preconditions.checkArgument((spawnerUses > 0) || (endFrameUses > 0), "Cannot create a crowbar with empty uses"); + setSpawnerUses(Math.min(1, spawnerUses)); + setEndFrameUses(Math.min(6, endFrameUses)); + } + + public static Optional fromStack(ItemStack stack) { + if ((stack == null) || (!stack.hasItemMeta())) { + return Optional.absent(); + } + ItemMeta meta = stack.getItemMeta(); + if ((!meta.hasDisplayName()) || (!meta.hasLore()) || (!meta.getDisplayName().equals(CROWBAR_NAME))) { + return Optional.absent(); + } + Crowbar crowbar = new Crowbar(); + List loreList = meta.getLore(); + for (String lore : loreList) { + lore = ChatColor.stripColor(lore); + int length = lore.length(); + for (int i = 0; i < length; i++) { + char character = lore.charAt(i); + if (Character.isDigit(character)) { + int amount = Integer.parseInt(String.valueOf(character)); + if (lore.startsWith("End Frame Uses")) { + crowbar.setEndFrameUses(amount); + break; + } + if (lore.startsWith("Spawner Uses")) { + crowbar.setSpawnerUses(amount); + break; + } + } + } + } + return Optional.of(crowbar); + } + + public int getEndFrameUses() { + return this.endFrameUses; + } + + public void setEndFrameUses(int uses) { + if (this.endFrameUses != uses) { + this.endFrameUses = Math.min(6, uses); + this.needsMetaUpdate = true; + } + } + + public int getSpawnerUses() { + return this.spawnerUses; + } + + public void setSpawnerUses(int uses) { + if (this.spawnerUses != uses) { + this.spawnerUses = Math.min(1, uses); + this.needsMetaUpdate = true; + } + } + + public ItemStack getItemIfPresent() { + Optional optional = toItemStack(); + return optional.isPresent() ? (ItemStack) optional.get() : new ItemStack(Material.AIR, 1); + } + + public Optional toItemStack() { + if (this.needsMetaUpdate) { + double maxDurability; + double curDurability = maxDurability = CROWBAR_TYPE.getMaxDurability(); + double increment = curDurability / 6.0D; + curDurability -= increment * (this.spawnerUses + this.endFrameUses); + if (Math.abs(curDurability - maxDurability) == 0.0D) { + return Optional.absent(); + } + ItemMeta meta = this.stack.getItemMeta(); + meta.setDisplayName(CROWBAR_NAME); + meta.setLore( + Arrays.asList(new String[] { + String.format(LORE_FORMAT, + new Object[] { "Spawner Uses", Integer.valueOf(this.spawnerUses), + Integer.valueOf(1) }), + String.format(LORE_FORMAT, new Object[] { "End Frame Uses", + Integer.valueOf(this.endFrameUses), Integer.valueOf(6) }) })); + this.stack.setItemMeta(meta); + this.stack.setDurability((short) (int) curDurability); + this.needsMetaUpdate = false; + } + return Optional.of(this.stack); + } + + public static final Material CROWBAR_TYPE = Material.GOLD_HOE; + private static final String CROWBAR_NAME = ChatColor.RED.toString() + "Crowbar"; + private static final String LORE_FORMAT = ChatColor.GRAY + "%1$s: " + ChatColor.YELLOW + "%2$s/%3$s"; + private int endFrameUses; + private int spawnerUses; + private final ItemStack stack; + private boolean needsMetaUpdate; +} diff --git a/src/club/curahq/core/deathban/Deathban.java b/src/club/curahq/core/deathban/Deathban.java new file mode 100644 index 0000000..8ac4a72 --- /dev/null +++ b/src/club/curahq/core/deathban/Deathban.java @@ -0,0 +1,93 @@ +package club.curahq.core.deathban; + +import org.bukkit.Location; +import org.bukkit.configuration.serialization.ConfigurationSerializable; + +import club.curahq.core.util.PersistableLocation; + +import java.util.LinkedHashMap; +import java.util.Map; + +public class Deathban implements ConfigurationSerializable { + + private final String reason; + + private final long creationMillis; + + private final long expiryMillis; + + private final PersistableLocation deathPoint; + + public String getReason() { + return reason; + } + + public long getCreationMillis() { + return creationMillis; + } + + public Deathban(String reason, long duration, PersistableLocation deathPoint) { + this.reason = reason; + this.creationMillis = System.currentTimeMillis(); + this.expiryMillis = this.creationMillis + duration; + this.deathPoint = deathPoint; + } + + public Deathban(Map map) { + this.reason = (String) map.get("reason"); + this.creationMillis = Long.parseLong((String) map.get("creationMillis")); + this.expiryMillis = Long.parseLong((String) map.get("expiryMillis")); + + Object object = map.get("deathPoint"); + this.deathPoint = object instanceof PersistableLocation ? (PersistableLocation) object : null; + } + + @Override + public Map serialize() { + Map map = new LinkedHashMap<>(); + map.put("reason", this.reason); + map.put("creationMillis", Long.toString(this.creationMillis)); + map.put("expiryMillis", Long.toString(this.expiryMillis)); + if (this.deathPoint != null) { + map.put("deathPoint", this.deathPoint); + } + + return map; + } + + /** + * Gets the initial duration of this {@link Deathban} in milliseconds. + * + * @return the initial duration + */ + public long getInitialDuration() { + return this.expiryMillis - this.creationMillis; + } + + /** + * Checks if this {@link Deathban} is active. + * + * @return true if is active + */ + public boolean isActive() { + return this.getRemaining() > 0L; + } + + /** + * Gets the remaining time in milliseconds until this {@link Deathban} is no longer active. + * + * @return the remaining time until expired + */ + public long getRemaining() { + return this.expiryMillis - System.currentTimeMillis(); + } + + /** + * Gets the {@link Location} where this player died during {@link Deathban}. + * + * @return death {@link Location} + */ + public Location getDeathPoint() { + return deathPoint == null ? null : deathPoint.getLocation(); + } +} diff --git a/src/club/curahq/core/deathban/DeathbanListener.java b/src/club/curahq/core/deathban/DeathbanListener.java new file mode 100644 index 0000000..71d139f --- /dev/null +++ b/src/club/curahq/core/deathban/DeathbanListener.java @@ -0,0 +1,165 @@ +package club.curahq.core.deathban; + +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.event.player.PlayerRespawnEvent; +import org.bukkit.scheduler.BukkitRunnable; + +import club.curahq.core.Core; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.DelayedMessageRunnable; +import club.curahq.core.util.DurationFormatter; +import club.curahq.core.util.core.ConfigUtil; +import me.apache.commons.lang3.time.DurationFormatUtils; +import net.minecraft.util.gnu.trove.map.TObjectIntMap; +import net.minecraft.util.gnu.trove.map.TObjectLongMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectLongHashMap; + +public class DeathbanListener implements Listener { + + private static final long RESPAWN_KICK_DELAY_MILLIS = TimeUnit.SECONDS.toMillis(10L); + private static final long RESPAWN_KICK_DELAY_TICKS = RESPAWN_KICK_DELAY_MILLIS / 50L; + private static final long LIFE_USE_DELAY_MILLIS = TimeUnit.SECONDS.toMillis(30L); + private static final String LIFE_USE_DELAY_WORDS = DurationFormatUtils.formatDurationWords(DeathbanListener.LIFE_USE_DELAY_MILLIS, true, true); + private static final String DEATH_BAN_BYPASS_PERMISSION = "hcf.deathban.bypass"; + + private final TObjectIntMap respawnTickTasks = new TObjectIntHashMap<>(); + private final TObjectLongMap lastAttemptedJoinMap = new TObjectLongHashMap<>(); + private final Core plugin; + + public DeathbanListener(Core plugin) { + this.plugin = plugin; + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) + public void onPlayerLogin(PlayerLoginEvent event) { + Player player = event.getPlayer(); + if (player.hasPermission(DeathbanListener.DEATH_BAN_BYPASS_PERMISSION) || (ConfigUtil.KIT_MAP) == true) { + return; + } + + FactionUser user = this.plugin.getUserManager().getUser(player.getUniqueId()); + Deathban deathban = user.getDeathban(); + if (deathban == null || !deathban.isActive()) { + return; + } + + if (this.plugin.getEotwHandler().isEndOfTheWorld()) { + event.disallow(PlayerLoginEvent.Result.KICK_OTHER, ChatColor.RED + "Deathbanned for the entirety of the map due to EOTW.\nVisit example (DeathbanListener.java:60) to view SOTW info."); + return; + } + + UUID uuid = player.getUniqueId(); + int lives = this.plugin.getDeathbanManager().getLives(uuid); + + String formattedRemaining = DurationFormatter.getRemaining(deathban.getRemaining(), true, false); + + if (lives <= 0) { // If the user has no lives, inform that they need some. + event.disallow(PlayerLoginEvent.Result.KICK_OTHER, ChatColor.RED + "You are still deathbanned for " + formattedRemaining + ": " + ChatColor.YELLOW + deathban.getReason() + ChatColor.RED + + "."); + + return; + } + + long millis = System.currentTimeMillis(); + long lastAttemptedJoinMillis = this.lastAttemptedJoinMap.get(uuid); + + // If the user has tried joining in the last 30 seconds and kicked for deathban but has lives, let them join this time to prevent accidental life use. + if (lastAttemptedJoinMillis != this.lastAttemptedJoinMap.getNoEntryValue() && lastAttemptedJoinMillis - millis < DeathbanListener.LIFE_USE_DELAY_MILLIS) { + this.lastAttemptedJoinMap.remove(uuid); + user.removeDeathban(); + lives = plugin.getDeathbanManager().takeLives(uuid, 1); + + event.setResult(PlayerLoginEvent.Result.ALLOWED); + new DelayedMessageRunnable(plugin, player, ChatColor.YELLOW + "You have used a life for entry. You now have " + ChatColor.WHITE + lives + ChatColor.YELLOW + " lives.").runTask(plugin); + + return; + } + + // The user has lives, but just in case they didn't want them to use, tell them to join again in the next 30 seconds. + String reason = deathban.getReason(); + this.lastAttemptedJoinMap.put(uuid, millis + LIFE_USE_DELAY_MILLIS); + + event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You are currently death-banned" + (reason != null ? " for " + reason : "") + ".\n" + ChatColor.WHITE + formattedRemaining + " remaining.\n" + + ChatColor.RED + "You currently have " + (lives <= 0 ? "no" : lives) + " lives.\n\n" + "You may use a life by reconnecting within " + ChatColor.YELLOW + + DeathbanListener.LIFE_USE_DELAY_WORDS + ChatColor.RED + "."); + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.LOW) + public void onPlayerDeath(PlayerDeathEvent event) { + Player player = event.getEntity(); + Deathban deathban = plugin.getDeathbanManager().applyDeathBan(player, event.getDeathMessage()); + if ((player.hasPermission(DeathbanListener.DEATH_BAN_BYPASS_PERMISSION)) || (player.isOp() || (ConfigUtil.KIT_MAP) == true)) { + return; + } + long remaining = deathban.getRemaining(); + if (remaining <= 0L) { + return; + } + + if (DeathbanListener.RESPAWN_KICK_DELAY_MILLIS <= 0L || remaining < DeathbanListener.RESPAWN_KICK_DELAY_MILLIS) { + this.handleKick(player, deathban); + return; + } + + // Let the player see the death screen for 10 seconds + this.respawnTickTasks.put(player.getUniqueId(), new BukkitRunnable() { + @Override + public void run() { + DeathbanListener.this.handleKick(player, deathban); + } + }.runTaskLater(plugin, DeathbanListener.RESPAWN_KICK_DELAY_TICKS).getTaskId()); + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onPlayerRequestRespawn(PlayerRespawnEvent event) { + Player player = event.getPlayer(); + FactionUser user = this.plugin.getUserManager().getUser(player.getUniqueId()); + Deathban deathban = user.getDeathban(); + if (deathban != null && deathban.getRemaining() > 0L) { + if ((player.hasPermission(DeathbanListener.DEATH_BAN_BYPASS_PERMISSION) || (ConfigUtil.KIT_MAP) == true)) { + this.cancelRespawnKickTask(player); + user.removeDeathban(); + player.sendMessage(ChatColor.RED + "You would be death-banned, but you have access to bypass."); + //new DelayedMessageRunnable(plugin, player, ChatColor.RED + "You would be death-banned for " + deathban.getReason() + ChatColor.RED + ", but you have access to bypass.").runTask(this.plugin); + + return; + } + + //TODO: FIX setcancelled + //event.setCancelled(true); + this.handleKick(player, deathban); + } + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onPlayerQuit(PlayerQuitEvent event) { + this.cancelRespawnKickTask(event.getPlayer()); + } + + private void cancelRespawnKickTask(Player player) { + int taskId = this.respawnTickTasks.remove(player.getUniqueId()); + if (taskId != this.respawnTickTasks.getNoEntryValue()) { + Bukkit.getScheduler().cancelTask(taskId); + } + } + + private void handleKick(Player player, Deathban deathban) { + if (this.plugin.getEotwHandler().isEndOfTheWorld()) { + player.kickPlayer(ChatColor.RED + "Deathbanned for the entirety of the map due to EOTW.\nVisit the forums for SOTW info!"); + } else { + player.kickPlayer(ChatColor.RED + "Deathbanned for " + DurationFormatter.getRemaining(deathban.getRemaining(), true, false) + ": " + ChatColor.WHITE + deathban.getReason()); + } + } +} \ No newline at end of file diff --git a/src/club/curahq/core/deathban/DeathbanManager.java b/src/club/curahq/core/deathban/DeathbanManager.java new file mode 100644 index 0000000..01762a2 --- /dev/null +++ b/src/club/curahq/core/deathban/DeathbanManager.java @@ -0,0 +1,33 @@ +package club.curahq.core.deathban; + +import java.util.UUID; + +import org.bukkit.entity.Player; + +import club.curahq.core.util.core.ConfigUtil; +import net.minecraft.util.gnu.trove.map.TObjectIntMap; + +public abstract interface DeathbanManager +{ +public static final long MAX_DEATHBAN_TIME = ConfigUtil.DEFAULT_DEATHBAN_DURATION; + + public abstract TObjectIntMap getLivesMap(); + + public abstract int getLives(UUID paramUUID); + + public abstract int setLives(UUID paramUUID, int paramInt); + + public abstract int addLives(UUID paramUUID, int paramInt); + + public abstract int takeLives(UUID paramUUID, int paramInt); + + public abstract long getDeathBanMultiplier(Player paramPlayer); + + public abstract Deathban applyDeathBan(Player paramPlayer, String paramString); + + public abstract Deathban applyDeathBan(UUID paramUUID, Deathban paramDeathban); + + public abstract void reloadDeathbanData(); + + public abstract void saveDeathbanData(); +} diff --git a/src/club/curahq/core/deathban/FlatFileDeathbanManager.java b/src/club/curahq/core/deathban/FlatFileDeathbanManager.java new file mode 100644 index 0000000..07bfe6e --- /dev/null +++ b/src/club/curahq/core/deathban/FlatFileDeathbanManager.java @@ -0,0 +1,121 @@ +package club.curahq.core.deathban; + +import java.util.LinkedHashMap; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.bukkit.Location; +import org.bukkit.configuration.MemorySection; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + +import club.curahq.core.Core; +import club.curahq.core.faction.type.Faction; +import club.curahq.core.util.Config; +import club.curahq.core.util.PersistableLocation; +import club.curahq.core.util.core.ConfigUtil; +import net.minecraft.util.gnu.trove.map.TObjectIntMap; +import net.minecraft.util.gnu.trove.map.hash.TObjectIntHashMap; + +public class FlatFileDeathbanManager +implements DeathbanManager { + private final Core plugin; + private TObjectIntMap livesMap; + private Config livesConfig; + public FlatFileDeathbanManager(Core plugin) { + this.plugin = plugin; + this.reloadDeathbanData(); + } + + @Override + public TObjectIntMap getLivesMap() { + return this.livesMap; + } + + @Override + public int getLives(UUID uuid) { + return this.livesMap.get((Object)uuid); + } + + + @Override + public int setLives(UUID uuid, int lives) { + + this.livesMap.put((UUID)uuid, lives); + return lives; + } + + @Override + public int addLives(UUID uuid, int amount) { + return this.livesMap.adjustOrPutValue((UUID)uuid, amount, amount); + } + + @Override + public int takeLives(UUID uuid, int amount) { + return this.setLives(uuid, this.getLives(uuid) - amount); + } + + @Override + public long getDeathBanMultiplier(Player player) { + int i = 5; + while ((long)i < TimeUnit.MILLISECONDS.toSeconds(DeathbanManager.MAX_DEATHBAN_TIME)) { + if (player.hasPermission("hcf.deathban.seconds." + i)) { + return i * 1000; + } + ++i; + } + return ConfigUtil.DEFAULT_DEATHBAN_DURATION; + } + + @Override + public Deathban applyDeathBan(Player player, String reason) { + Location location = player.getLocation(); + Faction factionAt = this.plugin.getFactionManager().getFactionAt(location); + long duration = this.getDeathBanMultiplier(player); + if (factionAt.isSafezone()) { + duration = 0; + } + if (!factionAt.isDeathban()) { + duration /= 2; + } + if (player.hasPermission("hcf.deathban.bypass")) { + return null; + } + return applyDeathBan(player.getUniqueId(), new Deathban(reason, Math.min(MAX_DEATHBAN_TIME, duration), new PersistableLocation(location))); + } + + @Override + public Deathban applyDeathBan(UUID uuid, Deathban deathban) { + plugin.getUserManager().getUser(uuid).setDeathban(deathban); + return deathban; + } + + @Override + public void reloadDeathbanData() { + this.livesConfig = new Config((JavaPlugin)this.plugin, "lives"); + Object object = this.livesConfig.get("lives"); + if (object instanceof MemorySection) { + MemorySection section = (MemorySection)object; + final Set keys = (Set)section.getKeys(false); + this.livesMap = new TObjectIntHashMap(keys.size(), 0.5f, 0); + for (String id : keys) { + this.livesMap.put((UUID)UUID.fromString(id), this.livesConfig.getInt(String.valueOf(section.getCurrentPath()) + "." + id)); + } + } else { + this.livesMap = new TObjectIntHashMap(10, 0.5f, 0); + } + } + + @Override + public void saveDeathbanData() { + LinkedHashMap saveMap = new LinkedHashMap(this.livesMap.size()); + this.livesMap.forEachEntry((uuid, i) -> { + saveMap.put(uuid.toString(), i); + return true; + } + ); + this.livesConfig.set("lives", saveMap); + this.livesConfig.save(); + } +} \ No newline at end of file diff --git a/src/club/curahq/core/deathban/lives/LivesExecutor.java b/src/club/curahq/core/deathban/lives/LivesExecutor.java new file mode 100644 index 0000000..455384c --- /dev/null +++ b/src/club/curahq/core/deathban/lives/LivesExecutor.java @@ -0,0 +1,62 @@ +package club.curahq.core.deathban.lives; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; + +import club.curahq.core.Core; +import club.curahq.core.deathban.lives.argument.LivesCheckArgument; +import club.curahq.core.deathban.lives.argument.LivesCheckDeathbanArgument; +import club.curahq.core.deathban.lives.argument.LivesClearDeathbansArgument; +import club.curahq.core.deathban.lives.argument.LivesGiveArgument; +import club.curahq.core.deathban.lives.argument.LivesReviveArgument; +import club.curahq.core.deathban.lives.argument.LivesSetArgument; +import club.curahq.core.deathban.lives.argument.LivesSetDeathbanTimeArgument; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.command.ArgumentExecutor; +import club.curahq.core.util.command.CommandArgument; + +public class LivesExecutor + extends ArgumentExecutor +{ + public LivesExecutor(Core plugin) + { + super("lives"); + addArgument(new LivesCheckArgument(plugin)); + addArgument(new LivesCheckDeathbanArgument(plugin)); + addArgument(new LivesClearDeathbansArgument(plugin)); + addArgument(new LivesGiveArgument(plugin)); + addArgument(new LivesReviveArgument(plugin)); + addArgument(new LivesSetArgument(plugin)); + addArgument(new LivesSetDeathbanTimeArgument()); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 1) + { + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + sender.sendMessage(ChatColor.GOLD + "Lives Help"); + sender.sendMessage(ChatColor.YELLOW + " /lives check" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Check how many lives a player currently has"); + sender.sendMessage(ChatColor.YELLOW + " /lives give" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Gives a player a live if there death-banned"); + sender.sendMessage(ChatColor.YELLOW + " /lives revive" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Revive a player that's death-banned"); + if (sender.hasPermission("lives.admin")) + { + sender.sendMessage(ChatColor.YELLOW + " /lives cleardeathbans" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Clear all the server's deathbans"); + sender.sendMessage(ChatColor.YELLOW + " /lives set" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Set the player's amount of lives."); + sender.sendMessage(ChatColor.YELLOW + " /lives setdeathbantime" + ChatColor.GOLD +" - " + ChatColor.GRAY + "Sets the base deathban time."); + } + sender.sendMessage(ChatColor.DARK_GRAY + BukkitUtils.STRAIGHT_LINE_DEFAULT); + return true; + } + CommandArgument argument2 = getArgument(args[0]); + String permission2 = argument2 == null ? null : argument2.getPermission(); + if ((argument2 == null) || ((permission2 != null) && (!sender.hasPermission(permission2)))) + { + sender.sendMessage(ChatColor.RED + "Command not found"); + return true; + } + argument2.onCommand(sender, command, label, args); + return true; + } +} diff --git a/src/club/curahq/core/deathban/lives/LivesListener.java b/src/club/curahq/core/deathban/lives/LivesListener.java new file mode 100644 index 0000000..4204b31 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/LivesListener.java @@ -0,0 +1,74 @@ +package club.curahq.core.deathban.lives; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; + +public class LivesListener implements Listener{ + + @EventHandler + public void onVanish(PlayerInteractEvent e) + { + Player p = e.getPlayer(); + if (((e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) || (e.getAction().equals(Action.RIGHT_CLICK_AIR))) && + (e.getPlayer().getItemInHand() != null) && + (e.getPlayer().getItemInHand().hasItemMeta()) && + (e.getPlayer().getItemInHand().getItemMeta().hasDisplayName())) { + if ((p.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.GREEN + "1 Life " + ChatColor.GRAY + "(Right Click)") && (p.getItemInHand().getType() == Material.PAPER))) + { + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "lives give " + p.getName() + " 1"); + p.getItemInHand().setType(Material.AIR); + if (e.getItem().getAmount() <= 1) { + e.getPlayer().getInventory().remove(e.getItem()); + } + else + { + e.getPlayer().getInventory().getItemInHand().setAmount(e.getItem().getAmount() - 1); + } + + } + else if ((p.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.GREEN + "3 Lives " + ChatColor.GRAY + "(Right Click)") && (p.getItemInHand().getType() == Material.PAPER))) + { + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "lives give " + p.getName() + " 3"); + p.getItemInHand().setType(Material.AIR); + if (e.getItem().getAmount() <= 1) { + e.getPlayer().getInventory().remove(e.getItem()); + } + else + { + e.getPlayer().getInventory().getItemInHand().setAmount(e.getItem().getAmount() - 1); + } + } + else if ((p.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.GREEN + "5 Lives " + ChatColor.GRAY + "(Right Click)") && (p.getItemInHand().getType() == Material.PAPER))) + { + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "lives give " + p.getName() + " 5"); + p.getItemInHand().setType(Material.AIR); + if (e.getItem().getAmount() <= 1) { + e.getPlayer().getInventory().remove(e.getItem()); + } + else + { + e.getPlayer().getInventory().getItemInHand().setAmount(e.getItem().getAmount() - 1); + } + } + else if ((p.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.GREEN + "8 Lives " + ChatColor.GRAY + "(Right Click)") && (p.getItemInHand().getType() == Material.PAPER))) + { + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "lives give " + p.getName() + " 8"); + p.getItemInHand().setType(Material.AIR); + if (e.getItem().getAmount() <= 1) { + e.getPlayer().getInventory().remove(e.getItem()); + } + else + { + e.getPlayer().getInventory().getItemInHand().setAmount(e.getItem().getAmount() - 1); + } + } + } + } + +} diff --git a/src/club/curahq/core/deathban/lives/StaffReviveCommand.java b/src/club/curahq/core/deathban/lives/StaffReviveCommand.java new file mode 100644 index 0000000..fb8fdd5 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/StaffReviveCommand.java @@ -0,0 +1,82 @@ +package club.curahq.core.deathban.lives; + + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; + +import club.curahq.core.Core; +import club.curahq.core.deathban.Deathban; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.chat.ClickAction; +import club.curahq.core.util.chat.Text; + +public class StaffReviveCommand implements CommandExecutor, TabCompleter { + + private final Core plugin; + + public StaffReviveCommand(Core plugin) { + this.plugin = plugin; + } + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: /" + label + " "); + return true; + } + + OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]); // TODO: breaking + + if (!target.hasPlayedBefore() && !target.isOnline()) { + sender.sendMessage(ChatColor.GOLD + "Player '" + ChatColor.WHITE + args[0] + ChatColor.GOLD + "' not found."); + return true; + } + + UUID targetUUID = target.getUniqueId(); + FactionUser factionTarget = Core.getPlugin().getUserManager().getUser(targetUUID); + Deathban deathban = factionTarget.getDeathban(); + + if (deathban == null || !deathban.isActive()) { + sender.sendMessage(ChatColor.RED + target.getName() + " is not death-banned."); + return true; + } + + factionTarget.removeDeathban(); + Command.broadcastCommandMessage(sender, ChatColor.LIGHT_PURPLE + "Staff revived " + target.getName() + "."); + new Text("[Click to refund]").setColor(ChatColor.GOLD).setClick(ClickAction.RUN_COMMAND, "/refund " + target.getName()).send(sender); + sender.sendMessage(ChatColor.GREEN + "Refund Items!"); + return false; + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { + if (args.length != 1) { + return Collections.emptyList(); + } + + List results = new ArrayList<>(); + for (FactionUser factionUser : plugin.getUserManager().getUsers().values()) { + Deathban deathban = factionUser.getDeathban(); + if (deathban != null && deathban.isActive()) { + OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(factionUser.getUserUUID()); + String name = offlinePlayer.getName(); + if (name != null) { + results.add(name); + } + } + } + + return BukkitUtils.getCompletions(args, results); + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesCheckArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesCheckArgument.java new file mode 100644 index 0000000..b88acb7 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesCheckArgument.java @@ -0,0 +1,64 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.command.CommandArgument; + +public class LivesCheckArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesCheckArgument(Core plugin) + { + super("check", "Check how much lives a player has"); + this.plugin = plugin; + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + " [playerName]"; + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + OfflinePlayer target; + if (args.length > 1) + { + target = Bukkit.getOfflinePlayer(args[1]); + } + else + { + if (!(sender instanceof Player)) + { + sender.sendMessage(ChatColor.RED + "Usage: " + getUsage(label)); + return true; + } + target = (OfflinePlayer)sender; + } + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(ChatColor.GOLD + "Player '" + ChatColor.WHITE + args[1] + ChatColor.GOLD + "' not found."); + return true; + } + int targetLives = this.plugin.getDeathbanManager().getLives(target.getUniqueId()); + sender.sendMessage(ChatColor.YELLOW + target.getName() + ChatColor.YELLOW + " has " + ChatColor.LIGHT_PURPLE + targetLives + ChatColor.YELLOW + ' ' + (targetLives == 1 ? "life" : "lives") + '.'); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 2 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesCheckDeathbanArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesCheckDeathbanArgument.java new file mode 100644 index 0000000..69f695e --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesCheckDeathbanArgument.java @@ -0,0 +1,92 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; + +import com.google.common.base.Strings; + +import club.curahq.core.Core; +import club.curahq.core.deathban.Deathban; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.command.CommandArgument; +import club.curahq.core.util.core.DateTimeFormats; +import me.apache.commons.lang3.time.DurationFormatUtils; + +public class LivesCheckDeathbanArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesCheckDeathbanArgument(Core plugin) + { + super("checkdeathban", "Check the deathban cause of player"); + this.plugin = plugin; + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + " "; + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 2) + { + sender.sendMessage(ChatColor.RED + "Usage: " + getUsage(label)); + return true; + } + OfflinePlayer target = Bukkit.getOfflinePlayer(args[1]); + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(ChatColor.GOLD + "Player '" + ChatColor.WHITE + args[1] + ChatColor.GOLD + "' not found."); + return true; + } + Deathban deathban = this.plugin.getUserManager().getUser(target.getUniqueId()).getDeathban(); + if ((deathban == null) || (!deathban.isActive())) + { + sender.sendMessage(ChatColor.RED + target.getName() + " is not death-banned."); + return true; + } + sender.sendMessage(ChatColor.DARK_AQUA + "Deathban cause of " + target.getName() + '.'); + sender.sendMessage(ChatColor.GRAY + " Time: " + DateTimeFormats.HR_MIN.format(deathban.getCreationMillis())); + sender.sendMessage(ChatColor.GRAY + " Duration: " + DurationFormatUtils.formatDurationWords(deathban.getInitialDuration(), true, true)); + + Location location = deathban.getDeathPoint(); + if (location != null) { + sender.sendMessage(ChatColor.GRAY + " Location: (" + location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ() + ") - " + location.getWorld().getName()); + } + sender.sendMessage(ChatColor.GRAY + " Reason: [" + Strings.nullToEmpty(deathban.getReason()) + ChatColor.GREEN + "]"); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + if (args.length != 2) { + return Collections.emptyList(); + } + List results = new ArrayList(); + for (FactionUser factionUser : this.plugin.getUserManager().getUsers().values()) + { + Deathban deathban = factionUser.getDeathban(); + if ((deathban != null) && (deathban.isActive())) + { + OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(factionUser.getUserUUID()); + String name = offlinePlayer.getName(); + if (name != null) { + results.add(name); + } + } + } + return results; + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesClearDeathbansArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesClearDeathbansArgument.java new file mode 100644 index 0000000..8ad320f --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesClearDeathbansArgument.java @@ -0,0 +1,44 @@ +package club.curahq.core.deathban.lives.argument; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.command.CommandArgument; + +public class LivesClearDeathbansArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesClearDeathbansArgument(Core plugin) + { + super("cleardeathbans", "Clears the global deathbans"); + this.plugin = plugin; + this.aliases = new String[] { "resetdeathbans" }; + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName(); + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (((sender instanceof ConsoleCommandSender)) || (((sender instanceof Player)) && (sender.getName().equalsIgnoreCase("Showyy"))) || (sender.getName().equalsIgnoreCase("URN"))) + { + for (FactionUser user : this.plugin.getUserManager().getUsers().values()) { + user.removeDeathban(); + } + Command.broadcastCommandMessage(sender, ChatColor.YELLOW + "All death-bans have been cleared."); + return true; + } + sender.sendMessage(ChatColor.RED + "Must be console"); + return false; + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesGiveArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesGiveArgument.java new file mode 100644 index 0000000..b378898 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesGiveArgument.java @@ -0,0 +1,87 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.command.CommandArgument; +import club.curahq.core.util.core.BaseConstants; + +public class LivesGiveArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesGiveArgument(Core plugin) + { + super("give", "Give lives to a player"); + this.plugin = plugin; + this.aliases = new String[] { "transfer", "send", "pay", "add" }; + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + " "; + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 3) + { + sender.sendMessage(ChatColor.RED + "Usage: " + getUsage(label)); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[2]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[2] + "' is not a number."); + return true; + } + if (amount.intValue() <= 0) + { + sender.sendMessage(ChatColor.RED + "The amount of lives must be positive."); + return true; + } + OfflinePlayer target = Bukkit.getOfflinePlayer(args[1]); + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[1] })); + return true; + } + Player onlineTarget = target.getPlayer(); + if (((sender instanceof Player)) && (!sender.hasPermission(PERMISSION))) + { + Player player = (Player)sender; + int ownedLives = this.plugin.getDeathbanManager().getLives(player.getUniqueId()); + if (amount.intValue() > ownedLives) + { + sender.sendMessage(ChatColor.RED + "You tried to give " + target.getName() + ' ' + amount + " lives, but you only have " + ownedLives + '.'); + return true; + } + this.plugin.getDeathbanManager().takeLives(player.getUniqueId(), amount.intValue()); + } + this.plugin.getDeathbanManager().addLives(target.getUniqueId(), amount.intValue()); + sender.sendMessage(ChatColor.YELLOW + "You have sent " + ChatColor.GOLD + target.getName() + ChatColor.YELLOW + ' ' + amount + ' ' + (amount.intValue() > 1 ? "lives" : "life") + '.'); + if (onlineTarget != null) { + onlineTarget.sendMessage(ChatColor.GOLD + sender.getName() + ChatColor.YELLOW + " has sent you " + ChatColor.GOLD + amount + ' ' + (amount.intValue() > 1 ? "lives" : "life") + '.'); + } + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 2 ? null : Collections.emptyList(); + } + + private static final String PERMISSION = "hcf.command.lives.argument.give.bypass"; +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesReviveArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesReviveArgument.java new file mode 100644 index 0000000..4585d36 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesReviveArgument.java @@ -0,0 +1,128 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import club.curahq.core.Core; +import club.curahq.core.deathban.Deathban; +import club.curahq.core.faction.struct.Relation; +import club.curahq.core.faction.type.PlayerFaction; +import club.curahq.core.user.FactionUser; +import club.curahq.core.util.command.CommandArgument; +import club.curahq.core.util.core.ConfigUtil; + +@SuppressWarnings("deprecation") +public class LivesReviveArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesReviveArgument(Core plugin) + { + super("revive", "Revive a death-banned player"); + this.plugin = plugin; + this.permission = ("hcf.command.lives.argument." + getName()); + plugin.getServer().getMessenger().registerOutgoingPluginChannel(plugin, "BungeeCord"); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + " "; + } + +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 2) + { + sender.sendMessage(ChatColor.RED + "Usage: " + getUsage(label)); + return true; + } + OfflinePlayer target = Bukkit.getOfflinePlayer(args[1]); + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(ChatColor.GOLD + "Player '" + ChatColor.WHITE + args[1] + ChatColor.GOLD + "' not found."); + return true; + } + UUID targetUUID = target.getUniqueId(); + FactionUser factionTarget = this.plugin.getUserManager().getUser(targetUUID); + Deathban deathban = factionTarget.getDeathban(); + if ((deathban == null) || (!deathban.isActive())) + { + sender.sendMessage(ChatColor.RED + target.getName() + " is not death-banned."); + return true; + } + Relation relation = Relation.ENEMY; + if ((sender instanceof Player)) + { + if ((!sender.hasPermission("hcf.revive.bypass")) && (this.plugin.getEotwHandler().isEndOfTheWorld())) + { + sender.sendMessage(ChatColor.RED + "You cannot revive players during EOTW."); + return true; + } + if (!sender.hasPermission("hcf.revive.bypass")) + { + Player player = (Player)sender; + UUID playerUUID = player.getUniqueId(); + int selfLives = this.plugin.getDeathbanManager().getLives(playerUUID); + if (selfLives <= 0) + { + sender.sendMessage(ChatColor.RED + "You do not have any lives."); + return true; + } + this.plugin.getDeathbanManager().setLives(playerUUID, selfLives - 1); + PlayerFaction playerFaction = this.plugin.getFactionManager().getPlayerFaction(player); + relation = playerFaction == null ? Relation.ENEMY : playerFaction.getFactionRelation(this.plugin.getFactionManager().getPlayerFaction(targetUUID)); + sender.sendMessage(ChatColor.YELLOW + "You have revived " + relation.toChatColour() + target.getName() + ChatColor.YELLOW + '.'); + } + else if (sender.hasPermission("hcf.revive.dtr")) + { + if (this.plugin.getFactionManager().getPlayerFaction(targetUUID) != null) { + this.plugin.getFactionManager().getPlayerFaction(targetUUID).setDeathsUntilRaidable(this.plugin.getFactionManager().getPlayerFaction(targetUUID).getDeathsUntilRaidable() + 1.0D); + } + sender.sendMessage(ChatColor.YELLOW + "You have revived and added DTR to " + relation.toChatColour() + target.getName() + ChatColor.YELLOW + '.'); + } + else + { + sender.sendMessage(ChatColor.YELLOW + "You have revived " + relation.toChatColour() + target.getName() + ChatColor.YELLOW + '.'); + } + } + else + { + sender.sendMessage(ChatColor.YELLOW + "You have revived " + ConfigUtil.ENEMY_COLOUR + target.getName() + ChatColor.YELLOW + '.'); + } + factionTarget.removeDeathban(); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + if (args.length != 2) { + return Collections.emptyList(); + } + List results = new ArrayList(); + Collection factionUsers = this.plugin.getUserManager().getUsers().values(); + for (FactionUser factionUser : factionUsers) + { + Deathban deathban = factionUser.getDeathban(); + if ((deathban != null) && + (deathban.isActive())) + { + OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(factionUser.getUserUUID()); + String offlineName = offlinePlayer.getName(); + if (offlineName != null) { + results.add(offlinePlayer.getName()); + } + } + } + return results; + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesSetArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesSetArgument.java new file mode 100644 index 0000000..0898b88 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesSetArgument.java @@ -0,0 +1,63 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.OfflinePlayer; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; + +import club.curahq.core.Core; +import club.curahq.core.util.BukkitUtils; +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.command.CommandArgument; +import club.curahq.core.util.core.BaseConstants; + +public class LivesSetArgument + extends CommandArgument +{ + private final Core plugin; + + public LivesSetArgument(Core plugin) + { + super("set", "Set how much lives a player has"); + this.plugin = plugin; + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + " "; + } + + @SuppressWarnings("deprecation") +public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if (args.length < 3) + { + sender.sendMessage(ChatColor.RED + "Usage: " + getUsage(label)); + return true; + } + Integer amount = JavaUtils.tryParseInt(args[2]); + if (amount == null) + { + sender.sendMessage(ChatColor.RED + "'" + args[2] + "' is not a number."); + return true; + } + OfflinePlayer target = BukkitUtils.offlinePlayerWithNameOrUUID(args[1]); + if ((!target.hasPlayedBefore()) && (!target.isOnline())) + { + sender.sendMessage(String.format(BaseConstants.PLAYER_WITH_NAME_OR_UUID_NOT_FOUND, new Object[] { args[1] })); + return true; + } + this.plugin.getDeathbanManager().setLives(target.getUniqueId(), amount.intValue()); + sender.sendMessage(ChatColor.YELLOW + target.getName() + " now has " + ChatColor.GOLD + amount + ChatColor.YELLOW + " lives."); + return true; + } + + public List onTabComplete(CommandSender sender, Command command, String label, String[] args) + { + return args.length == 2 ? null : Collections.emptyList(); + } +} diff --git a/src/club/curahq/core/deathban/lives/argument/LivesSetDeathbanTimeArgument.java b/src/club/curahq/core/deathban/lives/argument/LivesSetDeathbanTimeArgument.java new file mode 100644 index 0000000..d326c03 --- /dev/null +++ b/src/club/curahq/core/deathban/lives/argument/LivesSetDeathbanTimeArgument.java @@ -0,0 +1,50 @@ +package club.curahq.core.deathban.lives.argument; + +import java.util.Collections; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; + +import club.curahq.core.util.JavaUtils; +import club.curahq.core.util.command.CommandArgument; +import me.apache.commons.lang3.time.DurationFormatUtils; + +public class LivesSetDeathbanTimeArgument + extends CommandArgument +{ + public LivesSetDeathbanTimeArgument() + { + super("setdeathbantime", "Sets the base deathban time"); + this.permission = ("hcf.command.lives.argument." + getName()); + } + + public String getUsage(String label) + { + return '/' + label + ' ' + getName() + "